VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: BitingMouse on June 30, 2012, 09:17:25 AM

Title: Sales price format/override
Post by: BitingMouse on June 30, 2012, 09:17:25 AM
Hello, I'm unable to find answer to this.

In /components/com_virtuemart/views/category/tmpl/default.php there is code for displaying sales price:
echo $this->currency->createPriceDiv('salesPrice','COM_VIRTUEMART_PRODUCT_SALESPRICE',$product->prices);
and it outputs the following html:
Quote<div class="PricesalesPrice" style="display : block;" ><span class="PricesalesPrice" >29,90 €</span></div>

What I need is to reformat above html output to looks like:
<p class="price"><span>price</span>  € 29,90</p>

How can I accomplish this?
Title: Re: Sales price format/override
Post by: srajca on June 30, 2012, 21:36:47 PM
check the vm config i think you can format currencies there.
Title: Re: Sales price format/override
Post by: BitingMouse on June 30, 2012, 22:28:06 PM
Yes, i can change order in VM config, but I cannot remove useless div .PricesalesPrice

strip_tags did the trick..

Now I want to display 3 letter code of currency instead of symbol, ie. to get EUR xx.yy instead of € xx.yy
Title: Re: Sales price format/override
Post by: vigier on July 01, 2012, 14:51:34 PM
Goto Virtuemart --> Configuration --> Currency--> Select Euro.
There you can change it. Use "EUR" als currencysymbol.
Format positive: {symbol} {number}
Format negative: {symbol} {sign}{number}
Save --> Done!
Title: Re: Sales price format/override
Post by: BitingMouse on July 01, 2012, 20:19:31 PM
Thanks! I did that before, but I though that there is some option to use 3 letter code instead of symbol.
Title: Re: Sales price format/override
Post by: guidocx842 on September 28, 2012, 09:23:38 AM
I find this post on the forum that is one of the most nearest of my problem... so I post here my question hoping that somebody can help me...
What I need is change the style associated to that div! I want to increment the font-size, change the font-color, add " - iva inclusa" after the price "xx €".
I can't find where is the definition of the function createPriceDiv to change it... and I'm lookin for it from many time... please can you give me a suggestion? Thank you very much!
Title: Re: Sales price format/override
Post by: axoicorp on December 26, 2012, 17:56:10 PM
I'm having this problem too. I need to edit this line which is probably generated by createPriceDiv:

<div class="PricesalesPrice" style="display : block;"><span class="PricesalesPrice">€ 20,00</span></div>

Title: Re: Sales price format/override
Post by: guidocx842 on December 26, 2012, 18:14:52 PM
Quote from: axoicorp on December 26, 2012, 17:56:10 PM
I'm having this problem too. I need to edit this line which is probably generated by createPriceDiv:

<div class="PricesalesPrice" style="display : block;"><span class="PricesalesPrice">€ 20,00</span></div>

I suggest you to create the .PricesalesPrice entry in your template css file or in your vmsite-ltr.css and insert in it the styles that you want to give to the sales price.  ;)