Jump to content

Where does prestashop gets last id_cart?


nicoledesignstore

Recommended Posts

As per subject, I would like to know where Prestashop storages the lastly generated unique cart id that the new cart controller utilizes to create a new cart id as soon as a new visitor presses "add to cart" and how, if possible, to modify it with a custom one.

 

This information is needed to avoid an after 1.6 to 1.7 migration conflict that causes the cart not being generated at first customer's "add to cart" click (hence with modal appearing with a "0" amount counted and no products effectively added)  due to the id_cart being already used for previously received orders. Another solution I found to be working fine is changing all the pre-existing order column id_cart in ps_orders table to cart id 1, but i think setting a grater number id as starting point (for example 50000) for new carts to be generated is a cleaner and smarter solution.

 

Thanks

Edited by nicoledesignstore (see edit history)
Link to comment
Share on other sites

  • nicoledesignstore changed the title to Where does prestashop gets last id_cart?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...