Okay
  Public Ticket #4162632
Dynamic rule - cannot add multiple products or brands to discounts
Open

Comments

  • akash patel started the conversation

    Hi, I am trying to add multiple products and brands into my dynamic discounts. However currently we cannot see any products and brands displayed on the dynamic rule pricing for us to pick. Only currently categories are being displayed.

    Please can you let me know why this is happening.

  •  2,479
    WebWizards replied

    Hi Akash,

    (1) I believe the reason products are not showing up in your dynamic rule dropdown is due to a specific setting:

    -> Please go to B2BKing → Settings → Other, and disable the setting "Dynamic rules: replace product dropdown". This setting is designed to remove products from dropdowns to allow manual product ID entry instead, but in your case it's preventing the products from displaying as needed.

     

    (2) Regarding brands, by default B2BKing does not show brands in rules. However you can enable that by adding this PHP code snippet:

    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);

     

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

    8848721643.png

     

    Please check if that can solve it for you,

    Kind regards,
    Stefan

  • akash patel replied

    hi, yes worked for brands.


    Is there a code to get the product tags also available for dynamic rules?

    As product tags are not there currently 

  •  2,479
    WebWizards replied

    Hi Akash,

    Unfortunately it's currently only possible to have either product tags or brands enabled in dynamic rules at one time, but not both simultaneously.

    This limitation exists due to indexing and performance considerations - adding support for multiple taxonomies would negatively impact the plugin's performance in queries.

    Kind regards,
    Stefan