dreamscape Posted December 10, 2002 Posted December 10, 2002 my OSC was just acting really weird... using a test account to test placing orders using my recent implementation of package tracking, a quantity box on the product_info page, and changing the "buy now" from a link to a form (to avoid any spiders from placing products in the shopping cart), I got this really weird behaviours... 1st when I checked out all looked fine, but then on the products notifications page, there would be listed 3 products where only 2 were in the cart... on my order history page (catalog), there were double orders with the same order number and 2 different final prices... one had the price of the 1st product + the 2nd one (how it should be) and the other had the total of the 1st product + the 3rd "phantom" product... both orders showed all 3 products... and the fields were listed twice on the order info... eg: Subtotal Subtotal Tax Tax Shipping Shipping Total Total it also showed up twice in admin... it did this up until my order ID got to 10 and then stopped... I whiped my orders table (well ok dropped it) and re-created it and have done 4 test orders and all seems ok for now... has anyone else seen behavior like this, or is it just another winXP/IIS/PHP/mySQL phenominon? The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
dreamscape Posted December 10, 2002 Author Posted December 10, 2002 also earlier when testing I had 7 products in my cart, I deleted them all, and the cart showed as empty, but didn't give the "your cart is empty"... it gave the cart layout if there are products in it, but none were listed... so I checked out and the total was zero, but then on the notifications page were the 7 products I had just removed from the cart... they all showed up in the order info too... how weird. The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
Ajeh Posted December 10, 2002 Posted December 10, 2002 Check your configuration table. Sort by configuration_key and see how many entries you have for each option.
dreamscape Posted December 10, 2002 Author Posted December 10, 2002 Check your configuration table. Sort by configuration_key and see how many entries you have for each option. uh could maybe run that by in a way that a non-PHP expert would understand? The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
Ajeh Posted December 10, 2002 Posted December 10, 2002 Go into phpMyAdmin ... Select your MySQL database ... Go to the configuration table ... Click Browse ... Click on the field configuration_key to sort alphabetically ... Scroll through and find things like: MODULE_ORDER_TOTAL_SHIPPING_TAX_CLASS How many are there? There should be 1 for each peice.
dreamscape Posted December 10, 2002 Author Posted December 10, 2002 I don't have phpMyAdmin... I run mySQL for windows and use the windows mySQL manager for queries and use the command line... and it looks like its doing it still... order # 10 was a double order with 2 products in the cart and then 2 "phantom" ones showing up. The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
dreamscape Posted December 10, 2002 Author Posted December 10, 2002 The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
dreamscape Posted December 10, 2002 Author Posted December 10, 2002 The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
dreamscape Posted December 10, 2002 Author Posted December 10, 2002 The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
Ajeh Posted December 10, 2002 Posted December 10, 2002 I'd have to see your database to check this, but it looks like something is out of wack as in your configuration table which is then messing up the other tables in processing the information. I would turn off all the settings you have in regards to modules payment, shipping and order totals then make sure the configuration table has no references to these. Now, turn them all back on and reconfigure them. Check your orders and products table and make sure there is only one reference to each product and each order. Clear out the duplicates or dump them and start over if this is an option. Once the databases are clean, try again.
dreamscape Posted December 10, 2002 Author Posted December 10, 2002 ok I installed phpmyadmin and checked the configuration table and ther are NO duplicate keys... The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
dreamscape Posted December 10, 2002 Author Posted December 10, 2002 I have found the problem... and oh is my orders table a mess... Now, here is the problem... My orders are not getting deleted when I delete them from the admin... the table "orders" gets cleared.... BUT orders_products and orders_total do not get cleared... this is where my "phantom" products and double orders are coming from... to test this, I placed another test order, order #12, and sure enough the phantom products that showed up were the same products from the old order #12 that's still in the database... does deleting orders from the admin not clear the order out of all 3 tables?? I see what happened, I rebuilt my orders table, so the orders started over at 1, but the other tables were up to 14 with the orders_id... I will clear the 3 tables and then place an order and delete it from admin to see if it then clears them out. The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
Ajeh Posted December 10, 2002 Posted December 10, 2002 That would make messies all over the place ... :shock: Thanks for letting us know the cause of the problem. It will be something to keep in mind the next time this issue comes up. Good luck cleaning! :D
dreamscape Posted December 10, 2002 Author Posted December 10, 2002 yes yes that was the problem... the highest order_id in my DB was 15... so rather than deleting 12 orders, I just made 3 more, to take my order_id up to 15... then went into admin and deleted all the orders, and it cleared all of the order tables out then... all is well now... thanks to you Ajeh for pointing me in the right direction... BTW, this happened when I installed the UPS/FedEx/USPS tracking contribution (called track_html) because it added 3 new feilds to orders table, but instead of just adding them in, it called to drop the orders table 1st and the re-create it with the 3 new fields included... I wasn't aware of what a mess that would make... at least I only had 15 orders to clear out and not 200... thanks again for the helping hand Ajeh, and for making me install phpmyadmin... how handy is that little bugger :D The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
Ajeh Posted December 10, 2002 Posted December 10, 2002 I think you will really like that. Very handy tool for seeing what the heck is going on with your data files ... :lookround:
Guest Posted December 10, 2002 Posted December 10, 2002 Okay, you can do it using the MySQL command-line client C:Documents and SettingsWill>c:mysqlbinmysql.exe -u root Welcome to the MySQL monitor. Commands end with; or g. Your MySQL connection id is 2 to server version: 3.23.49-nt Type 'help;' or 'h' for help. Type 'c' to clear the buffer. mysql> use catalog; Database changed mysql> SELECT * FROM configuration ORDER BY configuration_key ASC; +------------------+------------------------+--------------------------------+ | configuration_id | configuration_title | configuration_key | +------------------+--------------------------+-----------------------------+ | 19 | Credit Card Number | CC_NUMBER_MIN_LENGTH | | 18 | Credit Card Owner Name | CC_OWNER_MIN_LENGTH | | 40 | Calculate Image Size | CONFIG_CALCULATE_IMAGE_SIZE | [snip superfluous output] | 3 | E-Mail Address | STORE_OWNER_EMAIL_ADDRESS | | 39 | Subcategory Image Height | SUBCATEGORY_IMAGE_HEIGHT | | 38 | Subcategory Image Width | SUBCATEGORY_IMAGE_WIDTH | +------------------+--------------------------+-----------------------------+ 88 rows in set (0.01 sec) mysql>quit; Bye And then browse through the output to find the information that Linda is looking for. If you want to limit it to the three columns so that it is easier to browse, use this query instead (all on the one line of course): mysql> SELECT configuration_id, configuration_title, configuration_key FROM configuration ORDER BY configuration_key ASC;
Guest Posted December 10, 2002 Posted December 10, 2002 egads. sorry. it has already been solved. that'll teach me for posting without reading the whole thread.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.