Okay
  Public Ticket #3836110
Discount based on brands
Closed

Comments

  • thikimania started the conversation

    We use the Porto theme on a site and there are product brands. Can we set up B2B King to make discounts apart from the b2b price, based on brands? The brands are implemented in the theme.

  •  2,361
    WebWizards replied

    Hi there,

    It is possible, with a code snippet, to also add support for a custom taxonomy in dynamic rules - usually the brand is a taxonomy.

    The snippet to add is:

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

    Here it sets it to a 'brand' taxonomy instead (assuming that's the slug of the taxonomy and not something else).

    That should result in brands becoming available for selection in rules:

    8848721643.png

     

    Let me know if that works for you,

    Kind regards,

    Stefan