Product Icon

WooCommerce

Sell online with the flexible, customizable eCommerce platform designed to grow with your business. From your first sale to millions in revenue, Woo is with you. See why merchants trust us to power 3.4 million online stores.

Show both discounted and original price in Cart and Checkout

When a product is offered on sale currently only the sale price shows up in the cart and checkout. It would be nice to show both the sale price and the struck through original price in the cart and checkout. Ideally this would be an option in the Woo settings to enable or not.

Author

adamcalihman

Current Status

Open

Last updated: November 5, 2024

2 comments

Log in to comment on this feature request.

  1. webdevnoventum says:

    Yeah, just get the item get_regular_price() inside those templates and I think you’re good to go.

  2. webdevnoventum says:

    I’d like to report on this under Analytics too. I spent some time tracing through wp_postmeta, wp_woocommerce_order_items, and wp_woocommerce_order_itemmeta, and the conclusion I am coming to is that distinguishing between “regular price” and “sale price” is going to be difficult after the fact until additional data is stored within an order.

    For your case though, I think this could be accomplished as-is, just by rebuilding the cart page – since we have:
    _min_variation_price, _max_variation_price, _min_variation_regular_price, _max_variation_regular_price, _min_variation_sale_price, _max_variation_sale_price inside wp_postmeta.

    I think I could probably modify cart.php, around line 40 (echo apply_filters( ‘woocommerce_cart_item_price’, WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );) to also display the non-sale price to accomplish your goal.