Jump to content

 

jobosales

Member Since 04 Nov 2006
Offline Last Active May 10 2015 11:22 PM
-----

Posts I've Made

In Topic: Database user-order errors

06 June 2010 - 08:10 PM

Deleting a profile with no orders is not a problem, but deleting a profile that has related orders will potentially orphan those orders unless some care is taken to deal with them. This, in fact, explains why after deleting a profile you can still find the orders with an order search (which searches the cscart_orders table - not cscart_users - and displays information from the orders table). The problem then is to either delete the orphaned order or to relate it back to the proper profile. From my perspective, this should be handled proactively in the code by not allowing a profile with any related orders to be deleted - you would still have the option to edit any related orders to assign the correct user and, only then, delete the profile.

Fixing these problems programmatically is not easy unless you can define a relationship which is true 100% of the time (e.g., if the customer billing information in cscart_orders perfectly matches a unique profile - then you could set the user_id in cscart_orders to that specified in cscart_users).

I would never encourage "nuking" the data. Try this: edit one of your orphaned (or incorrect) orders and in step 2 choose the correct customer and save the order. This should relate the order to the proper user profile. It might take some work but you should be able to clean things up over time.

One script which could help here would identify any orphaned orders (e.g., the user_id in the orders table has no match in the users table).

Bob

In Topic: How can i remove Adding Language Code on Seo URL

06 June 2010 - 07:21 PM

Uncheck "Show language in the URL" in settings for the SEO add-on.

Bob

In Topic: Database user-order errors

06 June 2010 - 07:05 PM

I doubt the upgrade is not going to fix any legacy problems. Unless others are experiencing this problem, it sounds like it is specific to your situation.

Changing the email address on the order would have no effect on linking the order back to the correct profile (they are related on user_id, not email address). I am not sure what the consequences of deleting a profile that links to orders are - I would think that it would simply orphan the order. If I were designing the system, I would make it not possible to delete a profile with any orders or gift certificates linked to the profile. I think the best way to do this would have been to edit the order and choose a new user/customer which should have properly related the order to the correct profile. I am not sure why they are coming up cross-linked since the the 'View all orders" searched based on user_id from what I have seen.

In order to fix the problem, you will likely need to replace the user_id on the order with the correct user_id from the profile - your will need to do this in phpMyAdmin or some other database tool. Try that on one order and see if it fixes the problem (although the customer information on the order could still be different than the profile information).

Bob

In Topic: Promotion Help!!

06 June 2010 - 06:13 PM

I don't know of any way to do this. There have been frequent requests to improve the promotions so that "Buy X, Get Y" promotions are available. No progress so far - the developers have convinced themselves that the "Buy together" add-on is an adequate substitute.

You can vote to have this added to a future version in the Ideas forum:
http://cscart.uservo...-get-one-50-off

Bob

In Topic: Database user-order errors

06 June 2010 - 02:30 AM

It's possible that this is a result of the situation you mentioned. The cscart_orders and cscart_users tables are related by user_id. The customer information is stored in the order table too so it is possible that you have different information displayed on the order than what is stored in the profile. It sounds like this might be a legacy issue from the differing information when the order was placed.

When you say you cleaned up the duplicates, what did you do? Did you change the customer on the existing order? Even so, it seems like the customer information on the order should have been updated when updating the order in the Admin area.

Bob