EmicoEcommerce / Magento2Tweakwise

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

fix: case insensitive attribute slugs #191

Closed ah-net closed 2 weeks ago

ah-net commented 3 weeks ago

When you have an attribute (Green) with an uppercase. And an attribute with an lowercase it's possible that the slug cannot be found, and you get an wrong slug url. Tweakwise itself is case insensitive for filters, but the tweakwise slug table in magento isn't.

For example:

In this case you request an slug for the attribute 'green' and you get nothing (since only green. and Green are available). So no slug is available and the attribute name 'green' is used as an slug. When this slug is translated back to an value for tweakwise you get green. since this has the corresponding slug and not Green.

This pull request fixes that and returns green-1 for the attribute green. And translates it back to Green for TW (TW is case insensitive).