News:

Support the VirtueMart project and become a member

Main Menu

custom attribute input number and multiply it by value entered

Started by woop, April 18, 2013, 16:20:44 PM

Previous topic - Next topic

woop

Hi guys!

I´m posting because I didn´t find any info after many hours of search in the forum and on Google.

I´m looking for a way to show as cart attribute and input type where the user types (not select!) a number and this gets as a cart attribute whith the value calculated as "number entered"+"value (cost) defined on the backoffice for this attribute"

To show the especific example let´s imagine a customer want to buy an Air Conditioning system and wants also the instalation, so he has to enter how many meters of iron tube the instaler has to bring to his house (so this is the number of meters the customer will buy) in order to be able to do the intalation of the purchased item.

Expert developers, please help me out to find an answer to this threath!

Thanks in advance for all your help :)
Kind Regards,
Daniel Mateu Solé


woop

Hy Jhonn, I´ve seen the plugins you showed me, but they do not do what I need due the work or just for sizes (textil industries) or creating discounts depending the cuanty purchased.

What I´m looking for is for a way to create custom cart variant fields for a product that:

  • the user has to enter a number (right now I only can get to show a list or option imputs)
  • the total value of each custom cart variant is the number that the user has entered * the value of this custom cart variant
  • it´s also important the functuanallity to creat unlimited custom cart variants of this type

I hope I could explain myself better now.

If someone has an idea, please let me know!! ;)

Quote from: John2400 on April 19, 2013, 00:23:38 AM
http://extensions.virtuemart.net/products/quantity-related-price-calculation-detail

or
http://extensions.virtuemart.net/products/custom-size-detail
Kind Regards,
Daniel Mateu Solé

woop

Hi dudes!!!

So there was no reply or solution to my problem I´ve develop the VM2 custom plugin that give me the exact funtionallity I was looking for.

Attached in this post I give to whoever needs it the .zip with the plugin files. I´ve tested it with the VM2.0.20b but it should work with any version of VM2 :)
Just install the plugin via normal way of intalling plugins on Joomla and remember to activate it on the Joomla plugin manager.

The way that this works:

  • go to your personalized fields manager and choose "plugin" and select that it has to be a cart attribute
  • when choosing plugin, my plugin it´s called VMCustom - multiplier
  • just type this custom field desired name + the default value of the lenght of the input type that will be created
  • as I needed that the calculation was done via formula customer_value_input*cost_of_the_custom_field I check that the value entered is an integer SO IF YOU ENTER TEXT OR A FLOAT NUMBER THE PLUGIN WILL DO LIKE YOU HAD TIPED NOTHING!!

Now I´ll post this plugin on the developers board so if the Virtuemart Team considers to put it with the next VM2 version as a native funtuonallity everybody will be able to use this custom plugin function if needed :)

Best regards to all!!

[attachment cleanup by admin]
Kind Regards,
Daniel Mateu Solé