• Resolved Tommaso99

    (@tommaso99)


    I have a product that has a regular price and discount price.
    In product page and shop page the regular price is striked and the discount price is shown.
    But when I add the product to the cart, both in the side cart and in the cart page only the sale price is shown. I’d like to display both like in the product page.
    Is it possible?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Roxy

    (@roxannestoltz)

    Hi @tommaso99 ,

    Thanks for reaching out!

    I understand that you would like to display the strikethrough on the price for discounted products, on the cart page.

    This is not a built-in feature of WooCommerce core and would require either custom code or a plugin to implement this type of function.

    I have found a plugin which may help you achieve this:

    https://wordpress.org/plugins/woo-discount-rules/

    If you prefer a hard-coded solution, you can try the snippet provided here. I have tested this on my staging site, which uses the Storefront theme, and it works as expected:

    https://stackoverflow.com/questions/64682358/reflect-default-price-and-strikethrough-in-cart-item-price-in-woocommerce

    Hope this helps!

    Plugin Support Joseph B. (a11n)

    (@tamirat22)

    Hello @tommaso99!

    Thanks for reaching out!

    when I add the product to the cart, both in the side cart and in the cart page only the sale price is shown. I’d like to display both like in the product page.

    I understand you want to display both your regular and sales prices with the strikethrough included on your cart page.

    I have found a similar thread here that addresses your issues. I have run it on my test site and it should work.

    If you are not familiar with WooCommerce hooks and how to add custom code, please consult our guide here: https://woocommerce.com/document/introduction-to-hooks-actions-and-filters

    Hope this helps!

    Thread Starter Tommaso99

    (@tommaso99)

    @roxannestoltz thank you! I’ll implement it right away.
    However, It’s a very simple feature. Why isn’t it implemented in the Core?

    Roxy

    (@roxannestoltz)

    Hi @tommaso99 ,

    You are very welcome 🙂

    However, It’s a very simple feature. Why isn’t it implemented in the Core?

    It is definitely something I would recommend adding to the WooCommerce Ideas Board. If you would like to do this, you can do so by using the link below:

    https://ideas.woocommerce.com/

    Thread Starter Tommaso99

    (@tommaso99)

    @roxannestoltz @tamirat22
    Thank you for pointing out the Ideas Board, but the link doesn’t work
    However it’s a very simple feature that would get lost in the board, while it’s a feature that every other platform has by default: prestashop, magento, shopify.
    And a little snipped of code in the core would make it available to anyone.
    Please, send it directly to the team…

    • This reply was modified 2 years ago by Tommaso99.
    Roxy

    (@roxannestoltz)

    Hi @tommaso99 ,

    Thank you for pointing out the Ideas Board, but the link doesn’t work

    I see that the URL is redirecting to WooCommerce.com homepage, and is no longer valid. It appears that there is a new way of doing things, as seen in the documentation below:

    https://woocommerce.com/document/feature-request-portal/

    In that case, your best bet would be to raise this with the developers directly. You can do this by creating an enhanement request here, and the developers will chime in.

    Hope this helps 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show strikethrough price for discounted products in cart’ is closed to new replies.