Simple Commerce – Purchase Tag Variables
There are a number of variables that you can use inside the {exp:simple_commerce:purchase} tag, as follows.
Item Details
item_id
{item_id}
The store item's id.
item_name
{item_name}
The descriptive name of the item.
item_enabled
{item_enabled}
Whether or not the store item is enabled (y/n). This can be useful if you use custom queries to access information about your store items. If the item is not enabled ("n"), the {exp:simple_commerce:purchase} tag will not output information for that item.
item_purchases
{item_purchases}
The number of times the item has been purchased.
item_regular_price
{item_regular_price}
The item's regular price.
item_sale_price
{item_sale_price}
The item's sale price.
item_use_sale
{item_use_sale}
Whether or not the item is on sale (y/n). Useful in conditionals and custom queries. If the item is marked as on sale, the PayPal purchase links will automatically use the sale price.
Purchase Links
add_to_cart_url
<a href="{add_to_cart_url}" onclick="window.open(this.href);return false;">Add to Cart</a>
The PayPal URL to add the item to the PayPal shopping cart. The example shown is a typical usage as a popup link.
buy_now_url
<a href="{buy_now_url}" onclick="window.open(this.href);return false;">Buy Now</a>
The "Buy Now" PayPal URL. The example shown is a typical usage as a popup link.
view_cart_url
<a href="{view_cart_url}" onclick="window.open(this.href);return false;">View Cart</a>
The PayPal URL to view the contents of the shopping cart. The example shown is a typical usage as a popup link.
Purchase Buttons
Purchase buttons are variable pairs, and enclose the text used for the button label.
add_to_cart_button
{add_to_cart_button}Add to Cart{/add_to_cart_button}
A button that adds the item to the PayPal shopping cart.
buy_now_button
{buy_now_button}Buy Now{/buy_now_button}
A "Buy Now" PayPal button.
view_cart_button
{view_cart_button}View Cart{/view_cart_button}
A button to view the contents of the shopping cart.
User Contributed Notes
You must have an ExpressionEngine license and have attained a forum rank of "Lab Assistant" (100 posts) to contribute notes to the User Guide