You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when using an otherwise excellent library, I noticed that all changes to the shopping cart are immediately saved in the storage (session, database etc). The storage is also called e.g. when calling the getSubTotal() method, etc. - although in my opinion this is basically not necessary at all. As a result, the database can be completely unnecessarily overloaded (in my case, more than 30 myql queries were executed!). I changed the library a bit and created a new one. I would be happy if you could install and test it. I am definitely ready to implement all the changes in the basic library, but since the syntax has changed a bit and the new library is not 100% compatible with the basic one, I decided to create a new one.
Basically there are only two changes. Using session() method to set user key is mandatory and I implemented new save() method witch should be called whenever you want to save the cart into storage.
Comments are welcome. General about the performance of the core library and my updates.
Greetings
The text was updated successfully, but these errors were encountered:
Hello everybody,
when using an otherwise excellent library, I noticed that all changes to the shopping cart are immediately saved in the storage (session, database etc). The storage is also called e.g. when calling the getSubTotal() method, etc. - although in my opinion this is basically not necessary at all. As a result, the database can be completely unnecessarily overloaded (in my case, more than 30 myql queries were executed!). I changed the library a bit and created a new one. I would be happy if you could install and test it. I am definitely ready to implement all the changes in the basic library, but since the syntax has changed a bit and the new library is not 100% compatible with the basic one, I decided to create a new one.
Package - https://github.com/izyy123/laravelshoppingcart, https://packagist.org/packages/izyy123/cart
Only 3 commits are important - ebc873b
ebc873b
8b69405
Basically there are only two changes. Using session() method to set user key is mandatory and I implemented new save() method witch should be called whenever you want to save the cart into storage.
Comments are welcome. General about the performance of the core library and my updates.
Greetings
The text was updated successfully, but these errors were encountered: