VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: miauczyk on June 02, 2013, 10:17:54 AM

Title: "+" in custom field
Post by: miauczyk on June 02, 2013, 10:17:54 AM
Hello

I have problem.

I created custom field named "red" and I had put a price to it "15 $". When I enter into my page in my custom field I have such expression " red + 15 $".

I dont want this " + " . Is it possible to somehow delete this "+". I want to have such expression " red 15 $"

I created an unique page and this "+" is not compatible with my page.

Maybe someone know in which file is this "+". I looked for him long hours, because I wanted to deleate, but I cant find.

I put this post in another section, but I think that this section is better for this, sorry.
Title: Re: "+" in custom field
Post by: AH on June 02, 2013, 13:43:02 PM
Took a bit of finding!

administrator/componenets/com_virtuemart/models/customfields.php


   static function _getCustomPrice($customPrice, $currency, $calculator) {
if ((float)$customPrice) {
$price = strip_tags ($currency->priceDisplay ($calculator->calculateCustomPriceWithTax ($customPrice)));
if ($customPrice >0) {
$price ="+".$price;
}




   static function _getCustomPrice($customPrice, $currency, $calculator) {
      if ((float)$customPrice) {
         $price = strip_tags ($currency->priceDisplay ($calculator->calculateCustomPriceWithTax ($customPrice)));
         if ($customPrice >0) {
            $price = $price;
         }
Title: Re: "+" in custom field
Post by: PRO on June 02, 2013, 14:00:03 PM
do you need    = price?

http://www.kaizenmediaworks.com/virtuemart-2-0-custom-field-dropbox-plugin


Title: Re: "+" in custom field
Post by: AH on June 02, 2013, 14:19:49 PM
I like your thinking!
Title: Re: "+" in custom field
Post by: miauczyk on June 19, 2013, 19:42:37 PM
Thank You all!
It works perfect.
Title: Re: "+" in custom field
Post by: AH on June 19, 2013, 20:03:59 PM
 :)