Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

EricK

Pioneers
  • Posts

    310
  • Joined

  • Last visited

Everything posted by EricK

  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
  16. Olaf, Thank you for creating and supporting QTPro. I had missed the last change in admin/functions/general. //++++ QT Pro: Begin Changed code require('qtpro_functions.php'); //++++ QT Pro: End Changed code Does v4.5 provide attribute sort order? I was using products_options_sort_order in the product_options table. Kind regards, EricK
  17. James, I have the same problem on a clean install, apparently caused by "QTPro Doctor" introduced in v4.5. A solution is to remove the "QTPro Doctor" code in admin/categories.php, reverting back to v4.4b file, basically you only need the changes that start about line 990. Also, my QTPro Doctor page displays nothing after "QTPro Doctor - Overview". Are you running php5 with register_globals=off? Regards, EricK
  18. If you can't login after moving or restoring the database, the solution is to open phpMyAdmin, select the administrator table, click Browse, delete the current rows, then run the SQL statement to re-create users. First, replace username1 and user1password with the actual username and password that you want to have, then do the same for username2 and user2password, or simply delete the second line. INSERT INTO `administrator` VALUES (1, 'username1', password('user1password'), NULL, NULL); INSERT INTO `administrator` VALUES (2, 'username2', password('user2password'), NULL, NULL); Regards, EricK
  19. Fatal error: Call to a member function show_total() on a non-object in /home/username/public_html/includes/modules/shipping/mzmt.php on line 137 136 if ($this->geozone_mode == 'price') { 137 $this->order_total = $_SESSION['cart']->show_total(); Is this error caused by Register Globals = off ? I get it when trying to use the Order Editor contribution. I'm running PHP5 w/ register globals=off Thannk you, EricK
  20. Larry, I don't think your error logs relate to this contribution. The sql instructions are correct, it creates a new table named administrator, not administrators as I posted above. I do not use the admin_security.php feature, instead change the admin user/pw by running a sql statement, changing username01 and user01pw to your actual username/password. INSERT INTO `administrator` VALUES (1, 'username01', password('user01pw'), NULL, NULL); INSERT INTO `administrator` VALUES (2, 'username02', password('user02pw'), NULL, NULL); It works for me on several flavors of linux, but I have not installed it locally or on a windows server. Regards, EricK
  21. Matthew: try using phpMyAdmin to edit the administrators table (NOT administrator), and manually insert or edit the sName and sPassword. Bennett: try the above on administrators table (NOT administrator), and in the instructions, /yoursite/ is /catalog/ in a default osc install, not /admin/. Regards, EricK
  22. Tomasz, I have prior versions working, but get this sql error with v2.8.2. 1052 - Column: 'products_options_sort_order' in order clause is ambiguous select * from products_attributes as pa INNER JOIN products_options po ON pa.options_id=po.products_options_id where products_id = '306' AND language_id=1 order by products_options_sort_order What do you think is causing this? I'm running PHP5, register globals off, and mysql 5. Thanks, EricK
  23. Craig, many thanks! The @ fixed the error, and checkout using UPSXML still works. So that was not caused by register_globals=off? Kind regards, EricK
  24. Yes, other shipping methods work but still get this error using MVS verison of upsxml.php: Warning: constant() [function.constant]: Couldn't find constant MODULE_SHIPPING_UPSXML_INSURE_ in /home/username/htdocs/includes/modules/vendors_shipping/upsxml.php on line 420 Replacing $vendor_id with $vendors_id in upsxml.php removes the error, but checkout fails with the "no shipping selected" error; also replacing the 8 occurrences of $vendor_id with $vendors_id in checkout_shipping.php does not fix the "no shipping selected" error. I think it's a register_globals=off issue, so do you know how I define the shipping method selected with register_globals=off? Thanks, EricK
  25. Jim, The only other MVS error I see is on checkout_shipping.php using uspsxml.php. I get rates and checkout, but this PHP Warning is displayed on checkout_shipping.php: Warning: constant() [function.constant]: Couldn't find constant MODULE_SHIPPING_UPSXML_INSURE_ in /home/username/htdocs/includes/modules/vendors_shipping/upsxml.php on line 420 The error goes away if in upsxml.php I replace all instances of: OLD CODE = 'MODULE_SHIPPING_UPSXML_INSURE_' . $vendor_id NEW CODE = 'MODULE_SHIPPING_UPSXML_INSURE_' . $vendors_id But then I get the dreaded "ERROR_NO_SHIPPING_SELECTED_SELECTED" and can't checkout. What is the difference between $vendor_id and $vendors_id? Thanks again, EricK
×
×
  • Create New...