PageSourceSearch

https://qbspowersports.com/plugins/hikashop/cartnotify/media/notify.js

js qbspowersports.com collected 2026-10-08 10:08:57 UTC 2,997 bytes, 77 lines download raw bytes

1window.cartNotifyParams = {
2	img_url: null,
3	title:"Product added to cart",
4	text:"Product successfully added to the cart",
5	wishlist_title:"Product added to wishlist",
6	wishlist_text:"Product successfully added to the wishlist",
7	err_title:"Error",
8	err_text:"The product cannot be added to the cart",
9	err_wishlist_title:"Error",
10	err_wishlist_text:"The product cannot be added to the wishlist"
11};
12if(window.Oby) {
13window.Oby.registerAjax(["cart.updated","wishlist.updated"],function(params){
14	var cart = (params.type == "cart"),
15		p = window.cartNotifyParams,
16		img_url = p.img_url,
17		title = cart ? p.title : p.wishlist_title,
18		text = cart ? p.text : p.wishlist_text,
19		class_name = "info", success = true;
20
21	if(params.notify === false)
22		return;
23
24	if(params.resp.ret == 0) {
25		class_name = "warning";
26		title = cart ? p.err_title : p.err_wishlist_title;
27		text = cart ? p.err_text : p.err_wishlist_text;
28		success = false;
29		if(!cart && params.resp.err_wishlist_guest && p.err_wishlist_guest) {
30			p.redirect_url = p.err_wishlist_guest;
31			success = true;
32		}
33
34	}else if(params.product_id == 'list' && !params.resp.product_name){
35		title = cart ? p.list_title : p.list_wishlist_title;
36		text = cart ? p.list_text : p.list_wishlist_text;
37	}
38	if(params.resp.image)
39		img_url = params.resp.image;
40	if(params.resp.product_name)
41		title = params.resp.product_name;
42	if(params.resp.message)
43		text = params.resp.message;
44	else if(params.resp.messages && params.resp.messages[0] && params.resp.messages[0].msg) {
45		text = params.resp.messages[0].msg;
46	}
47
48	if(params.resp.messages && params.resp.messages[0] && params.resp.messages[0].type)
49		class_name = params.resp.messages[0].type;
50	if(!hkjQuery.notify) {
51		console.error('jQuery has been reInitialized after the notify plugin was added to it and thus it is missing. This leads to the add to cart notification box not appearing. To fix that, you\'ll probably have to use the extension jQuery Easy.');
52	}
53	try {
54		if(p && p.reference && p.reference == 'button' && params.el) {
55			hkjQuery(params.el).notify({title:title,text:text,image:"<img src=\""+img_url+"\" width=\"50\" height=\"50\" alt=\"\"/>"},{style:"metro",className:class_name,arrowShow:true});
56		}else if(img_url == null) {
57			hkjQuery.notify({title:title,text:text},{style:"metro-lite",className:class_name});
58		} else {
59			hkjQuery.notify({title:title,text:text,image:"<img src=\""+img_url+"\" alt=\"\"/>"},{style:"metro",className:class_name});
60		}
61		notificationBoxes = document.querySelectorAll('.notifyjs-hidable');
62		if(notificationBoxes && notificationBoxes.length) {
63			notificationBoxes[notificationBoxes.length-1].classList.add('hikashop-cartnotify-'+params.type);
64		}
65	} catch (error) {
66		console.error(error);
67	}
68
69	if(success && p.redirect_url && (cart || params.resp.err_wishlist_guest && p.err_wishlist_guest)) {
70		if(!p.redirect_delay)
71			p.redirect_delay = 4000;
72		setTimeout(function(){ window.location = p.redirect_url; }, p.redirect_delay);
73	}
74
75	return true;
76});
77}

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.