Jump to content

coding strategy


sasori

Recommended Posts

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

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.