Suite à MAJ 2.3.4, il manquait des choses dans des templates
This commit is contained in:
@@ -47,8 +47,7 @@ var pseManager = (function($){
|
||||
"options": {},
|
||||
"pseId": null,
|
||||
"useFallback": false,
|
||||
"fallback": $("#pse-options .pse-fallback"),
|
||||
"thumbnails": $('#product-thumbnails')
|
||||
"fallback": $("#pse-options .pse-fallback")
|
||||
};
|
||||
}
|
||||
|
||||
@@ -137,6 +136,7 @@ var pseManager = (function($){
|
||||
selection;
|
||||
|
||||
if (PSE_COUNT > 1) {
|
||||
|
||||
if ($pse.useFallback) {
|
||||
pseId = $pse.fallback.val();
|
||||
} else {
|
||||
@@ -149,14 +149,12 @@ var pseManager = (function($){
|
||||
// not exists, revert
|
||||
displayNotice();
|
||||
setPseForm();
|
||||
selection = getFormSelection();
|
||||
pseId = pseExist(selection);
|
||||
} else {
|
||||
$pse.validity.hide();
|
||||
}
|
||||
}
|
||||
|
||||
$pse.id.val(pseId).trigger('change.pse', pseId);
|
||||
$pse.id.val(pseId);
|
||||
$pse.pseId = pseId;
|
||||
}
|
||||
|
||||
@@ -238,32 +236,6 @@ var pseManager = (function($){
|
||||
} else {
|
||||
$pse.priceOld.html("");
|
||||
$pse.price.html(pse.price);
|
||||
}
|
||||
|
||||
// images
|
||||
if (pse.images.length > 0) {
|
||||
i = 0;
|
||||
$pse.thumbnails.find('.thumbnail').each(function() {
|
||||
if (jQuery.inArray($(this).data('thumbId'), pse.images) !== -1) {
|
||||
$(this).filter('.disabled').removeClass('disabled');
|
||||
|
||||
if (i === 0) {
|
||||
if (!$(this).hasClass('active')) {
|
||||
$pse.thumbnails.find('.thumbnail.active').removeClass('active');
|
||||
$('.product-image > img', $(this).closest("#product-gallery")).attr('src',$(this).attr('href'));
|
||||
$(this).addClass('active');
|
||||
if ($(this).filter(":visible").length != 1) {
|
||||
$pse.thumbnails.carousel('next');
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
$(this).not('.disabled').addClass('disabled');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$pse.thumbnails.find('.thumbnail.disabled').removeClass('disabled');
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -496,14 +468,13 @@ var pseManager = (function($){
|
||||
if (doAjax) {
|
||||
var url_action = $(this).attr("action"),
|
||||
product_id = $("input[name$='product_id']",this).val(),
|
||||
pse_id = $("input.pse-id",this).val(),
|
||||
quantity = $("#quantity",this).val();
|
||||
pse_id = $("input.pse-id",this).val();
|
||||
|
||||
$.ajax({type: "POST", data: $(this).serialize(), url: url_action,
|
||||
success: function(data){
|
||||
$(".cart-container").html($(data).html());
|
||||
// addCartMessageUrl is initialized in layout.tpl
|
||||
$.ajax({url:addCartMessageUrl, data:{ product_id: product_id, pse_id: pse_id, quantity: quantity },
|
||||
$.ajax({url:addCartMessageUrl, data:{ product_id: product_id, pse_id: pse_id },
|
||||
success: function (data) {
|
||||
// Hide all currently active bootbox dialogs
|
||||
bootbox.hideAll();
|
||||
|
||||
Reference in New Issue
Block a user