Author Topic: Custom Field Based on Mathmatical Sign (Percentage,add,Multiply,subtract) free  (Read 5758 times)

jibon57

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 32
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

  • Beginner
  • *
  • Posts: 1
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

  • Jr. Member
  • **
  • Posts: 53
  • Beginner+
  • VirtueMart Version: J! 3.9.25 VM 3.8.8
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

  • Jr. Member
  • **
  • Posts: 53
  • Beginner+
  • VirtueMart Version: J! 3.9.25 VM 3.8.8
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:
Code: [Select]
public function plgVmPrepareCartProduct(&$product, &$customfield,$selected,&$modificatorSum){
some versions are like:
Code: [Select]
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3491
  • VirtueMart Version: 3.8.9


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 3.9.27
php 7.4

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10303
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
an excellent plugin but poorly named..  :( --
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Adwans

  • Jr. Member
  • **
  • Posts: 53
  • Beginner+
  • VirtueMart Version: J! 3.9.25 VM 3.8.8
OK OK, no more wheels.. ;)
But, I dont want to modify db tables, I mean ALTER tables, literally hate it.
Quote
an excellent plugin but poorly named..  :( --
BTW, which one?  :)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10303
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
the one AH mentioned..  http://forum.virtuemart.net/index.php?topic=127362.0

does all u want and more.. no core hacks etc is a kosher VM plugin
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation