Elasticsuite: Filter apply bug on Swatches Request

Created on 13 Apr 2017  路  2Comments  路  Source: Smile-SA/elasticsuite

When you apply a filter...let say "size" like HERE this module change the original url like this:

http://xxxx?size=[value] FOR http://xxxx?size=[label] OR http://xxxx?size=[label1,label2]

So while this works like a charm for regular product listing, magento swatches module is using these params to grab the images to load/show, from the server and it can't support labels as values (needs option id)

Preconditions

Nothing Special

Magento Version: CE/EE 2.(ANY)
ElasticSuite Version: N/A
Environment: N/A
Third party modules : N/A

Steps to reproduce

  1. Go to http://demo.magento-elastic-suite.io/index.php/women/tops-women.html?size=XS
  2. Then Apply a color filter to any product

Expected result

  1. Product Image is updated to selected color

Actual result

  1. Product image is updated to default (configurable) image.

Technical Background

I found the bug looking into MagentoSwatchesControllerAjaxMedia basically magento is waiting for an attribute option value and it's receiving either a label or an array of labels, by now we've fixed this changing the labels for values when a single attribute is selected and removed the filter when more than one are used, this workaround fit our necessities but wouldn't be a real solution.

I've attached an example of a Product list request VS a Product View one.
Product List Request:

screen shot 2017-04-13 at 12 00 20

Product View Request:

screen shot 2017-04-13 at 12 01 43

bug

Most helpful comment

Hello, and thank you for submitting this one.

You are right, there is a bug here.

But when I was investigating, I found there was also many issues with swatches since Magento 2.1.6 update.

I will fix them and provide a global fix for all swatches related issues.

Best regards,

All 2 comments

Hello, and thank you for submitting this one.

You are right, there is a bug here.

But when I was investigating, I found there was also many issues with swatches since Magento 2.1.6 update.

I will fix them and provide a global fix for all swatches related issues.

Best regards,

Fixed by PR #399 . Please wait for the next minor 2.3 release or feel free to use the 2.3.x branch while waiting for it.

Best regards,

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JonathanBBD picture JonathanBBD  路  3Comments

shamoon picture shamoon  路  3Comments

rvitaliy picture rvitaliy  路  3Comments

ghost picture ghost  路  4Comments

DanieliMi picture DanieliMi  路  5Comments