I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.
I want to add a My cart link to the top links:
Clicking this link should make the Ajax cart visible. I have displayed on the page this way:
<referenceBlock name="top.links">
<block class="Magento\Framework\View\Element\Html\Link" name="mycart.link" after="register-link">
<arguments>
<argument name="label" xsi:type="string" translate="false">My Cart</argument>
<argument name="path" xsi:type="string" translate="false">checkout/cart</argument>
<argument name="class" xsi:type="string" translate="false">my-cart-link</argument>
</arguments>
</block>
</referenceBlock>
I have only kept the My Wish List link inside the top links block:
<referenceBlock name="catalog.compare.link" remove="true" />
<referenceBlock name="header" remove="true" />
<referenceBlock name="authorization-link" remove="true" />
<move element="wish-list-link" destination="panel.top.links" />
A pastebin with the full default.xml file can be seen HERE.
- Is there a piece of XML code that would put the My cart link near the Wishlist?
- Also, how can I put a "pipe" separator between them?