Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var __isp_options = {
- isp_serp_callback: function() {
- $jquery_isp('.isp_grid_product').each(function () {
- var p_c, p = 0.00;
- var id = $jquery_isp(this).attr('product_id');
- if ($jquery_isp(this).find("span.isp_product_price.isp_compare_at_price_exist").length > 0){
- p_c = parseFloat($jquery_isp(this).find("span.isp_product_price.isp_compare_at_price_exist").text().replace("$",""));
- p = parseFloat($jquery_isp(this).find(".isp_compare_at_price").text().replace("$",""));
- }
- if (ISP_PRODUCTS[id] && $jquery_isp(this).find(".product_discount_p").length == 0 && p_c > 0)
- {
- var discount = 100- Math.round((p_c / p)*100);
- $jquery_isp(this).find("span.isp_product_price.isp_compare_at_price_exist.money").after(
- '<span class="product_discount_p">('+ discount +'% OFF!)</span>');
- }
- });
- },
- isp_serp_quickview_callback: function() {
- $jquery_isp('.isp_grid_product').each(function () {
- var p_c,p = 0.00;
- var id = $jquery_isp(".isp_quick_view_title").attr("product_id");
- if ($jquery_isp(this).find("span.isp_product_price.isp_compare_at_price_exist").length > 0){
- p_c = parseFloat($jquery_isp(this).find("span.isp_product_price.isp_compare_at_price_exist").text().replace("$",""))
- p = parseFloat($jquery_isp(this).find(".isp_compare_at_price").text().replace("$",""));
- }
- if (ISP_PRODUCTS[id] && $jquery_isp(this).find(".product_discount_p").length == 0 && p_c > 0 ) {
- var discount =100- Math.round((p_c / p)*100);
- $jquery_isp(this).find("span.isp_product_price.isp_compare_at_price_exist.money").after(
- '<span class="product_discount_p">*'+ discount +'% OFF!*</span>');
- }
- });
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement