Merge branch 'frontend' of https://github.com/thelia/thelia into frontend

This commit is contained in:
touffies
2013-10-16 12:47:52 +02:00
4 changed files with 150 additions and 145 deletions

View File

@@ -102,6 +102,7 @@ class Cart extends BaseLoop
->set("TAXED_PRICE", $cartItem->getTaxedPrice($taxCountry)) ->set("TAXED_PRICE", $cartItem->getTaxedPrice($taxCountry))
->set("PROMO_TAXED_PRICE", $cartItem->getTaxedPromoPrice($taxCountry)) ->set("PROMO_TAXED_PRICE", $cartItem->getTaxedPromoPrice($taxCountry))
->set("IS_PROMO", $cartItem->getPromo() === 1 ? 1 : 0); ->set("IS_PROMO", $cartItem->getPromo() === 1 ? 1 : 0);
$loopResultRow->set("PRODUCT_SALE_ELEMENTS_ID", $productSaleElement->getId());
$result->addRow($loopResultRow); $result->addRow($loopResultRow);
} }

View File

@@ -54,6 +54,7 @@
</thead> </thead>
<tbody> <tbody>
{nocache}
{loop type="cart" name="cartloop"} {loop type="cart" name="cartloop"}
<tr> <tr>
@@ -70,24 +71,26 @@
{/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>
{if $STOCK > 0}
<dd>{intl l="In Stock"}</dd> <dd>{intl l="In Stock"}</dd>
{else}
<dd>{intl l="Out of Stock"}</dd>
{/if}
<dt>{intl l="No."}</dt> <dt>{intl l="No."}</dt>
<dd>{$REF}</dd> <dd>{$REF}</dd>
{*<dt>Select Size</dt> {loop type="attribute_combination" name="product_options" product_sale_elements="$PRODUCT_SALE_ELEMENTS_ID"}
<dd>Large</dd> <dt>{$ATTRIBUTE_TITLE}</dt>
<dt>Select Delivery Date</dt> <dd>{$ATTRIBUTE_AVAILABILITY_TITLE}</dd>
<dd>Jan 2, 2013</dd> {/loop}
<dt>Additional Option</dt>
<dd>Option 1</dd>*}
</dl> </dl>
</div> </div>
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove">{intl l="Remove"}</a> <a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove"><i class="icon-trash"></i> {intl l="Remove"}</a>
</td> </td>
<td class="unitprice"> <td class="unitprice">
{if $IS_PROMO == 1} {if $IS_PROMO == 1}
@@ -117,7 +120,7 @@
</tr> </tr>
{/loop} {/loop}
{/nocache}
</tbody> </tbody>
<tfoot> <tfoot>
<tr > <tr >
@@ -137,26 +140,22 @@
</article> </article>
{ifloop rel="product_upsell"}
<aside id="products-upsell" role="complementary" aria-labelledby="products-upsell-label"> <aside id="products-upsell" role="complementary" aria-labelledby="products-upsell-label">
<div class="products-heading"> <div class="products-heading">
<h3 id="products-upsell-label">{intl l="Upsell Products"}</h3> <h3 id="products-upsell-label">{intl l="Upsell Products"}</h3>
</div> </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++) { ?>
<li class="item">
<?php include('inc/inc-product.php') ?>
</li>
<?php } ?>
</ul> </ul>
</div> </div>
</aside><!-- #products-upsell --> </aside><!-- #products-upsell -->
{/ifloop}
</div> </div>
{/block} {/block}

View File

