advcha
Forum Replies Created
-
Okay. it seemed not working. I tried to debug the Rule.php and Set.php.
First, I created a bundle discount rule like this https://ibb.co/MsgnGGn
then on my created landing page (https://premiumclasswp.kunciedev950526.dev/bundling/) at the bottom products , I want to display the discount price as well not only the original price. but it can’t show the discount.
here is my code on my child theme:if (class_exists('\Wdr\App\Helpers\Woocommerce')) { // see https://gist.github.com/AshlinRejo/c37a155a42c0e30beafbbad183f0c4e8 $product = \Wdr\App\Helpers\Woocommerce::getProduct($product_id); $original_price = $product->get_price(); $quantity = 2; // need to set the quantity same with the bundle set on woo discount rules $result = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $original_price, $product, $quantity, 0, 'discounted_price', true, false); if ($result !== false) { return "<del>" . $price . "</del><span>" . wc_price($result) . "</span>"; } }
note: product_id is the woocommerce product id.
This is important. I want to display the discount on the landing page even if the products bundle not on the cart. how to do it?
the funny thing is the discount would appear on the landing page if the one of the product still on the cart. it can’t show the discount if the cart filled with the 2 product bundle or the cart is empty.Hi. I want to show the discount on the custom page. I tried to use this code from https://gist.github.com/AshlinRejo/c37a155a42c0e30beafbbad183f0c4e8 but the discount only displayed when the product already in the cart. when I remove them on the cart, the discount is missing. I tried to set the $is_cart param to false like this:
$result = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', $original_price, $product, 1, 0, 'discounted_price', true, false);
but the discount still can’t be displayed. How to solve this?
Forum: Plugins
In reply to: [W3 Total Cache] How to change minified css file name?Hi. we got the same problem. Here is how we solved the unremoved cache problem. On the W3TC admin setting, pls go to ‘Browser cache’ setting then Check/Enable the option ‘Prevent caching of objects after settings change’. It’d add a suffix on the minified file.