Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Products attributes are not saved in orders ionformation


nellymnj

Recommended Posts

Posted

Hello,

We have products attributes set up for almost all our products - size (for clothing) or version (for download). The problem is that sometimes (it's actually in more than 50% of all orders) attributes are not appearing in an order information.

I checked the database - there are no entries for these orders in orders_products_attributes table, so attributes information was not saved on order creation for some reason. Only for 1 order where first item had a version attribute and the second item had a size attribute there was a different problem: there were entries for both items in orders_products_attributes table, but in admin panel - order only attribute for the first item was showing.

Has anyone encountered the same or similar problem?

What could go wrong here?

Thank you so much in advance,

nelly

Posted

My guess would be that you have a bad connection to the database, so that it's not getting updated when you add/remove items from your osCommerce admin panel.

 

The most likely cause of this is that the server is overloaded with too many websites running too many SQL queries at the same time.

 

Vger

Posted
My guess would be that you have a bad connection to the database, so that it's not getting updated when you add/remove items from your osCommerce admin panel.

 

The most likely cause of this is that the server is overloaded with too many websites running too many SQL queries at the same time.

 

Vger

 

Vger,

We are using a dedicated server, and it's not overloaded (it's 70% idle right now, and average of CPU usage is 40%).

Saving in orders_products_attributes table is happening when customer is placing the order (right?), and product is saved (orders_products table), but attribute of this product (size) is not;

could it still be the bad connection?

thank you,

nelly

Posted
Vger,

We are using a dedicated server, and it's not overloaded (it's 70% idle right now, and average of CPU usage is 40%).

Saving in orders_products_attributes table is happening when customer is placing the order (right?), and product is saved (orders_products table), but attribute of this product (size) is not;

could it still be the bad connection?

thank you,

nelly

That's what i found out:

if I login first and then add an item to a shopping cart, then I can see the attribute (the size) of the item in a shopping cart, and when I confirm the order, the attribute is in orders_products_attributes table;

if I did not login, but put item in a shopping cart first and then I create account (or login) I cannot see the attribute (the size) of the item in a shopping cart, and when I confirm the order, the attribute is not in orders_products_attributes table;

Something wrong with handling session variables in not secure mode?

 

thank you

nelia

Posted
That's what i found out:

if I login first and then add an item to a shopping cart, then I can see the attribute (the size) of the item in a shopping cart, and when I confirm the order, the attribute is in orders_products_attributes table;

if I did not login, but put item in a shopping cart first and then I create account (or login) I cannot see the attribute (the size) of the item in a shopping cart, and when I confirm the order, the attribute is not in orders_products_attributes table;

Something wrong with handling session variables in not secure mode?

 

thank you

nelly

 

Attribute is inserted in a table only

if (isset($order->products[$i]['attributes']))

Please, does anyone knows where this variable is set?

thank you

nelly

Posted
Attribute is inserted in a table only

if (isset($order->products[$i]['attributes']))

Please, does anyone knows where this variable is set?

thank you

nelly

 

Ok, I fixed it, it was all my fault. I had done some customization in shopping_cart.php (classes) - I was checking if a customer is alerady a member if he/she was buying a membership, and I moved

while (list($option, $value) = each($attributes)) {

$this->contents[$products_id]['attributes'][$option] = $value;

under criteria

if (tep_session_is_registered('customer_id')) ,

so it was saving attributes information only for registered customers.

 

Thank you everyone who was reading this.

nellymnj

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...