Okay
  Public Ticket #4412948
Discount by brand
Closed

Comments

  •  2
    Ryan Klatt started the conversation

    I'd like to see the ability to setup different wholesale discounts tiers per brand. There's many customer sites where they have percentage discounts that differ based on the brand. So it makes it more difficult to manage when the discounts are based off categories only. Let me know if that would be possible. The brands plugin is not built into WooCommerce by default for free. I know this could be useful for many others too.

  •  2,510
    WebWizards replied

    Hi Ryan,

    It is possible to set wholesale prices based on brands using B2BKing's dynamic rules functionality.

    While the default rule conditions are based on products, categories, and tags, you can also set up rules using custom taxonomies like brands. 

     

    To do that, add this code snippet to your site:

    add_filter('b2bking_dynamic_rules_taxonomy_option', function($val){
        return 'product_brand';
    }, 10, 1);
    add_filter('b2bking_custom_taxonomy_backend_name', function($name){
        return 'Brand Name';
    }, 10, 1);

     

    You should then be able to see brands available in dynamic rule configuration:

    8848721643.png

     

    I didn't fully understand, are you using a different brands plugin, other than the Woo brands functionality? That should work as well, but you would need to change 'product_brand' in the above code, with the slug of your taxonomy. It may be simply 'brand', or something else like 'wp_brand', etc.

     

    Kind regards,

    Stefan