Jump to content
  • 0

Configurable option type "text" & user pick the price


Question

Posted (edited)

Hello ..

I'm looking for a way to convert the slider on the configurable option type "quantity" to text input that only accept numbers using this code http://jsfiddle.net/viralpatel/nSjy7/

any thoughts / help .. trying to get the user pick and choose the price

partially solved in the replies.. you can check there..

Edited by qatifserv
partially solved

5 answers to this question

Recommended Posts

  • 0
Posted

Text, Textarea, Password fields will be available to add as config options in Blesta 4.4, but I don't know if this will work in your case because if the field should calculate quantity in Blesta, then it would still need to be a quantity field in the configurable option.

  • 0
Posted

So..... after spending more than 2 days trying to solve this problem without crashing the theme and the site I finally came up with a solution..

 

this is how you let the customer pick the price for a service:

1- set the initial price to 0.00

2-  Packages >> Configurable Options >> options

3- create a new option with the following :

  • Type >> Quantity
  • Client can Add & Client can Edit are enabled
  • set option name & min & max & step to 1
  • price is 1.00 ((( very important so any value the client enters will be multiplied by 1 )))

4- now identify your order form and edit /plugins /order /views /templates /ajax /javascript /config_packageoptions.js

5- delete these lines :

				$(input).slider({
					value: value,
					min: min,
					max: max,
					step: step,
					orientation: 'horizontal'
				}).on('slideStop', function(e) {
					fetchSummary();
				});

save and close.

now you're done! go check the package as a client and see that there's an extra text field you just created that allows you to plug in any number and it will be used as the final price

you can also use the value as 1.05 for example when setting up the price for the option to be used as the price + 5% of what the user put down

hide all of the unnecessary field now on your order template using style="display:none" if you want.. make sure to make the package requires an approval..

if I came up with any updates I'll post it here..

this worked perfectly for me.

To Do :

  • make the field only accept #s

 

 

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...