Fork me on GitHub

CART Functionality  Bottom

  • I was reading a post the other day about a shopping cart module that got me thinking. I am going to write a central "cart" module that will store a temporary list of products ready to purchase. This would be an glue module. To the left would be the actual shop interface. And too the right would be the shipping and payment gateways.

    The idea being that any module that wanted a cart would set up a series of API function (as a "cart" type) - getprice, getdescription, etc..

    The cart module would accept an add function which included the module add that product and a reference. Passing that reference back to the shop.cart.getdescription/getprice API would return prices and descriptions, etc... as relevant for that module. So you could have in a cart items from a shop, gallery photos for sale and membership costs.

    The shipping and payment modules could be written independently and installed like normal modules. They would be accessed by the cart module for checkout. After the "order" was recorded, the "shop.cart.oncomplete" API would be called for each product so that it could be back actioned.

    Later, this could be extended with hooks for Tax, Currency, etc....

    Using this technique, any module could be made into a ecommerce site by adding a buy now button - this could be a plugin?

    Comments?
  • geoff


    Using this technique, any module could be made into a ecommerce site by adding a buy now button - this could be a plugin?

    Comments?


    Maybe as a hook that could attached to any page...
  • I love the ideas you are putting out in the last few days. If you can implement them, you'll be a rockstar of the highest caliber. ROCK ON! icon_wink
  • craigh

    I love the ideas you are putting out in the last few days. If you can implement them, you'll be a rockstar of the highest caliber. ROCK ON! icon_wink

    +1

This list is based on users active over the last 60 minutes.