Skip to content

Instantly share code, notes, and snippets.

@nick2687
Created October 30, 2015 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nick2687/b36d30968488081cbc61 to your computer and use it in GitHub Desktop.
Save nick2687/b36d30968488081cbc61 to your computer and use it in GitHub Desktop.
This is the cart tpl where [[+cart.total.delivery_formatted]] is returning 0.00
[[!FormIt? &store=`1` &hooks=`spam,redirect` &submitVar=`checkout` &redirectTo=`[[*id:scFirstChild]]` ]] [[!scCartUpdate]]
<div id="simplecart">
<form action="[[~[[*id]]]]" method="post" id="form_cartoverview">
<input type="hidden" name="updatecart" value="true" />
<div class="table-responsive bottommargin">
<table class="table cart">
<thead>
<tr>
<th class="cart-product-remove">&nbsp;</th>
<th class="cart-product-name">[[%simplecart.cart.description]]</th>
<th class="cart-product-price">[[%simplecart.cart.price]]</th>
<th class="cart-product-quantity">[[%simplecart.cart.quantity]]</th>
<th class="cart-product-subtotal">[[%simplecart.cart.subtotal]]</th>
</tr>
</thead>
<tbody>
[[+cart.wrapper]]
<tr class="cart_item">
<td colspan="6">
<div class="row clearfix">
<div class="col-md-4 col-xs-4 nopadding">
</div>
<div class="col-md-8 col-xs-8 nopadding">
<input type="submit" class="button button-3d nomargin fright" value="[[%simplecart.cart.update]]" />
<a href="shop.html" class="button button-3d notopmargin fright">Proceed to Checkout</a>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-md-4">
[[!scCouponCode]]
</div>
</div>
<div class="row clearfix">
<div class="col-md-6 clearfix">
<h4>[[%simplecart.cart.delivery_method]]</h4>
<form action="[[~[[*id]]]]" method="post" id="form_deliverymethod">
[[!scDeliveryMethods]]
<div class="submit">
<input type="submit" name="checkout" value="[[%simplecart.cart.checkout]]" />
</div>
</form>
</div>
<div class="col-md-6 clearfix">
<div class="table-responsive">
<h4>Cart Totals</h4>
<table class="table cart">
<tbody>
<tr class="cart_item">
<td class="cart-product-name">
<strong>Cart Subtotal</strong>
</td>
<td>[[+cart.total.price_ex_vat_formatted]]</td>
</tr>
[[+cart.total.discount:notempty=`
<tr class="cart_item">
<td class="cart-product-name">
<strong>Discount</strong> [[+cart.total.discount_percent:notempty=`- ([[+cart.total.discount_percent]]%)`:isempty=``]]</td>
<td>- [[+cart.total.discount_formatted]]</td>
</tr>`:isempty=``]]
<tr class="cart_item">
<td class="cart-product-name">
<strong>HST</strong>
</td>
<td>[[+cart.total.vat_total_formatted]]</td>
</tr>
<tr class="cart_item">
<td class="cart-product-name">
<strong>Delivery</strong>
</td>
<td class="">[[+cart.total.delivery_formatted]]</td>
</tr>
<tr class="cart_item">
<td class="cart-product-name">
<strong>Cart Total </strong>
</td>
<td class="">[[+cart.total.price_formatted]]</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment