2

UPDATE - This is a reported isue in v2.1 but there is not fix for it.

In Magento 2 special prices do not seem to be displayed on the Wishlists page.

Is it possible to display these? How? Is there any reason why they would not be displayed here?

See images below, the €12 discount is shown on the product page and not the wishlist page.

Is this possible with layoutXML, when I look in wishlist_index_index.xml I see:

<block class="Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Cart" name="customer.wishlist.item.price" template="item/column/price.phtml" cacheable="false">
    <block class="Magento\Catalog\Pricing\Render" name="product.price.render.wishlist">
        <arguments>
            <argument name="price_render" xsi:type="string">product.price.render.default</argument>
            <argument name="price_type_code" xsi:type="string">wishlist_configured_price</argument>
            <argument name="price_label" xsi:type="boolean">false</argument>
            <argument name="zone" xsi:type="string">item_list</argument>
        </arguments>
    </block>
    <block class="Magento\Wishlist\Block\Customer\Wishlist\Item\Options" name="customer.wishlist.item.options" cacheable="false"/>
</block>

I know I can use similar LayoutXML in my theme, but what would I need to add to change it?

So far I've tried variations of the below, but it doesn't change anything:

<referenceBlock name="product.price.render.wishlist">
    <arguments>
        <argument name="price_render" xsi:type="string">product.price.render.default</argument>
        <argument name="price_type_code" xsi:type="string">wishlist_configured_price</argument>
        <argument name="price_label" xsi:type="boolean">false</argument>
        <argument name="zone" xsi:type="string">item_list</argument>
    </arguments>
    <arguments>
        <argument name="price_render" xsi:type="string">product.price.render.default</argument>
        <argument name="price_type_code" xsi:type="string">final_price</argument>
        <argument name="display_msrp_help_message" xsi:type="string">1</argument>
        <argument name="zone" xsi:type="string">item_view</argument>
        <argument name="id_suffix" xsi:type="string">copy-</argument>
    </arguments>
</referenceBlock>

Wishlist Page

Product Page

0

I'm not sure about your Magento version. But, for my Magento 2.2.0 version, the price display is the special price on the wishlist page by default. So, in your case, try to reindex database.

If you want to show regular price as well, we can achieve that easily by changing price_type_code to final_price.

app/code/Vendor/Wishlist/view/frontend/layout/wishlist_index_index.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>
        <referenceBlock name="product.price.render.wishlist">
            <arguments>
                <argument name="price_type_code" xsi:type="string">final_price</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

enter image description here

  • Hi Khoa, I'm using v2.1.8, this has been fixed in 2.2 but nothing I can't find anything available to fix it in 2.1 github.com/magento/magento2/issues/11305 – Holly Dec 11 '17 at 10:11
  • I tried that xml on my version and it does not work :( – Holly Dec 11 '17 at 10:12
  • I will check on my Magento 2.1.7 version. And then let you know. – Khoa TruongDinh Dec 11 '17 at 10:22
  • I could not get it working on ver. 2.1.8 either – Holly Dec 13 '17 at 9:15
  • 1
    If checking vendor/magento/module-wishlist/Block/Customer/Wishlist/Item/Column/Cart.php, we can see the product doesn't contain special price data. I'm debugging on this issue. – Khoa TruongDinh Dec 13 '17 at 11:24

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.