This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package J2Store | |
* @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org | |
* @license GNU GPL v3 or later | |
*/ | |
/** | |
* For override copy this file to [BACKEND_TEMPLATE_PATH]/html/com_j2store/myprofile/ordersummary.php | |
* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package J2Store | |
* @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org | |
* @license GNU GPL v3 or later | |
* This file is for email. | |
*/ | |
/** | |
* For override copy this file to [FRONTEND_TEMPLATE_PATH]/html/com_j2store/myprofile/orderitems.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
/** | |
* refresh cart when payment method changed | |
*/ | |
if (awdr_params.refresh_order_review == '1') { | |
$(document).on('change', 'input[name="payment_method"],input[name="billing_city"],input[name="billing_postcode"]', function () { | |
refreshCart(); | |
}); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_footer', function (){ | |
?> | |
<script> | |
(function($) { | |
$(document).ready(function($) { | |
function wdr_dynamic_pricestrikeout(currentObject){ | |
var awdr_qty_object = currentObject.closest('form').find('input[name="quantity"]'); | |
setTimeout(function() { | |
var $qty = awdr_qty_object.val(); | |
var $product_id = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Show only discounted price without strikeout for selected rule | |
* Products which has other rules will have strikeout | |
* */ | |
if(!function_exists('showOnlyDiscountPriceWithoutStrikeout')){ | |
function showOnlyDiscountPriceWithoutStrikeout($product, $discounts = false){ | |
$awdr_rules_to_exclude_strikeout = array(1); // REPLACE THE RULE IDS HERE FOR WHICH WE NEED TO EXCLUDE STRIKEOUT eg: array(10,12) | |
$price = $product->get_price(); | |
if($discounts == false){ | |
$discounts = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $price, $product, 1, $price, 'all', true, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Discount table | |
* | |
* This template can be overridden by copying it to yourtheme/advanced_woo_discount_rules/discount_table.php. | |
* | |
* HOWEVER, on occasion Discount rules will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('advanced_woo_discount_rules_cart_item_quantity', function ($cart_item_quantity){ | |
global $awdr_temp_qty_cal; | |
if($awdr_temp_qty_cal === true) $cart_item_quantity = 0; | |
return $cart_item_quantity; | |
}); | |
add_action('woocommerce_before_add_to_cart_form', function (){ | |
global $awdr_temp_qty_cal; | |
$awdr_temp_qty_cal = true; | |
global $product; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('woocommerce_before_cart', function(){ | |
if(class_exists('\Wdr\App\Controllers\DiscountCalculator')){ | |
\Wdr\App\Controllers\DiscountCalculator::getFreeshippingMethod(); | |
} | |
}, 9); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('advanced_woo_discount_rules_modify_price_html', function ($modify, $price_html, $product, $quantity){ | |
if($product->is_type(array('variable'))){ | |
$modify = false; | |
} | |
return $modify; | |
}, 10, 4); |