plainblack.com
Username Password
search
Bookmark and Share
Subscribe

Product Macro

*this is the macro used to display products in pre-7.5.11, after that the Product asset should be used.

^Product(SKU or productId, [templateId]);
This macro looks up a Product in the Product Manager by SKU or productId and allows information about it to be displayed. If the SKU or productId cannot be found, the message "Cannot find product" will be displayed.

The macro takes one optional argument, an alternate template in the Macro/Product namespace for formatting information about the Product. The following variables are available in the template:

 

variants.message The internationalized text "Available product configurations" variantLoop A loop containing information about all variants about the Product. variant.compositionLoop A loop containing information about all variants about the Product. parameter The parameter that defines this variant, for example, size. value The value of the parameter, for the example of size, XL. variant.variantId The Id for this variant of the Product. variant.price The price for this variant of the Product. variant.weight The weight for this variant of the Product. variant.sku The SKU for this variant of the Product. variant.addToCart.url A URL to add this variant of the Product to the user's shopping cart. variant.addToCart.label An internationalized label, "Add to cart", to display to the user for adding this variant of the Product to their shopping cart. productId The unique identifier of this Product. title The title for this Product. description The description of this Product. price The Product's base cost. weight The Product's base weight. sku The Product's base SKU.

Keywords: macro

Search | Most Popular | Recent Changes | Wiki Home
© 2018 Plain Black Corporation | All Rights Reserved