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

Remove +£10 from custom fields.

Started by ukfish1, October 03, 2016, 11:26:22 AM

Previous topic - Next topic

ukfish1

Hi

VM 3.0.14
Joomla 3.6.2

I have removed "no additional charge" from the custom fields by editing the language file. How do I remove "+£10" from the custom fields?

Thanks, Paul

ukfish1

can anyone help with this please?

Paul

GJC Web Design

exactly want custom field? There's loads of them

url? screenshot? info?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ukfish1

the custom filed is a "string" showing different prices for different variations on each product. See attached screen shot. I want to remove the +£20 but still want the displayed price to change when each variation is selected.

I was able to remove "no additional charge" if the price is the same but can't find where to hide the plus or minus amount.

thanks, Paul

ukfish1


kishoreonwork



what is the name of custom field and what type of custom field you are using ? It is probably the default value set in the custom field

Thank
Kishore
I am available for paid joomla and virtuemart consulting.
http://www.kishoreweblabs.com/
skype kishore2607

ukfish1

the custom filed is a "string" showing different prices for different variations on each product. See attached screen shot attached in earlier post. I want to remove the +£20 but still want the displayed price to change when each variation is selected.

I was able to remove "no additional charge" if the price is the same but can't find where to hide the plus or minus amount.

Think it has something to do with editing line 906 in /administrator/components/com_virtuemart/models/customfields.php but not exactly sure which code to remove.

Paul

ukfish1

906 in /administrator/components/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;
         }
      }
remove the + and .$price from the above and it removes the price variation

paul

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

K&K media production

or use a override for the sublayout customfield.php and remove the $price around line 526/528