Added the combination attibutes on cart popup
This commit is contained in:
committed by
Julien Chanseaume
parent
691553060b
commit
e76ad60342
@@ -102,6 +102,7 @@ var pseManager = (function($){
|
|||||||
// not exists, revert
|
// not exists, revert
|
||||||
setPseForm();
|
setPseForm();
|
||||||
} else {
|
} else {
|
||||||
|
$pse.id.val(pseId);
|
||||||
$pse.pseId = pseId;
|
$pse.pseId = pseId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -359,12 +360,13 @@ var pseManager = (function($){
|
|||||||
$(document).on('submit.form-product', '.form-product', function () {
|
$(document).on('submit.form-product', '.form-product', function () {
|
||||||
if (doAjax) {
|
if (doAjax) {
|
||||||
var url_action = $(this).attr("action"),
|
var url_action = $(this).attr("action"),
|
||||||
product_id = $("input[name$='product_id']",this).val();
|
product_id = $("input[name$='product_id']",this).val(),
|
||||||
|
pse_id = $("input#pse-id",this).val();
|
||||||
|
|
||||||
$.ajax({type: "POST", data: $(this).serialize(), url: url_action,
|
$.ajax({type: "POST", data: $(this).serialize(), url: url_action,
|
||||||
success: function(data){
|
success: function(data){
|
||||||
$(".cart-container").html($(data).html());
|
$(".cart-container").html($(data).html());
|
||||||
$.ajax({url:"ajax/addCartMessage", data:{ product_id: product_id },
|
$.ajax({url:"ajax/addCartMessage", data:{ product_id: product_id, pse_id: pse_id },
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
// Hide all currently active bootbox dialogs
|
// Hide all currently active bootbox dialogs
|
||||||
bootbox.hideAll();
|
bootbox.hideAll();
|
||||||
|
|||||||
@@ -1,34 +1,38 @@
|
|||||||
{default_translation_domain domain='fo.default'}
|
{default_translation_domain domain='fo.default'}
|
||||||
{loop type="product" name="add_product_to_cart" id={product attr="id"}}
|
{loop type="product" name="add_product_to_cart" id={product attr="id"}}
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-md-4">
|
<td colspan="3">
|
||||||
{loop name="product_thumbnail" type="image" product=$ID width="218" height="146" resize_mode="borders" limit="1"}
|
<h3 class="text-center">{intl l="The product has been added to your cart" }</h3>
|
||||||
<img itemprop="image" src="{$IMAGE_URL}" alt="Product #{$LOOP_COUNT}">
|
</td>
|
||||||
{/loop}
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
<td class="col-md-4">
|
<td class="col-md-4">
|
||||||
<h2>{$TITLE}</h2>
|
{loop name="product_thumbnail" type="image" product=$ID width="218" height="146" resize_mode="borders" limit="1"}
|
||||||
{loop type="attribute_combination" name="product_options" product_sale_elements="$PRODUCT_SALE_ELEMENTS_ID"}
|
<img itemprop="image" src="{$IMAGE_URL}" alt="Product #{$LOOP_COUNT}">
|
||||||
<p>{$ATTRIBUTE_TITLE}</p>
|
{/loop}
|
||||||
<p>{$ATTRIBUTE_AVAILABILITY_TITLE}</p>
|
</td>
|
||||||
{/loop}
|
<td class="col-md-4">
|
||||||
</td>
|
<h2>{$TITLE}</h2>
|
||||||
<td class="col-md-4">
|
{loop type="attribute_combination" name="product_options" product_sale_elements="{$smarty.get.pse_id}"}
|
||||||
|
<p>{$ATTRIBUTE_TITLE} : {$ATTRIBUTE_AVAILABILITY_TITLE}</p>
|
||||||
|
{/loop}
|
||||||
|
</td>
|
||||||
|
<td class="col-md-4">
|
||||||
|
|
||||||
{if $IS_PROMO == 1}
|
{if $IS_PROMO == 1}
|
||||||
{assign "real_price" $TAXED_PROMO_PRICE}
|
{assign "real_price" $TAXED_PROMO_PRICE}
|
||||||
<div class="special-price"><span class="price">{$TAXED_PROMO_PRICE} {currency attr="symbol"}</span></div>
|
<div class="special-price"><span class="price">{$TAXED_PROMO_PRICE} {currency attr="symbol"}</span></div>
|
||||||
<small class="old-price"> <span class="price">{$TAXED_PRICE} {currency attr="symbol"}</span></small>
|
<small class="old-price"> <span class="price">{$TAXED_PRICE} {currency attr="symbol"}</span></small>
|
||||||
{else}
|
{else}
|
||||||
{assign "real_price" $TAXED_PRICE}
|
{assign "real_price" $TAXED_PRICE}
|
||||||
<div class="special-price"><span class="price">{$TAXED_PRICE} {currency attr="symbol"}</span></div>
|
<div class="special-price"><span class="price">{$TAXED_PRICE} {currency attr="symbol"}</span></div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<a href="{url path="/cart"}" role="button" class="btn btn_add_to_cart pull-right"><span>{intl l="View Cart"}</span></a>
|
<a href="{url path="/cart"}" role="button" class="btn btn_add_to_cart pull-right"><span>{intl l="View Cart"}</span></a>
|
||||||
<button type="button" class="btn btn-checkout pull-right" data-dismiss="modal"><span>{intl l="Continue Shopping"}</span></button>
|
<button type="button" class="btn btn-checkout pull-right" data-dismiss="modal"><span>{intl l="Continue Shopping"}</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user