Developer manual
products
Embeds products with tags ready for SimpleCart
Updated: Type: springtag
Method
<products/>
Current
Request Attributes
| Attribute | Type | Description | Default | Required? | |
|---|---|---|---|---|---|
| current | page | string | The id of the page to load products from | No | |
| current | table | string | The table containing the page being referenced Allowed values: pages, products, assets |
pages | No |
| current | target | string | The field on the current page which contains the ID of a page to load products from. Allowed values: Valid page id Ignored if @page attribute is set |
No | |
| current | select | string | The xml tag contain product details | product | No |
Examples
#1
Request
<products/>
Response
<div class="item p1 simpleCart_shelfItem">
<p class="image">
<img src="/cache/path/:upload:pages:sample:sample.jpg/width/200/height/200/crop/1/name/sample.jpg">
</p>
<h2 class="title item_name">Sample Product</h2>
<div class="fulldescription">
<p>Another Heading</p>
</div>
<p class="price item_price">$10 each</p>
<div class="inputs">
<p class="quantity">
<span>Qty: </span>
<input type="text" value="1" class="item_Quantity">
</p>
<p class="size">
<span>Size:</span>
<select class="item_size">
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="2XL">2XL</option>
<option value="3XL">3XL</option>
</select>
</p>
</div>
<p class="add">
<a class="item_add" href="javascript:;" target="_self">Add to Cart</a>
</p>
</div>