WPIntell

Source evidence

Great plugin!

WC Price History · review · 2024-10-05T12:11:00+00:00

praisesentiment
highseverity
0.71relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 19 rows with source links

10.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

17 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

review · 5 stars
inewton24 unresolved
Hello! What do u think about display this price history in the cart and checkout page? hi, thanks. Maybe it is a good idea. How would you like to see it? Just next to the product page, crossed out, yes? I think this will definitely be a good option! Some shops already have price history on cart page and checkout page. Usually the lowest price is simply listed below the regular price I wrote this code and it works 🙂 U can add this snippet as option in ur plugin to options page and add in code some variables as “Minimal price text” and other texts function add_price_history_to_cart_item( $product_name, $cart_item, $cart_item_key ) { // Get the product ID $product_id = $cart_item[‘product_id’]; // Append the price history shortcode below the product price $price_history = do_shortcode( '[wc_price_history id="' . $product_id . '"]' ); // Return the product name with the price history appended return $product_name . '<div class="wc-price-history">' . $price_history . '</div>'; } // Hook into WooCommerce to modify the product name in the cart add_filter( ‘woocommerce_cart_item_name’, ‘add_price_history_to_cart_item’, 10, 3 );

Comments

3 shown
kkarpieszuk 2024-10-06T08:40:00+00:00

hi, thanks. Maybe it is a good idea. How would you like to see it? Just next to the product page, crossed out, yes?

inewton24 2024-10-06T11:44:00+00:00

I think this will definitely be a good option! Some shops already have price history on cart page and checkout page. Usually the lowest price is simply listed below the regular price

inewton24 2024-10-06T11:58:00+00:00

I wrote this code and it works 🙂 U can add this snippet as option in ur plugin to options page and add in code some variables as “Minimal price text” and other texts function add_price_history_to_cart_item( $product_name, $cart_item, $cart_item_key ) { // Get the product ID $product_id = $cart_item[‘product_id’]; // Append the price history shortcode below the product price $price_history = do_shortcode( '[wc_price_history id="' . $product_id . '"]' ); // Return the product name with the price history appended return $product_name . '<div class="wc-price-history">' . $price_history . '</div>'; } // Hook into WooCommerce to modify the product name in the cart add_filter( ‘woocommerce_cart_item_name’, ‘add_price_history_to_cart_item’, 10, 3 );