SOLUTION: Show “From:” and the lowest possible price
-
I like to share with you a code for display lowest price from fixed quantity.
I am open to suggestions and improvements// Lowest price on single product, product cat, recent viewed by risorsainformatica.com add_filter( 'woocommerce_get_price_html', 'risorsa_add_price_prefix', 99, 2 ); function risorsa_add_price_prefix( $price, $product ){ global $product; $fixedPriceData = WoofixUtility::isFixedQtyPrice($product); // check if is a fixedqt product if ($fixedPriceData !== false) { $data_fixed = WoofixUtility::isFixedQtyPrice($product); $prezzominimo=end($data_fixed['woofix']); $prezzodamostrare = $prezzominimo['woofix_price']; $price = 'Start from: ' . $prezzodamostrare .'€ <small class="woocommerce-price-suffix">Iva escl.</small>'; return $price; } else { // regular product (not fixedqt) $price = '' . $price; return $price; } }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘SOLUTION: Show “From:” and the lowest possible price’ is closed to new replies.