Author Topic: Rounding price custom fields problem after update to Joomla 2.5.16  (Read 11089 times)

jurajvt

  • Beginner
  • *
  • Posts: 21
Re: Rounding price custom fields problem after update to Joomla 2.5.16
« Reply #45 on: November 24, 2013, 18:37:30 pm »
I have tested it right now on clean installation and all is working with comma in custom fields.

Have you tried it? Do you have some mods in your code?

PHP 5.3.10 on Ubuntu, Joomla 2.5.16, Virtuemart 2.0.24b.

[attachment cleanup by admin]

jurajvt

  • Beginner
  • *
  • Posts: 21
Re: Rounding price custom fields problem after update to Joomla 2.5.16
« Reply #46 on: November 24, 2013, 18:44:09 pm »
Oh, maybe I know, where is your problem... What type of custom field are you using? Did you installed also new version of Virtuemart AIO?

Margriet

  • Jr. Member
  • **
  • Posts: 80
Re: Rounding price custom fields problem after update to Joomla 2.5.16
« Reply #47 on: November 24, 2013, 18:55:00 pm »
I don't need a solution for myself. Just trying to test GuidoS's problem. But will try to have a look at your currency problem.

Margriet

  • Jr. Member
  • **
  • Posts: 80
Re: Rounding price custom fields problem after update to Joomla 2.5.16
« Reply #48 on: November 24, 2013, 18:59:22 pm »
Price issue was solved by Milbo last week or so. But problem as mentionned by GuidoS still exists.

jurajvt

  • Beginner
  • *
  • Posts: 21
Re: Rounding price custom fields problem after update to Joomla 2.5.16
« Reply #49 on: November 24, 2013, 19:14:40 pm »
Price issue was solved by Milbo last week or so. But problem as mentionned by GuidoS still exists.

Yes, I know. I am still running on my fix, somewhere on the beginning of this thread, because I have a lot of other modifications in VM code.

I understand problem now, because it is appearing in cart variant value, not price, as I meant before. I am looking on it.

jurajvt

  • Beginner
  • *
  • Posts: 21
Re: Rounding price custom fields problem after update to Joomla 2.5.16
« Reply #50 on: November 24, 2013, 20:05:54 pm »
I don't need a solution for myself. Just trying to test GuidoS's problem. But will try to have a look at your currency problem.

In case that you are using cart variant, you can try following fix:

Replace JText::_ method in administrator/components/com_virtuemart/models/customfields.php around line 885

Instead of

$productCustom->text = JText::_($productCustom->custom_value) . ' ' . $price;

you can use

$productCustom->text = vmText::_($productCustom->custom_value) . ' ' . $price;

Or you can simply replace all occurences of JText::_ with vmText::_ in that file to see if it helps you.

I am not using stockable variants, so if little change described above doesn't help you, you can try to replace same method occurences in

administrator/components/com_virtuemart/plugins/vmcustom/stockable/stockable.php

GuidoS

  • Jr. Member
  • **
  • Posts: 57
  • VirtueMart Version: 2.0.26a
Re: Rounding price custom fields problem after update to Joomla 2.5.16
« Reply #51 on: November 27, 2013, 21:20:36 pm »
Changed JText to vmText in the file stockable.php in the directory "plugins/vmcustom/stockable/" at line 284 and now everything is showing fine:)

Code: [Select]
$option[] = JHTML::_('select.option', $val, jText::_( $val ));
to

Code: [Select]
$option[] = JHTML::_('select.option', $val, vmText::_( $val ));
Thank you all for your help. Hope this could be fixed in the next release.