shoppingCartItems
For eCommerce, implementing a shoppingCartItems tqTag returns a list of items included in the shopping cart. You implement it together with a shoppingCartInfo tqTag.
shoppingCartItems - Syntax
<tqtag name="shoppingCartItems0" type="shoppingCartItems" >
...
</tqtag>
shoppingCartItems - Parameters
| Parameter Name |
Type |
Mandatory |
Strict | Transitional |
Case Sensitive |
Description |
| type |
Text |
+ |
S |
+ |
must be shoppingCartItems |
| name |
Text |
+ |
S |
+ |
should be unique tqtag name in the template. no spaces/commas/single quote/double quotes allowed |
| alternativeTag |
Text |
+ |
S |
+ |
Specify a case declared within the alternative tqTag. |
| alternativeCondition |
Text |
+ |
S |
+ |
(optional, if the condition is specified within the alternative tqTag) Indicate a condition for the case that you are specifying. Use one of the values described for this field under alternative, for example, isShoppingCartEmpty. |
shoppingCartItems - Local Variables
| Name |
Type |
Size |
Description |
| allowCountUpdate |
|
|
|
| barCode |
text |
100 |
Line item barcode |
| catalogID |
number |
12 |
Line item catalog number |
| content |
text |
65535 |
Product content |
| counter |
number |
6 |
Running number from 1 to n sets the order of the items in the shopping cart |
| currency |
text |
12 |
Line item currency |
| description |
text |
65535 |
Product short descriptoin |
| itemsCount |
number |
12 |
Number of items in the shopping cart |
| lineItemCatalogID |
|
|
|
| lineItemID |
number |
12 |
Line item database id number |
| longDescription |
text |
65535 |
same as content |
| price |
number |
12 |
Product price in product currency |
| priceInUserCurrency |
number |
12 |
Product price in user currency |
| productBigImage |
text |
350 |
Line item default product big image |
| productBiglImage |
|
|
|
| productLink |
text |
~100 |
Url to the product page |
| productMediumImage |
text |
350 |
Line item default medium image |
| productName |
text |
100 |
Product name |
| productProperties |
text |
1024 |
All product properties |
| productSmallImage |
text |
350 |
Line item default small image |
| realPriceInUserCurrency |
number |
12 |
The line item market price in user currency |
| removeItemAction |
text |
~100 |
Url to remove product from shopping cart |
| rowID |
|
|
|
| shortDescription |
text |
65535 |
Line item short description |
| stockAffectingProperties |
text |
1024 |
Line items properties that are stock affecting |
| totalPrice |
number |
12 |
Line item total price (number of items * quantity) |
| totalPriceInUserCurrency |
number |
12 |
Line item total price in user currency (number of items * quantity) |
| updateCountAction |
text |
1024 |
Url to perfom update on the quantity field in the shopping cart |
| userCurrency |
|
|
|
| vendor |
text |
100 |
Product vendor |
| yousavemoney |
number |
12 |
The difference between market price and site price in product currency |
| youSaveMoneyInUserCurrency |
number |
12 |
The difference between market price and site price in user currency |
| yousavepercent |
number |
12 |
Percent difference between market price and site price |
shoppingCartItems - Examples
Example 1 - shoppingCartItems tqtag example to display items for the customer shopping cart
<tqtag name="emptyShoppingCart2" type="alternative" >
<li><span>No Items In Shopping Cart</span></li>
</tqtag>
<tqtag type="shoppingCartItems" alternativeTag="emptyShoppingCart2" alternativeCondition="isShoppingCartEmpty" >
<li>
<div>
<a href="/?product=@id@&lineItem=@lineItemID@"><img src="@productSmallImage@" alt="@title@" />
<span>@catalogID@</span></a>
</div>
<div>
<a href="/?product=@id@&lineItem=@lineItemID@"><span>@productName@</span></a>
<span>@shortDescription@<br /><b>Vendor:</b>@vendor@ <br />@productProperties@<br />@stockAffectingProperties@</span>
</div>
<div><span>real price@realPriceInUserCurrency@</span> our price: @priceInUserCurrency@<br />(you save: @yousavepercent@%)</div>
<div>
<form action="@updateCountAction@" method="post">
<input type="text" id="@rowID@" value="@itemsCount@" align="middle" /><a href="javascript:location.href='@updateCountAction@'">update quantity</a>
</form>
<a href="javascript:location.href=@removeItemAction@">remove product</a>
</div>
<div class="col5">@totalPriceInUserCurrency@</div>
</li>
</tqtag>
shoppingCartItems - tqOptions
With the shoppingCartItems tqtag, you can use the following tqoptions:
head,
if,
lastItemInRow,
tail.