Static content to dynamic content
This commit is contained in:
@@ -54,70 +54,73 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{loop type="cart" name="cartloop"}
|
||||
{nocache}
|
||||
{loop type="cart" name="cartloop"}
|
||||
|
||||
<tr>
|
||||
<td class="image">
|
||||
<a href="{$PRODUCT_URL}" class="thumbnail">
|
||||
{assign "cart_count" $LOOP_COUNT}
|
||||
{ifloop rel='product-image'}
|
||||
{loop type="image" name="product-image" product=$PRODUCT_ID limit="1" width="118" height="85" force_return="true"}
|
||||
<img src="{$IMAGE_URL}" alt="Product #{$cart_count}"></a>
|
||||
{/loop}
|
||||
{/ifloop}
|
||||
{elseloop rel="product-image"}
|
||||
{images file='assets/img/product/1/118x85.png'}<img itemprop="image" src="{$asset_url}" alt="Product #{$cart_count}">{/images}
|
||||
{/elseloop}
|
||||
</td>
|
||||
<td class="product" >
|
||||
<h3 class="name"><a href="product-details.php">
|
||||
Product #{$LOOP_COUNT}
|
||||
</a></h3>
|
||||
<div class="product-options">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{intl l="Available"} :</dt>
|
||||
<dd>{intl l="In Stock"}</dd>
|
||||
<dt>{intl l="No."}</dt>
|
||||
<dd>{$REF}</dd>
|
||||
{*<dt>Select Size</dt>
|
||||
<dd>Large</dd>
|
||||
<dt>Select Delivery Date</dt>
|
||||
<dd>Jan 2, 2013</dd>
|
||||
<dt>Additional Option</dt>
|
||||
<dd>Option 1</dd>*}
|
||||
</dl>
|
||||
</div>
|
||||
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove">{intl l="Remove"}</a>
|
||||
</td>
|
||||
<td class="unitprice">
|
||||
{if $IS_PROMO == 1}
|
||||
{assign "real_price" $PROMO_TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{currency attr="symbol"} {$PROMO_TAXED_PRICE}</span></div>
|
||||
<small class="old-price">{intl l="instead of"} <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
|
||||
{else}
|
||||
{assign "real_price" $TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></div>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="qty">
|
||||
<div class="form-group group-qty">
|
||||
<form action="{url path="/cart/update"}" method="post" role="form">
|
||||
<input type="hidden" name="cart_item" value="{$ITEM_ID}">
|
||||
<select name="quantity" class="form-control js-update-quantity">
|
||||
{for $will=1 to $STOCK}
|
||||
<option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option>
|
||||
{/for}
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
<td class="subprice">
|
||||
<span class="price">{currency attr="symbol"} {$real_price * $QUANTITY}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{/loop}
|
||||
<tr>
|
||||
<td class="image">
|
||||
<a href="{$PRODUCT_URL}" class="thumbnail">
|
||||
{assign "cart_count" $LOOP_COUNT}
|
||||
{ifloop rel='product-image'}
|
||||
{loop type="image" name="product-image" product=$PRODUCT_ID limit="1" width="118" height="85" force_return="true"}
|
||||
<img src="{$IMAGE_URL}" alt="Product #{$cart_count}"></a>
|
||||
{/loop}
|
||||
{/ifloop}
|
||||
{elseloop rel="product-image"}
|
||||
{images file='assets/img/product/1/118x85.png'}<img itemprop="image" src="{$asset_url}" alt="Product #{$cart_count}">{/images}
|
||||
{/elseloop}
|
||||
</td>
|
||||
<td class="product" >
|
||||
<h3 class="name"><a href="{$URL}">
|
||||
{$TITLE}
|
||||
</a></h3>
|
||||
<div class="product-options">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{intl l="Available"} :</dt>
|
||||
{if $STOCK > 0}
|
||||
<dd>{intl l="In Stock"}</dd>
|
||||
{else}
|
||||
<dd>{intl l="Out of Stock"}</dd>
|
||||
{/if}
|
||||
<dt>{intl l="No."}</dt>
|
||||
<dd>{$REF}</dd>
|
||||
{loop type="attribute_combination" name="product_options" product_sale_elements="$PRODUCT_SALE_ELEMENTS_ID"}
|
||||
<dt>{$ATTRIBUTE_TITLE}</dt>
|
||||
<dd>{$ATTRIBUTE_AVAILABILITY_TITLE}</dd>
|
||||
{/loop}
|
||||
</dl>
|
||||
</div>
|
||||
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove"><i class="icon-trash"></i> {intl l="Remove"}</a>
|
||||
</td>
|
||||
<td class="unitprice">
|
||||
{if $IS_PROMO == 1}
|
||||
{assign "real_price" $PROMO_TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{currency attr="symbol"} {$PROMO_TAXED_PRICE}</span></div>
|
||||
<small class="old-price">{intl l="instead of"} <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
|
||||
{else}
|
||||
{assign "real_price" $TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></div>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="qty">
|
||||
<div class="form-group group-qty">
|
||||
<form action="{url path="/cart/update"}" method="post" role="form">
|
||||
<input type="hidden" name="cart_item" value="{$ITEM_ID}">
|
||||
<select name="quantity" class="form-control js-update-quantity">
|
||||
{for $will=1 to $STOCK}
|
||||
<option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option>
|
||||
{/for}
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
<td class="subprice">
|
||||
<span class="price">{currency attr="symbol"} {$real_price * $QUANTITY}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{/loop}
|
||||
{/nocache}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr >
|
||||
@@ -137,38 +140,34 @@
|
||||
|
||||
</article>
|
||||
|
||||
<aside id="products-upsell" role="complementary" aria-labelledby="products-upsell-label">
|
||||
<div class="products-heading">
|
||||
<h3 id="products-upsell-label">{intl l="Upsell Products"}</h3>
|
||||
</div>
|
||||
{ifloop rel="product_upsell"}
|
||||
<aside id="products-upsell" role="complementary" aria-labelledby="products-upsell-label">
|
||||
<div class="products-heading">
|
||||
<h3 id="products-upsell-label">{intl l="Upsell Products"}</h3>
|
||||
</div>
|
||||
|
||||
<div class="products-content">
|
||||
<ul class="products-grid product-col-<?php echo $product_upsell; ?> hover-effect">
|
||||
<?php
|
||||
// Product Parameters
|
||||
$has_description = false; // Product without description
|
||||
$has_btn = false; // Product without button (Add to Cart)
|
||||
<div class="products-content">
|
||||
<ul class="products-grid product-col-5 hover-effect">
|
||||
{loop name="product_upsell" type="product" promo="yes" limit="5"}
|
||||
{include file="includes/single-product.html" product_id=$ID hasBtn=true hasDescription=true width="218" height="146"}
|
||||
{/loop}
|
||||
|
||||
for ($count = 1; $count <= $product_upsell; $count++) { ?>
|
||||
<li class="item">
|
||||
<?php include('inc/inc-product.php') ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</aside><!-- #products-upsell -->
|
||||
</ul>
|
||||
</div>
|
||||
</aside><!-- #products-upsell -->
|
||||
{/ifloop}
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($cart) {
|
||||
$cart('.js-update-quantity').on('change', function(e) {
|
||||
var newQuantity = $cart(this).val();
|
||||
<script type="text/javascript">
|
||||
jQuery(function($cart) {
|
||||
$cart('.js-update-quantity').on('change', function(e) {
|
||||
var newQuantity = $cart(this).val();
|
||||
|
||||
$cart(this).parent().submit();
|
||||
})
|
||||
});
|
||||
</script>
|
||||
$cart(this).parent().submit();
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user