I use Virtuemart 3 with 3rd party template,
if any product labeled as recommended, I need to make this designation appeared on the category page and product page.
Any ideas how to do it?
Thanks, Petr
Like this? http://forum.virtuemart.net/index.php?topic=102353.msg339797#msg339797
Yes, it looks like what I need!
But any easy solution how to do it? I feel that this function Virtuemart supports in the default template, but correct me if I'm wrong.
You can do this with template override.
You are already using a third party template, so ask them to set it up if you don't understand how overrides work. No, it is not in default VM.
I figured out a way to display the recommended label on product detail page:
Add this code to the place where you need in file: templates/your-template-name/html/com-virtuemart/productdetails/default.php (or create override)
<?php if ($this->product->product_special == 1) {
echo '<span class="product-sale"> ' . vmText::_('SALE!') . '</span>';
}?>
Edit:
And category page: templates/your-template-name/html/com-virtuemart/category/default.php
<?php if ($product->product_special == 1) {
echo '<span class="product-sale"> ' . vmText::_('SALE!') . '</span>';
}?>