sasori Posted December 22, 2011 Share Posted December 22, 2011 Hi, I was asked to create a plug and play shopping cart module for 3 different web sites written from scratch using PHP how/what strategy to do to approach this thing?, the module should be used in any of those portals regardless of their web design. what am currently thinking is, 1 ) create a class that has functions that calls the "add to cart" button 2 ) this add to cart button will detect which site it is being used and it'll display the correct add to cart button graphics. 3 ) add some functions that will fetch the input number of quantity from each product item and their prices 4 ) add some functions that will display the total amount of the things inside the cart 5 ) use native PHP session to store the shopping cart total quantity + total amount of the items inside it. Please tell me your point of view or your strategies in attacking this problem.. maybe I'll find a nice solution from one of you guys. Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/253671-coding-strategy/ Share on other sites More sharing options...
ignace Posted December 22, 2011 Share Posted December 22, 2011 The code for the shopping cart module has to be completely ignorant of the 3 systems. Once this is complete you need to write a specific script for each of the 3 shopping cart systems that proxies to your own code. this add to cart button will detect which site it is being used and it'll display the correct add to cart button graphics. This is a bad idea as this will prohibit you from using it on another website once it is added unless additional code is written. Quote Link to comment https://forums.phpfreaks.com/topic/253671-coding-strategy/#findComment-1300704 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.