Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }, GloboFilter.prototype.quickView = function(t) {
- return gF.ajax({
- url: t + "?view=gf_quickview",
- type: "get",
- dataType: "html",
- success: function(t) {
- gF("body").addClass("modal-open").append(t), gF("#product-images-product-quickview-template").owlCarousel({
- loop: !0,
- margin: 0,
- items: 1,
- dots: !0,
- navText: ['<i class="fa fa-angle-left" aria-hidden="true"></i>', '<i class="fa fa-angle-right" aria-hidden="true"></i>'],
- nav: !0
- }), gF(".gfqv-close-modal").click(function() {
- return gF(".quick-view-modal").fadeOut(300, function() {
- gF(".quick-view-modal").remove()
- }), gF("body").removeClass("modal-open"), !1
- }), gF(".quantity .decrease").click(function() {
- if ((t = parseInt(gF(this).next("input").val()) - 1) < 1) var t = 1;
- gF(this).next().val(t)
- }), gF(".quantity .increase").click(function() {
- var t = parseInt(gF(this).prev("input").val());
- gF(this).prev().val(t + 1)
- }), gF("#gfqv-select").change(function() {
- var t = JSON.parse(document.getElementById("ProductJson-product-template").innerHTML),
- e = gF(this).val();
- gF.each(t.variants, function(t, i) {
- if (i.id == e)
- if (i && i.available) {
- gF("#gfqv-btn").removeAttr("disabled").removeClass("disabled");
- var n = GLiquid.parse("{{ price | money }}");
- if (gF("#product-quickview-price .money").html(n.render({
- price: i.price
- })), i.price < i.compare_at_price) {
- var r = GLiquid.parse("{{ price | money }}");
- gF("#product-quickview-oldprice .money").html(r.render({
- price: i.compare_at_price
- })).show()
- } else gF("#product-quickview-oldprice .money").hide()
- } else gF("#quickview-template-submit").addClass("disabled").attr("disabled", "disabled")
- })
- })
- }
- }), !1
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement