News:

Support the VirtueMart project and become a member

Main Menu

Sales price format/override

Started by BitingMouse, June 30, 2012, 09:17:25 AM

Previous topic - Next topic

BitingMouse

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?

srajca

check the vm config i think you can format currencies there.

BitingMouse

#2
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

vigier

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!

BitingMouse

Thanks! I did that before, but I though that there is some option to use 3 letter code instead of symbol.

guidocx842

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!

axoicorp

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>


guidocx842

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.  ;)