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

[Improvement] Removed redundant code for custom price

Started by thelordofweb, November 26, 2016, 14:22:35 PM

Previous topic - Next topic

thelordofweb

It will be better if we do not show this string 'No additional charge' in the list with custom fields when the price is 0.

I edited the method _getCustomPrice in administrator/components/com_virtuemart/models/customfields.php

My arguments are:


  • the price of custom fields will never be empty string. It is always 0.000000 ($customPrice is equal to 0.000000).
  • this code is redundant vmText::sprintf('COM_VIRTUEMART_CART_PRICE_FREE',$currency->getSymbol()) because the constant COM_VIRTUEMART_CART_PRICE_FREE does not contain placeholders. The method vmText::sprintf will never replace any placeholders to $currency->getSymbol().
  • I guess, most people do not like the current result. I am pretty sure, most people will be happy if we remove that text from the drop down.

Cheers!

Milbo

Some people may use the currency for something like "no extra $", or stuff like that.

Actually we need an option for, then it can be added to the core
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/