@@ -0,0 +1,61 @@
{ifloop rel="cartloop"}
<div class="dropdown-menu cart-content">
<form id="form-cart-mini" action="{url path="/order/delivery"}" method="post" role="form">
<table class="table table-cart-mini">
<colgroup>
<col width="70">
<col>
<col width="100">
</colgroup>
<tbody>
{assign "total_price" 0}
{loop type="cart" name="cartloop"}
<tr>
<td class="image">
{ifloop rel="product-image"}
{loop type="image" name="product-image" product=$PRODUCT_ID limit="1" width="118" height="60"}
<img src="{$IMAGE_URL}" alt="{$TITLE}">
{/loop}
{/ifloop}
</td>
<td class="product">
<h3 class="name" style="margin:0"><a href="{$URL}">
{$TITLE}
</a></h3>
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove" data-tip="tooltip" data-title="Delete" data-original-title=""><i class="icon-trash"></i> <span>Remove</span></a>
</td>
<td class="unitprice text-center">
{if $IS_PROMO == 1}
{assign "real_price" $PROMO_TAXED_PRICE}
{else}
{assign "real_price" $TAXED_PRICE}
{/if}
<span class="qty">{$QUANTITY}</span> X <span class="price" style="font-size:1em;">{currency attr="symbol"}{$real_price}</span></div>
{assign "total_price" $total_price + ($QUANTITY * $real_price)}
</td>
</tr>
{/loop}
</tbody>
<tfoot>
<tr>
<td colspan="2" class="empty">
<a href="{url path="/cart"}" role="button" class="btn btn-default btn-sm"><span>View Cart</span></a>
<button type="submit" name="checkout" class="btn btn-warning btn-sm"><span>Checkout</span></button>
</td>
<td class="total">
<div class="total-price">
<span class="price">{currency attr="symbol"}{$total_price}</span>
</div>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
{/ifloop}
{elseloop rel="cartloop"}
<div class="dropdown-menu cart-content">
<p>You have no items in your shopping cart.</p>
</div>
{/elseloop}

View File

@@ -104,63 +104,7 @@ URL: http://www.thelia.net
<a href="{url path="/cart"}" rel="nofollow" class="cart"> <a href="{url path="/cart"}" rel="nofollow" class="cart">
Cart <span class="badge">{cart attr="count_item"}</span> Cart <span class="badge">{cart attr="count_item"}</span>
</a> </a>
<div class="dropdown-menu cart-content"> {include file="includes/mini-cart.html"}
<p>You have no items in your shopping cart.</p>
</div>
<div class="dropdown-menu cart-content">
<form id="form-cart-mini" action="cart-step2.php" method="post" role="form">
<table class="table table-cart-mini">
<colgroup>
<col width="70">
<col>
<col width="100">
</colgroup>
<tbody>
<tr>
<td class="image">
<a href="product-details.php" class="thumbnail"><img src="img/product/1/118x85.png" alt="Product #1"></a>
</td>
<td class="product">
<h3 class="name" style="margin:0"><a href="product-details.php">
Product #1
</a></h3>
<a href="?item=1&amp;qty=0" class="btn btn-remove" data-tip="tooltip" data-title="Delete" data-original-title=""><i class="icon-trash"></i> <span>Remove</span></a>
</td>
<td class="unitprice text-center">
<span class=="qty">2</span> X <span class="price" style="font-size:1em;">$50.00</span></div>
</td>
</tr>
<tr>
<td class="image">
<a href="product-details.php" class="thumbnail"><img src="img/product/1/118x85.png" alt="Product #2"></a>
</td>
<td class="product">
<h3 class="name" style="margin:0"><a href="product-details.php">
Product with very long name #2
</a></h3>
<a href="?item=1&amp;qty=0" class="btn btn-remove" data-tip="tooltip" data-title="Delete" data-original-title=""><i class="icon-trash"></i> <span>Remove</span></a>
</td>
<td class="unitprice text-center">
<span class=="qty">2</span> X <span class="price" style="font-size:1em;">$50.00</span></div>
</td>
</tr>
</tbody>
<tfoot>
<tr >
<td colspan="2" class="empty">
<a href="cart.php" role="button" class="btn btn-default btn-sm"><span>View Cart</span></a>
<button type="submit" name="checkout" class="btn btn-warning btn-sm"><span>Checkout</span></button>
</td>
<td class="total">
<div class="total-price">
<span class="price">$200.00</span>
</div>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
</li> </li>
</ul> </ul>
<ul class="nav navbar-nav navbar-categories"> <ul class="nav navbar-nav navbar-categories">