News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to add m² to specific product prcies.

Started by Cr3ativ3, April 15, 2014, 21:11:37 PM

Previous topic - Next topic

Cr3ativ3

Hi guys really need some help here please.

J 2.5.16 + VM2.0.26d

I have built a site for a client but have had some pretty odd issues trying to add m² to product prices. I am no coding genious but have some idea what i am doing....i am sure some of you legends in here can help as you always do...

Ok, i have a few categories that require m² added to the end of all product prcies, in default category view AND on default showprices, BUT, i have a category i do NOT want this to show in.

My problems are:

1: How do i add m² to the end of ALL prices?
2:How do i do this selecting specific categories?

I have tried some crude hacks and language overrides but it's just not the correct way to do this and i REALLY need some help here please.

Your help, as always, is VERY much appreciated.


Live to ride, ride to live!
J2.5.27
J3.4.1
VM2.6.10
VM3.09

JoomTut

If it applies to all prices, simply by configuring your currency to add m². But in your case, you need to customize the code.
http://www.joomtut.com - How to Joomla!
Joomla! & VirtueMart Pro Support.
http://www.joomtut.com/joomla-clip.html - 14 steps to creating a Joomla! website with video clip tutorials

Cr3ativ3

Thanks for reply, yes agreed, as noted in my first post i need to apply to selected categories so i cannot apply to ALL just by adding code in the default_showprices.php file as this applies to everything available which is not the case.

Just need help with how to apply the correct code to apply to specific categories. Was thinking if i created another .php file that i could then assign to the correct category, but this is where i am struggling.

I can happily apply the correct code to default_showprices.php and add correct style to the template CSS override which puts the text exactly where i would like, but as stated, it puts it on EVERY product and this is not what i want to do.


Having a nightmare, trouble with clients who want options/features that aren't as easy as you would like to impliment.

Thanks for your reply though.
Live to ride, ride to live!
J2.5.27
J3.4.1
VM2.6.10
VM3.09

Cr3ativ3

OK, i have answered one of my own questions to a certain point.

To add measurements/letters to all prices does not in fact require any kind of hack, it is simply added by going to the currency and adding it into the "positive format" field your desired output.

So in short:

Goto:
Admin ares::Components::Virtuemart::Configuration::Currencies

Find field: "Positive Format"

Amend as required, for example, as i wanted i just add this £{number}m² which provides ALL my prices with at the end.

I was hoping i could simply create another currency for GBP and publish "without" the m² and simply assign this currency to the products i do not wish to show but this so far has not worked.

For anyone who may require this or look at this post in future i will update as soon as i find a solution.
Live to ride, ride to live!
J2.5.27
J3.4.1
VM2.6.10
VM3.09