1 Functionality description
Provides an opportunity to place items that can be ordered by portal user on a CMS page. These shopping items are placed via widget. Every user can see their ordered items list with ItemList widget. Then the portal user must pass 4 steps of ordering (Shoppingcart widget).
- usermail_template – Name of email template to notify a user
- adminemail_template – Name of email template to notify responsible administrator
- max_lifetime – Lifetime of order session in minutes
- shipping_costs – Value of shipping costs which is added to total sum of order
- currency – Currency name which user sees near a price
2 Item widget
This widget shows one item which can be ordered:
- item_id – Id of the item
- title – Title of the item
- price – Price of the item
- admin_email – Email address of the responsible admin
- page_id – Id of the page where the item is located
- class – Name of the css class of item container
- default_quantity – Value of the default quantity
- shoppingcart_link – Link to the page which includes shoppingcart widget
- item_referrer – Link to the page where placed current item
Example of usage:
<?php $this->widget('shoppingcart.widgets.ItemWidget', array( 'item_id' => 7, 'title' => 'CocaCola', 'price' => 9, 'admin_email' => 'john_c@gmail.com', 'page_id' => 70, 'class' => 'shoppingcart_item', 'default_quantity' => 1, 'shoppingcart_link' => '/Content.Node/Warenkorb.de.html', 'item_referrer' => '/Content.Node/blog/events/Category_Events.en.html' ) ); ?>
3 ItemList widget
This widget shows the list of ordered items:
- title – Title of item in the list
- user_id – Id of the customer
- count – Number of the displayed items
- class – Name of CSS class of the unsorted list
- shoppingcart_link – Link to the page which includes shoppingcart widget
- link_items_to_page – Flag which determines whether item names are references
Example of usage:
<?php $this->widget('shoppingcart.widgets.ItemListWidget', array('title'=>'MY CART', 'user_id'=>'55', 'count'=>5, 'class'=>'itemlist', 'shoppingcart_link'=>'shoppingcart/cart/shoppingcart', 'link_items_to_page' => true ) ); ?>
4 ShoppingCart widget
This widget shows 4 steps of ordering:
- items – Title which shows above item list
- order – Instance of current order model
- user – Instance of current user model
- step – Number of current step
- class – Name of shoppingcart CSS class
- shipping_info – Information about the shipping which belongs to current order
- payment_info – Information about the payment which belongs to current order
- layout – Name of layout file
- link_items_to_page – Flag which determines whether item names are references
Example of usage:
<?php $this->widget('shoppingcart.widgets.ShoppingCartWidget', array( 'class'=>'shoppingcart', 'shipping_info' => 'some shipping info ...', 'payment_info' => 'some payment info ...', 'layout' => 'ShoppingCartWidget', 'link_items_to_page' => true ) ); ?>