Hope all is well.
How can I display the total amount in the single product page taking into consideration the minimum quantity set please?
e.g.: if single product price is 1$ and minimum quantity is 20, how to display before the ADD TO CART button “Total amount: $20” ?
Thank you
]]>I have no clue how to add this function, and I can’t seem to find any code online from people who have done it already.
All I want to do is to display a counter that adds up the quantity of all of the ordered products.
]]>Thanks
]]>function tnc_wishlist_summary_cart(){
global $woocommerce;
$wl_items = YITH_WCWL()->get_products();
$product_price = 0;
foreach ($wl_items as $key => $item) {
$the_product = wc_get_product($item['prod_id']);
$product_price += $the_product->get_price();
}
$output = 'Total Price: '.$product_price;
return $output;
}
add_shortcode( 'tnc-wishlist-summary', 'tnc_wishlist_summary_cart' );
Then I call this function with a shortcode [tnc-wishlist-summary] but it seems returning always a 0 count.
What I am missing?
]]>Thanks a lot to anyone can help!
]]>Like I want have allowed USD 20.00 on signup, but this should be usable only if the cutomers is ordering goods for USD 250.00 or more, otherwise the plugin should not work
]]>