EmicoEcommerce / Magento2Tweakwise

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

better fix for duplicate store codes in url #141

Closed sanderjongsma closed 5 months ago

sanderjongsma commented 8 months ago

With \parse_url() the storecode will be added to the $categoryUrlPath when web/url/use_store is enabled, that's why later in the code duplicate values are removed with implode('/', array_unique(explode('/', $url))); or the other technique in PathSlugStrategy.

But this will also filter out deliberate duplicate values, like /men/lifestyle/clothes/sweaters/sweaters to /men/lifestyle/clothes/sweaters. So with this MR we change \parse_url() and just strip off the base url directly with a string replace. Because the base url also has te store code in it, when the web/url/use_store is enabled, so the path will never have the store code in it and we don't need tricks to strip of duplicate values.

ah-net commented 7 months ago

@sanderjongsma Does the problem still persist in the latest version? There where some changes to it and it may have resolved your issue.

ah-net commented 5 months ago

Closed due to inactivity