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

Custom Field Based on Mathmatical Sign (Percentage,add,Multiply,subtract) free

Started by jibon57, July 25, 2014, 12:23:03 PM

Previous topic - Next topic

jibon57

Using this plugin you can perform mathematical operations like Percentage,  Multiply, Add, Subtract custom filed value with main products. For example: If your main product is Business Card & Standard price is $10. But in your custom field you want to put 2 sided color option & that will be 20% extra of main price. With this extension you can do this easily :).



More detail & free download: http://extensions.hoicoimasti.com/products/9-virtuemart-extension/7-vm-custom-field-price-based-on-mathmatical-sign.html
demo: http://demo.hoicoimasti.com/component/virtuemart/headgear/hats/classic-hat-detail.html

Special thanks @PRO for his great plug-in dropbox :). I used his code in this extension :)

cilijus

Excellent plg but has a problem with entering decimal numbers eg +%1.25...... somehow I managed to edit it (a total novice developer), it took me a while to do it. But now appeared another problem .... calculates only the basic price of the product regardless of what other custom plg added amount. Does anyone know what the problem is? Thanks
php is in attachment

[attachment cleanup by admin]

Adwans

Hello Jibon57!
Plugin works great on VM 2.5. It is really  cool. Have you considered upgrading to VM3?
I ve  tried to rewrite your plugin regarding new VM3 triggers, database fields, and so on, have still no progress yet.
Cannot register input's values in $varsToPush, tried also $this->varsToPush

Best regards

Adwans

Quote from: cilijus on September 22, 2014, 15:05:09 PM
Excellent plg but has a problem with entering decimal numbers eg +%1.25...... somehow I managed to edit it (a total novice developer), it took me a while to do it. But now appeared another problem .... calculates only the basic price of the product regardless of what other custom plg added amount. Does anyone know what the problem is? Thanks
php is in attachment
Hello!
Look here into the plugin's trigger function:
public function plgVmPrepareCartProduct(&$product, &$customfield,$selected,&$modificatorSum){

some versions are like:
public function plgVmPrepareCartProduct(&$product, &$customfield,$selected,&$modificatorSum=0){
Maybe this is why it cancells (resets) what all other had added? Due to this =0 at the argument list end ?
In my version I deleted this. And works fine.

Now I m working on upgrading it to the VM3 version...

AH



It appears as though you might be re-inventing the wheel

Have you considered using the VM3 version of the dropbox plugin - which has some additional functionality

http://forum.virtuemart.net/index.php?topic=127362.0

Regards
A

Joomla 4.4.5
php 8.1

GJC Web Design

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

Adwans

OK OK, no more wheels.. ;)
But, I dont want to modify db tables, I mean ALTER tables, literally hate it.
Quotean excellent plugin but poorly named..  :( --
BTW, which one?  :)

GJC Web Design

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