Home Forums WoodMart support forum Ajax search Bar not showing items when writing Reply To: Ajax search Bar not showing items when writing

#309641

valio369
Participant

Did some troubleshooting and apparently this snippet that i have added (the client wanted to have the VAT shown as well as the price without VAT on the pages. Is there any way that i could make that work and still show the search products?

function edit_price_display() {
global $product;
$price = $product->price;
$price_incl_tax = $price + round($price * ( 19 / 100 ), 2);
$price_incl_tax = number_format($price_incl_tax, 2, “,”, “.”);
$price = number_format($price, 2, “,”, “.”);
$display_price = ‘<span class=”price”>’;
$display_price .= ‘<span class=”amount”> ‘ . $price .'<small class=”woocommerce-price-suffix”> lei fără TVA</small></span> ‘;
$display_price .= ‘<br>’;
$display_price .= ‘</span>’;
$display_price .= ‘<span class=”amount”> ‘ . $price_incl_tax .'<small class=”woocommerce-price-suffix”> lei cu TVA</small></span>’;
$display_price .= ‘<br>’;

echo $display_price;
}
add_filter(‘woocommerce_get_price_html’, ‘edit_price_display’, 10, 2);