Cart    Account    Contact    Newsletter Signup    Showcase    Login    Signup

Developers Docs

Cart

The cart tag contains all of the items currently stored in the users cart. The cart tag automatically wraps the content in a form so that it can be posted to update the quantity. Hint: You can use the cart_items tag to create an empty cart message. Check out http://demo.brilliantretail.com/cart for a live demo.

Parameters
  • form (optional | default = 'yes' ) - Set to 'no' if you do not want the items loop wrapped in a form. Example can be seen in the checkout/index template. 
Internal Tags
  • items (pair) - Contain cart items.
    • base (single) - The base price for the item
    • discount (single) - The discount applied to the item
    • hash (single) -The unique hash stored for the cart item. Used for removing and quantity updating. Refer to the example below on how to add an input to update quantity.
    • image_large (single) - The large product image specified in the product admin.
    • image_thumb (single) - The thumbnail for the product image specified in the admin. 
    • options (single) - The options assigned to the item.
    • price (single) - The item price.
    • price_html (single) - HTML formatted price.
    • product_id (single) - The product id for the item.
    • quantity (single) - The quantity of the item in the cart.
    • remove_link (single) - Link to remove the item from the cart. Generates a url.
    • shippable (single | values = 0 or 1) - Is the product calculated in shipping costs.
    • sku (single) - The products unique SKU
    • subtotal (single) - The row subtotal (quantity * price)
    • taxable (single | values = 0 or 1) - Is the item taxable.
    • title (single) -The product title
    • type_id (single) - Product type id
    • url_title (single) - Product URL
    • weight (single) - Product Weight
Example from Blank template: (file: cart/index)

{exp:brilliant_retail:cart}        

     <a href="{exp:brilliant_retail:cart_clear_link}" id="empty_cart">empty cart</a>
    
      {items}
            <tr>
                <td class="col1"><a href="{remove_link}"><img src="{theme}/images/remove.jpg" alt="Remove" title="Remove Item" /></a></td>
                <td class="col2"><table><tr><td>{exp:brilliant_retail:image src="{image_thumb}" width="75" height="90"}</td></tr></table></td>
                <td class="col3">
                    <h5><a href="{path='product/{url_title}'}">{title}</a></h5>
                       {options}
                </td>
                <td class="col4">
                    <input name="qty[{hash}]" class="qty" type="text" value="{quantity}" /></td>
                <td class="col5">{price_html}</td>
                <td class="col5">{subtotal}</td>
            </tr>
     {/items}
           
{/exp:brilliant_retail:cart}

Comments

Add Your Comments


You must be logged in to comment.