VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: baijianpeng on May 26, 2014, 05:48:40 AM

Title: still show "Price" label even after set "Use only as catalogue"
Post by: baijianpeng on May 26, 2014, 05:48:40 AM
Joomla 2.5.20
VirtueMart 2.6.4
Mono-language website

In VM configuration, I choose "Use only as catalogue" to use the whole VM component as products showcase system.

Then, I noticed that on the frontend product detail page, the label "Price:" is still showing without price number and unit following. Obviusly this should not happen.

This must be a bug of VM 2.6.4. Or, maybe I missed an setting option of "hide price label if Use as catalogue"? But I did not find such an option to choose.

Hope someone of VM team will confirm this and fix it.

Thanks.

Title: Re: still show "Price" label even after set "Use only as catalogue"
Post by: GJC Web Design on May 26, 2014, 10:43:02 AM
Yes - it is wrong in VM

over ride   components/com_virtuemart/views/productdetails/tmpl/default_showprices.php

and surround ~ line 24 with

if (!VmConfig::get('use_as_catalog', 0)  ) {

//

}

so

if (!VmConfig::get('use_as_catalog', 0)  ) {
if (!empty($this->product->prices['salesPrice'])) {
echo "<strong>" . JText::_ ('COM_VIRTUEMART_CART_PRICE') . "</strong>";
}
}
Title: Re: still show "Price" label even after set "Use only as catalogue"
Post by: baijianpeng on May 26, 2014, 12:29:25 PM
Thank you, your code works fine.

Well, I still hope the VM team member will accept this as a bug and fix it in newer version.

Thanks.