EmicoEcommerce / Magento2Tweakwise

Magento 2 module for Tweakwise integration
Other
4 stars 16 forks source link

Limit max number of products for group codes applied when not needed #178

Closed sergiozt closed 2 weeks ago

sergiozt commented 2 months ago

When the widget is inserted via the Admin area to the CMS page, the rule_id will be saved as a string, for example: "18" image

After that, the module during the request to Tweekwise will use the setting: "Limit max number of products for group codes" as there is a check if !is_int("18"), however these setting(limit) suppose to be used for group codes, but not to the templates.

Environment

Steps to reproduce

  1. Add the Tweawise widget to the home page
  2. Configure the widget that will show more than 5 products for instance
  3. Set the value to Admin > Stores > Configuration > Catalog > Tweakwise > Recommendations to setting "Limit max number of products for group codes" to 3
  4. Clean the cache and refresh the home page

Actual result

The number of products will be max 3

Expected result

The number of products won't be limited by 3

Possible fix: image OR: image