Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Products are not saved in shopping cart though the customer logged in


webarton

Recommended Posts

Posted

Hello,

I have a shopping cart broblem. It works strange now.

 

Can you please see what I tried as;

1. Before logging in, I put product A to my shopping cart.

2. I log in.

3. Product A is shown in my shopping cart.

4. I log out.

5. I log in again.

6. The cart doesn't contain productA.

 

It's weird that the cart was working all right in the past as it contains products I put few weeks ago.

But I can't save new products.

 

I thought shopping_cart.php might cause the problem though I hadn't modified it recently.

I made one more osCommerce site to compare.

But when I overwrite the shopping_cart.php to a brand-new osCommerce site, the cart is working all right.

 

Shopping_cart.php seems to have no relation to the problem.

But I have no idea why it happens.

 

Can you please give me some advice?

 

Regards,

 

Aki

 

osCommerce 2.2-MS2

PHP Version 5.2.6

MySQL 4.1.22-standard

Posted

I checked includes/classes/shopping_cart.php.

There's an insert sql as

			tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . $qty . "', '" . date('Ymd') . "')");

 

but tep_db_input($products_id) seems empty as product_id in customers_basket table is empty.

 

I have no idea why I can't get value of tep_db_input($products_id).

Posted

I found which file caused my problem.

It was includes/classes/shopping_cart.php.

 

I installed a module 'Purchase Without Account' 31 Jan 2007 version and

replaced shopping_cart.php by the included file of the module.

But it seems not to get product_id in adding cart and updating quantity.

 

I think I could fix them and now my shopping cart is working all right.

 

This time I had got a problem, but I'd like to say PWA helps me a lot.

Thanks,

 

aki

Archived

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

×
×
  • Create New...