Static content to dynamic content

This commit is contained in:
badsuricate
2013-10-16 09:51:08 +02:00
parent 6ffeb2053c
commit 04bd135c94

View File

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