Contributions
jsonServices
module: jsonServices
author: Sunny Chow
date: 6/23/2010
The jsonServices module serves to give OSCommerce 2.2 installations a RESTful interface to modify the contents of shopping cart. My hope is then to use this interface as a bridge to use OSCommerce's e-commerce functionality with other CMS's for the actual product display.
Currently this interface is only used to add products to the shopping cart. To demonstrate this behavior, I've included a javascript file that attaches an event handler matching the pattern of OScommerce's product links. This event handler then creates a modal dialog that will allow users to select the particular attributes of a product as well as add the product to the cart. A demo of this functionality can be found here - [http://www.sunnychow.com/osc2.2/ Click on Widget 1 to see the module in action].
In the future, I hope to include in the functionality the ability to display the contents of the chart, modifying the contents of the cart, and perhaps even writing the bridge between Drupal and OSCommerce.
Requests, comments, and suggestions can be submitted to jsonServices@sunnychow.com .
Expand All / Collapse All
1. Changed the instructions.
2. Removed extraneous system file.
09/14/2010 -
1. Corrected Packaging system.
- Users who have installed a previous distribution, please read the instructions for fixes.
2. Fixed bug related to options that have pricing information
1. Should work in IE now.
1. Added error checking in case json parse fails.
2. Works for add to cart links as well as input boxes
3. Using a custom theme.
4. Moved jsonServices from include/modules into include/classes
1. Works properly for IE now.
2. Cart Status Dialog is now centered properly.
The purpose of the previous version was really to serve as a demo of the functionalities exposed via JSON. This update will make use of those functionality to change "Add To Cart" actions to become AJAX enabled.
module: jsonServices
author: Sunny Chow
date: 6/23/2010
The jsonServices module serves to give OSCommerce 2.2 installations a RESTful interface to modify the contents of shopping cart. My hope is then to use this interface as a bridge to use OSCommerce's e-commerce functionality with other CMS's for the actual product display.
Currently this interface is only used to add products to the shopping cart. To demonstrate this behavior, I've included a javascript file that attaches an event handler matching the pattern of OScommerce's product links. This event handler then creates a modal dialog that will allow users to select the particular attributes of a product as well as add the product to the cart. A demo of this functionality can be found here - [http://www.sunnychow.com/osc2.2/ Click on Widget 1 to see the module in action].
In the future, I hope to include in the functionality the ability to display the contents of the chart, modifying the contents of the cart, and perhaps even writing the bridge between Drupal and OSCommerce.
Requests, comments, and suggestions can be submitted to jsonServices@sunnychow.com .
Note: Contributions are used at own risk.