Hello.
I can see that the base price shown only when the admin is logged in. How to make it visible to Guests and default users? VM 2.6.6, Default template.
Thanks!
The base price is what a product costs you, ie it does not include your profit margin or other markups and does not include tax. Now, why would you want you customers to know how much profit you make on a product?
Because im using the whole system in a different way that people mostly do!
And in that field i wanna have the price i sell!
Anyway, how can i do it? can i?
select show base price in config->prices
then in the price template either (if your using standard templates)
$this->showBasePrice = 1;
or add
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
Hmm..
It really depends how your business realtionships with suppliers are structured. Base price is whatever you chose it to be and is not as prescriptive as saying
Quote
The base price is what a product costs you, ie it does not include your profit margin or other markups and does not include tax. Now, why would you want you customers to know how much profit you make on a product?
It certainly can be used in such a manner and has been structured to facilitate such an approach
However some users have supplier agreements where discounts vary widely across product ranges and even within product ranges.
Trying to get VM to automate pricing uplift outside of a simple set of scenarios may prove too much of a headache.
As a consequence some users chose the base price to store ex-tax price and manage margins away form VM
As GJC states it is the "if" that is preventing baseprice being shown for non admin users
You will have to create template overrides in category and product views
if ($this->showBasePrice) {
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
if (round($this->product->prices['basePrice'],$this->currency->_priceConfig['basePriceVariant'][1]) != $this->product->prices['basePriceVariant']) {
echo $this->currency->createPriceDiv ('basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices);
}
}
Where do i do this????
which File??
Quote from: GJC Web Design on July 15, 2014, 12:16:58 PM
select show base price in config->prices
then in the price template either (if your using standard templates)
$this->showBasePrice = 1;
or add
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
Hmm - if your going to build a VM site I would suggest you have a bit of a look around what it is and what it does..
the file naming is very logical, following normal Joomla practice
so -> over ride components/com_virtuemart/views/productdetails/tmpl/default_showprices.php
Thanks for your help dudes, i did it!
Nice one!
Hello I have the same problem and I would like an idea for the views in category and wirtuemart. Because I tried to use the above solution but blank my website.
Any suggestion will be welcome
just checked the code in components/com_virtuemart/views/category/tmpl/default.php
looks the same to me
see no reason why adding $this->showBasePrice = 1; won't work