Public Ticket #3832853

Customize Price / Bulk update

Closed
Comments
1 Ticket
Benjamin started the conversation 2 years ago on March 6, 2025 at 12:55am

Hi, I have created a Dynamic Rule that gives a discount per percentage of 10% to a customer that belongs to Group called "Grupo 1%". Also editing the categories I set that for all my products apply this discount see attachment_1

First problem: 

The prices appear first the original price, and after the price with the discount and also a banner (see attachment_2) ¿there is a easy way to only show the discount price? I could "hide" the original price with css but I dont like so much that solution. And this original prices are showed on diferent pages and sections. 

Attached files:

2,762
KingsPlugins replied 2 years ago on March 6, 2025 at 5:11pm

Hello Benjamin,

Thank you for purchasing our plugin,

 

I understand that you'd like to show that discounted price as if it was the regular price, not showing the discount.

I believe you can achieve that by adding the following PHP code snippet to your site:

add_filter('b2bking_dynamic_recalculate_sale_price_badge', '__return_false');
add_filter('b2bking_dynamic_recalculate_sale_price_display', function($price_html, $product, $sale_price){
    return wc_price($sale_price);
}, 10, 3);

This snippet can be added to functions.php, or by following our guide here: https://b2bkingplugin.com/docs/how-to-add-a-snippet-php-or-js/

 

Let me know if that works for you or if there's anything I can do to assist,

Kind regards,

Stefan

Sign In