cbmarcum / mybusiness

A Grails 4 plugin for online product e-commerce
Apache License 2.0
5 stars 1 forks source link

change shopping cart to use session instead of database #100

Open cbmarcum opened 3 years ago

cbmarcum commented 3 years ago

Enhancement to integrate code suggested by @vahidhedayati in #99 to use the session instead of the database for shopping cart object. This work will be done in the session-cart branch.

cbmarcum commented 3 years ago

@vahidhedayati ShoppingCartService has dependencies on the CartQuantity and ShoppingCart domains. ProductController, ShoppingCartTagLib and ShoppingCartServiceSpec has dependencies on ShoppingCartService.

vahidhedayati commented 3 years ago

Ahh okay I don't use any of them locally and all the logic of what the service is doing is already covered in the updated code, as in you no longer need that service and the tag lib is also no longer required - the session fed directly into gsp views and it also did further calculations with if it can have a button or not - basically the shoppingCart service is deprecated and can also be removed - the productController also does this ajax method which I don't use - I think I gave an example of how to use. The alternative is to keep all the mentioned files - revert back what I deleted from the checked in files - so restore the 2 domain classes and the 3 test cases or remove any of the above service and service test / the tag lib could be re-implemented using session values but had no usage - the productcontroller also probably needs reworking not to use those older methods -