Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Disabling Persistent Carts?


jnunez

Recommended Posts

I did NOT test this, so start with making backups!!

 

Open up catalog/includes/classes/shopping_cart.php

 

Look for:

// insert into database

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

and change into:

// insert into database

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

Then find:

// insert into database

           if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $option . "', '" . $value . "')");

And replace by:

// insert into database

           if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $option . "', '" . $value . "')");

Or in short: Comment out the line after the comments that say '// insert into database'.

 

It might just work :?

Greetings from Marcel

|Current version|Documentation|Contributions|

Link to comment
Share on other sites

In which function should this go in?

 

----

 

So far from tracing everything I thought I could easily just edit the class shoppingCart::reset so when called, it will wipe out the old data in the database and load the current data in the shopping cart to the db and then back to the cart. I know pretty repetative but this is just a temp solution so the higher up can approve it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...