Okay
  Public Ticket #3399029
Discount Rules on Discounted Price
Closed

Comments

  • Eduard started the conversation

    Hi,

    Question. B2BKing has the option to set up rules. Like 15% discount for all our B2B customers. 

    Is it possible to apply this 15% discount on an already discounted normal-store-price? 

    e.g.: A product is priced $100. In our normal store we have applied a discount of 10% so it's $90. For our B2B customers we want 15% discount applied on the $90 and not on the 'normal' price of $100.

    Would that be possible. And if so, how can we do that?

  •  1,906
    WebWizards replied

    Hi Eduard,

    Thank you for getting in touch with us,


    It's possible to achieve this by adding the following PHP code snippet to your site:

    add_filter('b2bking_discount_rules_start_with_sale_price','__return_true');
    

    A PHP snippet can be added to functions.php, or by following our guide here: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/

    Let me show an example of how this works:

    I have a product with a price of $1000 and a sale price of $900:

    8553944995.png

    On the frontend:

    2852994492.png



    Then if I add a 10% discount rule:

    1403710833.png

    A further discount is added:

    6819993175.png



    Kind regards,

    Stefan