PageSourceSearch

https://multimallapp.com/DesktopModules/eCommerce/Template/CustomList/Home/js/controller.js?cdv=608

js multimallapp.com collected 2026-10-08 03:26:20 UTC 4,472 bytes, 114 lines download raw bytes

1function CustomListHomeInit(Options) {
2    var id = '#customlist' + Options.ModuleId;
3    var template = '#customlisttemplate' + Options.ModuleId;
4    function BindList() {
5        $.ajax({
6            url: Options.ControlPath + "API/ProductWebApi/MultiProductList",
7            method: "POST",
8            dataType: "json",
9            async: true,
10            cache: true,
11            beforeSend: Options.sf.setModuleHeaders,
12            data: {
13                ProductId: Options.ProductId,
14                ModuleId: Options.StoreModuleId,
15                TabID: Options.TabID,
16                Categories: Options.Categories,
17                Sort: Options.Sort,
18                Available: Options.Available,
19                Special: Options.Special,
20                statuses: Options.statuses,
21                VendorId: Options.VendorId
22            },
23            success: function (data, status, xhr) {
24                HandlebarsIntl.registerWith(Handlebars);
25                var html = Handlebars.compile($(template).html());
26                $(id).html(html(data));
27
28                var swiper = new Swiper(".Home-Slider", {
29                    slidesPerView: 5,
30                    spaceBetween: 15,
31                    breakpoints: {
32                        0: {
33                            slidesPerView: 1.3,
34                            spaceBetween: 15
35                        },
36                        320: {
37                            slidesPerView: 2,
38                            spaceBetween: 15
39                        },
40                        480: {
41                            slidesPerView: 2.5,
42                            spaceBetween: 15
43                        },
44                        570: {
45                            slidesPerView: 3,
46                            spaceBetween: 15
47                        },
48                        768: {
49                            slidesPerView: 3.5,
50                            spaceBetween: 15
51                        },
52                        990: {
53                            slidesPerView: 5.2,
54                            spaceBetween: 15
55                        }
56                    }
57                });
58            }
59        });
60    }
61    $(document).on('click', "#customlist" + Options.ModuleId + " .quickshow", function (event) {
62        event.stopImmediatePropagation();
63
64        var $this = $(this);
65        $this.find('i').removeClass('fa-search');
66        $this.find('i').addClass('fa-refresh fa-refresh-animate');
67        var ProductId = $this.attr('data-id');
68        var Name = $this.attr('data-name');
69        $.ajax({
70            url: Options.ControlPath + "API/SkinWebApi/GetProductDetail",
71            method: "POST",
72            dataType: "json",
73            async: true,
74            cache: true,
75            beforeSend: Options.sf.setModuleHeaders,
76            data: { ProductId: ProductId, Name: Name },
77            success: function (data, status, xhr) {
78                var html = Handlebars.compile(data.Html);
79                $this.find('i').removeClass('fa-refresh fa-refresh-animate');
80                $this.find('i').addClass('fa-search');
81                $.fancybox.open(html(data.Product));
82                $(':input[required]').addClass('red-tooltip');
83                $('input.ModelItem').first().prop('checked', true);
84            }
85        });
86    });
87    $(document).on('click', "#customlist" + Options.ModuleId + " .addToBasket", function (event) {
88        event.stopImmediatePropagation();
89
90        var guid = OrderListFile.guid();
91        var ProductId = 0;
92        var ModelId = 0;
93
94        if ($(this).attr('data-id')) {
95            ProductId = parseInt($(this).attr('data-id'));
96            OrderListFile.add(ProductId, ModelId, 1, '', guid);
97        } else {
98            $('input.ModelItem:checked').each(function () {
99                ModelId = $(this).val();
100                OrderListFile.add(ProductId, ModelId, 1, '', guid);
101                $.fancybox.close();
102            });
103        }
104
105        try { AddToCartNotification(); } catch (ex) { }
106    });
107    $(document).on('click', "#customlist" + Options.ModuleId + " .addtowish", function (event) {
108        event.stopImmediatePropagation();
109
110        AddToWish($(this), Options.ControlPath, Options.StoreModuleId, Options.TabID);
111    });
112
113    setTimeout(function () { BindList(); }, 0);
114}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.