Skip to content

Magento EE 2.1: after moved 'product.info.details' into 'product.info.main' add-to-cart not work #6375

Closed
@denis-g

Description

@denis-g

If you need move product details above add to cart block we can't add product in cart.

Preconditions

  1. Magento 2.1 EE

Steps to reproduce

  1. Add to layout xml
    <move element="product.info.details" destination="product.info.main" before="-" />
  2. Create product with swatch options (color, size, etc.)
  3. Open category page
  4. Open product page and add product to cart

Actual result

  1. Message You need to choose options for your item.

~~
Bug in file vendor/magento/module-swatches/view/frontend/web/js/swatch-renderer.js
Line: this.productForm = this.element.parents(this.options.selectorProduct).find('form:first');
selectorProduct is .product-info-main and this code selected first form - review form!

Shitcode, shitcode everywhere 👍

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions