Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

EricK

Pioneers
  • Posts

    310
  • Joined

  • Last visited

About EricK

  • Birthday January 1

Profile Information

  • Real Name
    Eric_K
  • Gender
    Male
  • Location
    Atlanta, GA USA
  • Interests
    Building websites with open source applications, including osCommerce, WordPress and Joomla.

EricK's Achievements

  1. I also have a MVS client with the same error today. The items listed above will be shipped via: United Parcel Service (XML) United Parcel Service (XML) 110000: XML Rating and Service Selection Service Unavailable
  2. FYI: New requirements by MasterCard and Discover for debit, prepaid and gift cards will be enforced by Authorize.net effective June 30, 2011.
  3. I updated the code to work with Google's recommended asynchronous syntax, and it works great except when multiple products are ordered, then only the last item is reported by the '_addItem' function. How do we loop through to add each product in the order to the '_addItem' function? Thanks, Eric_K // ############## Google Analytics - start ############### // Get order id $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1"); $orders = tep_db_fetch_array($orders_query); $order_id = $orders['orders_id']; // Get order info for Analytics "Transaction line" (affiliation, city, state, country, total, tax and shipping) // Set value for "affiliation" $analytics_affiliation = 'Your Store Name Here'; // Get info for "city", "state", "country" $orders_query = tep_db_query("select customers_city, customers_state, customers_country from " . TABLE_ORDERS . " where orders_id = '" . $order_id . "' AND customers_id = '" . (int)$customer_id . "'"); $orders = tep_db_fetch_array($orders_query); $totals_query = tep_db_query("select value, class from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order"); // Set values for "total", "tax" and "shipping" $analytics_total = ''; $analytics_tax = ''; $analytics_shipping = ''; while ($totals = tep_db_fetch_array($totals_query)) { if ($totals['class'] == 'ot_total') { $analytics_total = number_format($totals['value'], 2, '.', ''); $total_flag = 'true'; } else if ($totals['class'] == 'ot_tax') { $analytics_tax = number_format($totals['value'], 2, '.', ''); $tax_flag = 'true'; } else if ($totals['class'] == 'ot_shipping') { $analytics_shipping = number_format($totals['value'], 2, '.', ''); $shipping_flag = 'true'; } } // Prepare the Analytics "Transaction line" string $transaction_string = '"' . $order_id . '"," ' . $analytics_affiliation . '","' . $analytics_total . '","' . $analytics_tax . '","' . $analytics_shipping . '","' . $orders['customers_city'] . '","' . $orders['customers_state'] . '","' . $orders['customers_country'] . '"'; // Get products info for Analytics "Item lines" $item_string = ''; $items_query = tep_db_query("select products_id, products_model, products_name, final_price, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $order_id . "' order by products_name"); while ($items = tep_db_fetch_array($items_query)) { $category_query = tep_db_query("select p2c.categories_id, cd.categories_name from " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p2c.products_id = '" . $items['products_id'] . "' AND cd.categories_id = p2c.categories_id AND cd.language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); $item_string = '"' . $order_id . '"," ' . $items['products_model'] . '","' . $items['products_name'] . '","' . $category['categories_name'] . '","' . number_format($items['final_price'], 2, '.', '') . '","' . $items['products_quantity'] . '"'; } // ############## Google Analytics - end ############### ?> _gaq.push(['_addTrans', <?php echo $transaction_string; ?> ]); _gaq.push(['_addItem', <?php echo $item_string; ?> ]); _gaq.push(['_trackTrans']); Add the asynchronous syntax tracking code to checkout_success.php, either at the bottom of footer.php OR before </head>. Replace UA-xxxxxxx-x with your Google Analytics web property ID (available in your Google Analytics account). <?php // bof: Google Analytics Asynchronous Syntax Ecommerce Tracking ?> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxxxx-x']); _gaq.push(['_trackPageview']); <?php include(DIR_WS_MODULES . 'analytics/analytics.php'); ?> (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <?php // eof: Google Analytics Asynchronous Syntax Ecommerce Tracking ?>
  4. Thanks Simon, that worked for me! Regards, Eric_K
  5. Product Tabs and Dynamenu Here is a problem and solution if using Product Tabs with Dynamenu. Problem Product Tabs and Dynamenu both require the window.onload event, however you can only* assign one function to the window.onload event in Javascript. In my case, the Product Tabs Javascript was not working with Dynamenu installed. Solution Remove the function loadHandler() in Dynamenu. Go to /catalog/includes/functions/dynamenu/libjs/layersmenu.js, and comment out lines 297 to 305, like this. /* function loadHandler() { if (Konqueror22 || Opera56) { origWidth = window.innerWidth; origHeight = window.innerHeight; yaresizeHandler(); } } window.onload = loadHandler; */ * Note, yes it's possible to trigger multiple onload functions in Javascript, and this 'fix' may impact browser functionality in Konqueror/Opera. Thank you to the contributors of Product Tabs and Dynamenu. Regards, Eric_K
  6. The contribution works fine, but creates lots of PHP Notice and Warnings when generating thumbnails. -------------------------------------------------------------------------------- PHP Notice: Undefined index: w in /product_thumb.php on line 373 PHP Notice: Undefined index: h in /product_thumb.php on line 373 PHP Notice: Undefined index: w in /product_thumb.php on line 383 PHP Notice: Undefined index: h in /product_thumb.php on line 383 PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /product_thumb.php on line 383 PHP Notice: Undefined index: w in /product_thumb.php on line 398 PHP Notice: Undefined index: h in /product_thumb.php on line 398 PHP Warning: imagejpeg(): supplied argument is not a valid Image resource in /product_thumb.php on line 399 PHP Warning: Cannot modify header information - headers already sent by (output started at /product_thumb.php:274) in /product_thumb.php on line 208 PHP Warning: Cannot modify header information - headers already sent by (output started at /product_thumb.php:274) in /product_thumb.php on line 209 PHP Warning: Cannot modify header information - headers already sent by (output started at /product_thumb.php:274) in /product_thumb.php on line 210 -------------------------------------------------------------------------------- Does anyone know how to fix the PHP Notice and Warnings? Regards, Eric_K
  7. Has anyone converted orders_trustcommerce.php to work with Auhorize.net? It allows shop owners to run transactions (preauth / postauth / refund) directly from the orders.php page in osC administration. Regards, Eric_K
  8. Yes, MZMT can work with Ship In Cart, however you must activate a second shipping module in addition to MZMT or login to display Ship In Cart on the shopping cart page. As a 'work-around' I activated Free Shipping, set the Minimum Cost very high then removed the Free Shipping language defs to hide it in checkout_shipping.php. Regards, Eric_K
  9. Works now, I just updated to the latest version of mzmt.php (MultiGeoZone MultiTable Shipping). Cheers, Eric_K
  10. You must login to see quotes if using the MultiGeoZone MultiTable Shipping module. It works great for all other shipping methods, but has never worked for MultiGeoZone MultiTable Shipping unless you login. Any ideas what I should change to get quotes without logging in? Thanks, Eric_K
  11. Thanks Jack, sorry what I wanted to ask is a multi-line TextArea vs. a TextField possible? It displays a text field, so can I convert one text field to a text area? Kind regards, Eric_K
  12. Jack, Many thanks for your updates to Imprint Text Options! Do think it would be difficult to add a Comments text area field for each product, using Imprint Text Options as a starting point? I installed Product Attributes - Option Type Feature, but it does not work well for me and is overkill for my needs. Kind regards, Eric_K
  13. This happened a while back, and I forgot how I fixed it. Attribute Manager works fine, but if you preview/update a product it deletes all the attributes. Do you know the cause/fix for this? v 2.8.5 PHP 5.2.4, register_globals off MySQL 5 Thanks, EricK
  14. Yes please post the code to integrate QTPro with AJAX Attribute Manager. Thank you, EricK
  15. I have attributes dropdown sort orders working w/ Product Attributes Sort Order (http://addons.oscommerce.com/info/1822). Here is the change I made, after looking at Products Attribute Sorting Fix for QT Pro v.4, 13 Jan 2005. includes/classes/pad_base.php, line 320 replace this: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); with this: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_options_sort_order from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . " order by pa.products_options_sort_order"); This adds 'products_options_sort_order' to the query, and sets the order. You must have a sort order contribution installed that populates 'products_options_sort_order' in the products _attributes table. Next, to control sort order in the "Currently on Stock" box on product_info.php. Posted on: Aug 28 2007, 02:11 PM "the trick is to add each attribute quantity in the order you want them listed." That trick did not work for me, however sort by 'products_stock_id' does work this way. Here is the change I made. includes/modules/qtpro_stock_table.php, lines 18-22 replace this: // Get the stocklevels $products_stock_query=tep_db_query("SELECT products_stock_attributes, products_stock_quantity FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id=" . (int)$HTTP_GET_VARS['products_id'] ." ORDER BY products_stock_attributes"); with this: // Get the stocklevels $products_stock_query=tep_db_query("SELECT products_stock_id, products_stock_attributes, products_stock_quantity FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id=" . (int)$HTTP_GET_VARS['products_id'] ." ORDER BY products_stock_id"); Regards, EricK
×
×
  • Create New...