File manager - Edit - /home/verseaumee/empowernetkenyajuly2026/cartnotify.tar
Back
media/notify-metro.css 0000644 00000001741 15252030025 0010766 0 ustar 00 .notifyjs-metro-base, .notifyjs-metro-lite-base{ position: relative; min-height: 52px; color:#444; } .notifyjs-metro-base .image { display: table; position: absolute; height: auto; width: auto; left: 25px; top: 50%; -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .notifyjs-metro-base .text-wrapper, .notifyjs-metro-lite-base .text-wrapper { display: inline-block; vertical-align: top; text-align: left; clear: both; font-family: 'Segoe UI'; } .notifyjs-metro-base .text-wrapper { margin: 10px 10px 10px 52px; } .notifyjs-metro-base .title, .notifyjs-metro-lite-base .title { font-size: 15px; font-weight: bold; } .notifyjs-metro-base .text, .notifyjs-metro-lite-base .text { font-size: 12px; font-weight: normal; vertical-align: middle; } .notifyjs-container { min-width:250px; } media/notify-vex.js 0000644 00000004140 15252030025 0010262 0 ustar 00 if(window.Oby) { window.Oby.registerAjax(["cart.updated","wishlist.updated"],function(params){ var cart = (params.type == "cart"), p = window.cartNotifyParams, img_url = p.img_url, title = cart ? p.title : p.wishlist_title, text = cart ? p.text : p.wishlist_text, class_name = "info"; if(params.notify === false) return; if(params.resp.ret == 0) { class_name = "warning"; title = cart ? p.err_title : p.err_wishlist_title; text = cart ? p.err_text : p.err_wishlist_text; if(!cart && params.resp.err_wishlist_guest && p.err_wishlist_guest) { p.redirect_url = p.err_wishlist_guest; } }else if(params.product_id == 'list' && !params.resp.product_name){ title = cart ? p.list_title : p.list_wishlist_title; text = cart ? p.list_text : p.list_wishlist_text; } if(params.resp.image) img_url = params.resp.image; if(params.resp.product_name) title = params.resp.product_name; if(params.resp.message) text = params.resp.message; var content = ""; if(img_url == null) { content = "<div class=\"notifyjs-metro-lite-base\"><div class=\"text-wrapper\"><div class=\"title\">"+title+"</div><div class=\"text\">"+text+"</div></div></div>"; } else { content = "<div class=\"notifyjs-metro-base\"><div class=\"image\"><img src=\""+img_url+"\" width=\"50\" height=\"50\" alt=\"\"/></div><div class=\"text-wrapper\"><div class=\"title\">"+title+"</div><div class=\"text\">"+text+"</div></div></div>"; } var vex_params = {message: content}, params_key = params.type + (params.resp.ret == 0 ? '_err' : '') + '_params'; if(p[params_key]) { if(Object && Object.assign) vex_params = Object.assign(vex_params, p[params_key]); else vex_params = jQuery.extend(true, vex_params, p[params_key]); } vex.dialog.alert(vex_params); if(p.redirect_url) { if(!p.redirect_delay) p.redirect_delay = 4000; setTimeout(function(){ window.location = p.redirect_url; }, p.redirect_delay); } if(p.hide_delay && p.hide_delay > 0) { setTimeout(function(){ if(window.top.vex.closeAll) window.top.vex.closeAll(); }, p.hide_delay); } return true; }); } media/notify.js 0000644 00000005011 15252030025 0007460 0 ustar 00 window.cartNotifyParams = { img_url: null, title:"Product added to cart", text:"Product successfully added to the cart", wishlist_title:"Product added to wishlist", wishlist_text:"Product successfully added to the wishlist", err_title:"Error", err_text:"The product cannot be added to the cart", err_wishlist_title:"Error", err_wishlist_text:"The product cannot be added to the wishlist" }; if(window.Oby) { window.Oby.registerAjax(["cart.updated","wishlist.updated"],function(params){ var cart = (params.type == "cart"), p = window.cartNotifyParams, img_url = p.img_url, title = cart ? p.title : p.wishlist_title, text = cart ? p.text : p.wishlist_text, class_name = "info", success = true; if(params.notify === false) return; if(params.resp.ret == 0) { class_name = "warning"; title = cart ? p.err_title : p.err_wishlist_title; text = cart ? p.err_text : p.err_wishlist_text; success = false; if(!cart && params.resp.err_wishlist_guest && p.err_wishlist_guest) { p.redirect_url = p.err_wishlist_guest; success = true; } }else if(params.product_id == 'list' && !params.resp.product_name){ title = cart ? p.list_title : p.list_wishlist_title; text = cart ? p.list_text : p.list_wishlist_text; } if(params.resp.image) img_url = params.resp.image; if(params.resp.product_name) title = params.resp.product_name; if(params.resp.message) text = params.resp.message; if(params.resp.messages && params.resp.messages[0] && params.resp.messages[0].type) class_name = params.resp.messages[0].type; if(!hkjQuery.notify) { 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.'); } try { if(p && p.reference && p.reference == 'button' && params.el) { 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}); }else if(img_url == null) { hkjQuery.notify({title:title,text:text},{style:"metro-lite",className:class_name}); } else { hkjQuery.notify({title:title,text:text,image:"<img src=\""+img_url+"\" alt=\"\"/>"},{style:"metro",className:class_name}); } } catch (error) { console.error(error); } if(success && p.redirect_url) { if(!p.redirect_delay) p.redirect_delay = 4000; setTimeout(function(){ window.location = p.redirect_url; }, p.redirect_delay); } return true; }); } media/index.html 0000644 00000000054 15252030025 0007611 0 ustar 00 <html><body bgcolor="#FFFFFF"></body></html>