NAME
Business::Cart::Generic::Controller::Order - Basic shopping cart
Synopsis
Description
Business::Cart::Generic implements parts of osCommerce and PrestaShop in Perl.
Installation
Constructor and Initialization
Parentage
This is a sub-class of Business::Cart::Generic::Controller.
Using new()
This class is never used stand-alone. However, one of its run modes is run automatically when the user clicks one of the submit buttons on the Order form. See generic.cart.cgi or generic.cart.psgi and also online.order.page.js for statements like var request = Y.io("/Order/checkout", cfg).
Methods
All buttons mentioned here are on the Order form.
add_to_cart()
Responds to an AJAX request when the user clicks on the [Add to cart] button.
Returns a message which is sent to the client.
add_to_cart_txn_1() and add_to_cart_txn_2()
Helpers for add_to_cart(). Never called directly.
cancel_order()
Responds to an AJAX request when the user clicks on the [Cancel order] button.
Returns a message which is sent to the client.
cancel_order_txn()
Helper for cancel_order(). Never called directly.
cgiapp_init()
Called automatically, as is the parent's cgiapp_init(), to specify the names of run modes.
change_country()
Responds when the user changes the currently selected country on the country menu. That menu has an onchange event handler. See online.order.page.js for that handler. The handler is attached to the menu in Business::Cart::Generic::View::Order.
checkout()
Responds to an AJAX request when the user clicks on the [Checkout] button.
Returns a message which is sent to the client.
checkout_txn()
Helper for checkout(). Never called directly.
remove_from_cart()
Responds to an AJAX request when the user clicks on the [Remove from cart] button.
Returns a message which is sent to the client.
remove_from_cart_txn()
Helper for remove_from_cart(). Never called directly.
Machine-Readable Change Log
The file CHANGES was converted into Changelog.ini by Module::Metadata::Changes.
Version Numbers
Version numbers < 1.00 represent development versions. From 1.00 up, they are production versions.
Thanks
Many thanks are due to the people who chose to make osCommerce and PrestaShop, Zen Cart, etc, Open Source.
Support
Email the author, or log a bug on RT:
https://rt.cpan.org/Public/Dist/Display.html?Name=Business::Cart::Generic.
Author
Business::Cart::Generic was written by Ron Savage <ron@savage.net.au> in 2011.
Home page: http://savage.net.au/index.html.
Copyright
Australian copyright (c) 2011, Ron Savage.
All Programs of mine are 'OSI Certified Open Source Software';
you can redistribute them and/or modify them under the terms of
The Artistic License, a copy of which is available at:
http://www.opensource.org/licenses/index.html