0

I want to move my swatch option after product name. If anyone have idea how to do?

Please let me know.

2
  • Swatch options must be within the product add to cart form. if you move swatch options outside the form, product will not adding to cart properly. Aug 30 '19 at 11:39
  • check with your catalog_product_view.xml Aug 30 '19 at 11:59
0

You can't move swatch option up since doing it will push it outside the form and you won't be able to add product to cart. However, you can move everything above the swatch option into the form, below the swatch option

If you're using the default theme, you can move them as below:

app/code/Vendor/Module/view/frontend/layout/catalog_product_view_type_configurable.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="product.info.price" destination="product.info.options.wrapper"/>
        <move element="product.info.review" destination="product.info.options.wrapper" before="product.info.price"/>
    </body>
</page>

Result:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.