VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Otto0815 on March 24, 2012, 12:45:07 PM

Title: Change "Price description" and "Price" (from left to right
Post by: Otto0815 on March 24, 2012, 12:45:07 PM
Hi,

don't know really how to describe in english, but i will give it a try....

In the stabdart layout the price of an product is shown like this:  "Sales Price:  100€"

but i want to chnage it to this: "100 € (inkl. 19% MwSt.)"

I've done a language override to the text "Sales price", then it shows "(inkl. 19% MwSt.) 100€"

So, then i tried to change the following line in the view "productdtails/default_showprices":

from:
echo $this->currency->createPriceDiv( 'salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE',$this->product->prices);

to

echo $this->currency->createPriceDiv($this->product->prices, 'salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE');

but this won't work....

Has anyone a Solution for this?

Thx
Title: Re: Change "Price description" and "Price" (from left to right
Post by: PRO on March 24, 2012, 12:51:37 PM
what happens when you take it out totally?


echo $this->currency->createPriceDiv($this->product->prices, 'salesPrice');
Title: Re: Change "Price description" and "Price" (from left to right
Post by: Otto0815 on March 24, 2012, 13:24:31 PM
Then i got this error on the Frontpage:

Warning: Missing argument 3 for CurrencyDisplay::createPriceDiv(), called in /www/htdocs/myserver/vm202/templates/rt_afterburner/html/com_virtuemart/productdetails/default_showprices.php on line 44 and defined in /www/htdocs/myserver/vm202/administrator/components/com_virtuemart/helpers/currencydisplay.php on line 355
Title: Re: Change "Price description" and "Price" (from left to right
Post by: PRO on March 24, 2012, 13:39:59 PM
echo $this->currency->createPriceDiv( 'salesPrice', '',$this->product->prices);

and when you leave the ''   empty?

Title: Re: Change "Price description" and "Price" (from left to right
Post by: Otto0815 on March 24, 2012, 13:53:56 PM
So it shows me the price without the description.....but no errors...
Title: Re: Change "Price description" and "Price" (from left to right
Post by: PRO on March 25, 2012, 12:26:09 PM
Then echo the text before or after, like you want it
Title: Re: Change "Price description" and "Price" (from left to right
Post by: Otto0815 on March 26, 2012, 12:58:51 PM
Many Thanks; sometimes a solution is soooo easy, but you can't see it....

Thats now my final way:

echo $this->currency->createPriceDiv( 'salesPrice', '',$this->product->prices).( JText::_( 'COM_VIRTUEMART_PRODUCT_SALESPRICE'));