"+proName+" "+data.option_html+"
"+data.price+" Add to Cart
";
jQuery(".wk-ajaxcart-option-container").append(resultantHtml);
new VarienForm("product_addtocart_form");
jQuery(".wk-ajaxcart-wrapper").show();
}
jQuery(".product_option_loader_bg").hide();
}
});
}
function addtocartproduct(productId, imgSrc, imgAlt, productName){
// event.preventDefault();
jQuery(".wk-list-msg").remove();
jQuery(".product_option_loader_bg").show();
jQuery.ajax({
url : "https://store.webkul.com/ajaxcart/index/add/",
type : "POST",
data : { id : productId },
success : function (data) {
if(data.has_options == 1) {
jQuery(".wk-ajaxcart-option-container").html(data.option_script);
resultantHtml = "
"+productName+" "+data.option_html+""+data.price+" Add to Cart
";
resultantHtml = "
"+productName+" "+data.option_html+"
"+data.price+" Add to Cart
";
jQuery(".wk-ajaxcart-option-container").append(resultantHtml);
new VarienForm("product_addtocart_form");
jQuery(".wk-ajaxcart-wrapper").show();
}
jQuery(".product_option_loader_bg").hide();
}
});
}
function addprotocart(submitUrl){
if(addToCartForm.validator.validate() != false){
jQuery(".product_option_loader_bg").show();
jQuery.ajax({
url : submitUrl,
type : "POST",
data : jQuery("#product_addtocart_form").serialize(),
success : function(data){
jQuery.ajax({
url : "https://store.webkul.com/ajaxcart/index/getminicart/",
dataType : "html",
type : "POST",
success : function(data){
jQuery("#wk-mini-cart").remove();
jQuery("#wk-mini-cart").remove();
jQuery(".ws-xs-search-show").after(data);
jQuery(".ws-actions").append(data);
jQuery(".wk-close-box").trigger("click");
jQuery("html, body").animate({ scrollTop : 0 }, 500, function() {
jQuery("#wk-mini-cart .ws-drp-list").addClass("ws-drp-active");
jQuery(".product_option_loader_bg").hide();
});
}
});
}
});
}
}