Loading...
 

Plugin Add to Cart

Use this wiki plugin, introduced in Tiki5, to display a button for adding one or more items to the shopping cart. The shopping cart is displayed and accessed using Module Cart. Once the order is placed in the shopping cart, the user is taken to Payment.

Parameters

Add a product to the shopping cart.
Introduced in Tiki 5. Required parameters are in bold.
Go to the source code
Preferences required: wikiplugin_addtocart, payment_feature

Parameters Accepted Values Description Default Since
description text Label for the product in the cart. 5.0
price text The price to charge for the item. 5.0
code text Unique identifier for the product. Two products with the same code will be the same and the information used will be the one of the first in. 5.0
exchangeorderamount int Should normally be set to the amount of products in the order being exchanged 1 7.0
eventcode text Unique identifier for the event that is associated to the product. 7.0
autocheckout text Automatically check out for purchase and send the user to pay (this is disabled when there is already something in the cart) n 7.0
bundleclass text The class the bundle belongs to 7.0
label text Text for the submit button. default: "Add to cart" Add to cart 6.0
onbehalf text Allows the selection of user to make purchase on behalf of n 7
forwardafterfree url Forward to this URL after free purchase 7.0
href url URL of the product's information. The URL may be relative or absolute (begin with http://). 5.0
productbundle text The bundle the product belongs to. Will automatically add other products in the same class to the cart 7.0
productclass text The class the product belongs to 7.0
exchangetoproductid int 5.0
producttype text The product type that is being sold, which will affect fulfillment, for example, standard product, event ticket 7.0
forceanon text Add to cart as anonymous shopper even if logged in n 7.0
weight text The weight of the item. 12.1
ajaxaddtocart (blank)
y
n
Attempts to turn on Ajax for the cart n 7.0
hidequantity n
y
Hide the quantity field so you can create buy now button for a single item, quantity = 1 (not available with the exchange feature) n 17.0
exchangeorderitemid int Used in conjunction with exchange feature 7.0

Example

This code,

Copy to clipboard
{addtocart description="Panama Hat" code="A150" price="45.00"}

Would produce:


(screenshot)
(screenshot)

The add to cart button would typically be used along with item information like below:

Image
Panama Hat
$45.00%%%Image

 Note
The description, inventory code and price are passed to the shopping cart when the add to cart button is clicked.

Related pages

Aliases

Plugin Cart | Plugin Add to Cart | Plugin AddtoCart

List Slides