2

I'm trying to move the compare and wishlist buttons to below all of the content in the product info element.

In my theme's catalog_product_view.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.social" destination="product.info.main" after="product.info.overview"/>
    </body>
</page>

I know that the file is loading and that I can target the element because adding the below line will successfully remove the element.

<referenceContainer name="product.info.social" remove="true"/>

I've tried almost every element in product.info.main and others but it doesn't want to move. What am I missing?

Edit. I may have an idea, I just don't know how to fix it.

It looks like in the base theme I am moving additional.attributes to up to the bottom of product.info.main. I am trying to move the social links below these attributes. it's almost as if it IS putting the social links at the bottom of product.info.main then additional.attributes is loading after.

If I use this, it does move the social links to the top of the page.

<move element="product.info.social" destination="product.info.main" before="-"/>

also, trying to move the product.info.social to below additional.attributes moves it below the footer. I'm so confused...

<move element="product.info.social" destination="additional.attributes" after="-"/>

----------------Edit------------------

I'm going to leave all of my thought's and troubleshooting above for others to follow. The problem was that a lot of the elements share similar class names in HTML and even in template hints. As it turns out some of the elements were previously moved. I just had to reference the correct blocks.

2
  • Have you got solution ?
    – Pawan
    Dec 17, 2017 at 4:34
  • Not yet. I think I'm only getting more confused. It seems extremely straightforward and easy. Nothing I've tried to do (except for removing blocks) in the XML seems to work. I've also tried making a static block in the sidebar on the category view page using tutorials. Dec 17, 2017 at 19:49

1 Answer 1

3

you can give the move like

<move element="product.info.social" destination="product.info.main" after="-"/>

So that the element will appear last

1
  • I had the format correct. This is correct. I needed to reference a different destination. The attributes I was trying to re-position the social links below was in a block below product.info.main Dec 17, 2017 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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