Skip to content

BUG: Wrong selected product image when query url param configurable product #26473

Closed
@kylianleemkuil

Description

@kylianleemkuil

Summary of the issue (*)

In my webshop I have games and this games have different editions and a used and a new state.
Now I have one configurable product for example: "007 From Russia With Love" with a couple of simple products under it:

(Attribute) System

  1. PlayStation 2
  2. GameCube

(Attribute) State

  1. New
  2. Used

In my product listings I only show the configurable products but the product URL is changed to the specific system attribute in my condition it is: http://local.magento/007-from-russia-with-love.html#142=345 so it links to the specific simple product with that system already selected.

The price and the selected system attribute is correct on the productpage only the product image is not selected for this simple product. It takes the default image of the configurable product.

Preconditions (*)

  1. Magento 2.3.3
  2. MySQL 5.6.23
  3. Ubuntu 16.04.5 LTS (Docker container: https://hub.docker.com/r/alexcheng/magento2/)
  4. PHP 7.2.12

Steps to reproduce (*)

  1. Make a configurable product with a random image.
  2. Make 2 simple products under it with 2 attributes System,State(See summary) and the simple products need different images.
  3. Link to the productpage of the configurable product with # query like http://local.magento/007-from-russia-with-love.html#142=345 so that a system is already selected. Ofcourse change the '142' to your attribute super id and the '345' with a option of the attribute.
  4. Check if it shows image of Configurable product or from simple product.

Expected result (*)

  1. alt text

Actual result (*)

  1. alt text

Activity

m2-assistant

m2-assistant commented on Jan 21, 2020

@m2-assistant

Hi @kylianleemkuil. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
    Information on your environment
    Steps to reproduce
    Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@kylianleemkuil do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
    no

changed the title [-]Wrong selected product image when query url param configurable product[/-] [+]BUG: Wrong selected product image when query url param configurable product[/+] on Jan 22, 2020
self-assigned this
on Jan 23, 2020
m2-assistant

m2-assistant commented on Jan 23, 2020

@m2-assistant

Hi @engcom-Echo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

    2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

    3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

    4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

    5. Add label Issue: Confirmed once verification is complete.

    6. Make sure that automatic system confirms that report has been added to the backlog.

engcom-Echo

engcom-Echo commented on Jan 23, 2020

@engcom-Echo
Contributor

Hi @kylianleemkuil. Thank you for your report.
Unfortunately, I could not reproduce this behavior.

Actual result:

image

image

image

image

image

I have to close it.

Please feel free to comment, reopen or create new ticket according to the Issue reporting guidelines
if you are still facing this issue on the latest 2.4-develop branch. Thank you for collaboration.

kylianleemkuil

kylianleemkuil commented on Jan 23, 2020

@kylianleemkuil
Author

@magento give me 2.4-develop instance

magento-engcom-team

magento-engcom-team commented on Jan 23, 2020

@magento-engcom-team
Contributor

Hi @kylianleemkuil. Thank you for your request. I'm working on Magento 2.4-develop instance for you

magento-engcom-team

magento-engcom-team commented on Jan 23, 2020

@magento-engcom-team
Contributor

Hi @kylianleemkuil, here is your Magento instance.
Admin access: https://i-26473-2-4-develop.instances.magento-community.engineering/admin_db97
Login: 0f55a834 Password: be97e6333acb
Instance will be terminated in up to 3 hours.

kylianleemkuil

kylianleemkuil commented on Jan 23, 2020

@kylianleemkuil
Author

@engcom-Echo I reproduced this bug on the 2.4 develop branch

Result:
2 4-develop-bug

As you can see if I use the # as param in the URL the Select field changes and the price also. But the product image is not changed.

This is how it supposed to work:

2 4-develop-suppose

I noticed in Magento\ConfigurableProduct\view\frontend\web\js\configurable.js in function _changeProductImage() that "galleryObject" is not defined when using the # param.

Reopen please

Repository owner unassigned on Jan 23, 2020
engcom-Echo

engcom-Echo commented on Jan 23, 2020

@engcom-Echo
Contributor

Hi, @kylianleemkuil. Thank you for the clarification.

24 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Component: ConfigurableProductFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReported on 2.3.3Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @sergiy-v@kylianleemkuil@magento-engcom-team@engcom-Echo

    Issue actions

      BUG: Wrong selected product image when query url param configurable product · Issue #26473 · magento/magento2