Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

How do I make an option value change in code


Recommended Posts

My knowledge in javascript and php is fairly limited but I am trying to work this out.


I have option types v2 installed on 2.3.1 and want the customer to type text in the textbox and be charged a different amount based on input.


example: (customer is buying a product with 3inch embroidery Applique)


letters 1 - 6 cost $15 and $2.50 for each additional letter.


I can set the option value to $15 but it won't charge the right amount if they go over 6 letters.

I have all the math worked out in javascript and pass a couple variables to js using a hidden form field and have the price in a div with an id that I am using to update it as the user types.

The problem is that the updated amount is in a javascript variable and I dont know how to pass it to the shopping_cart.php and then once it is there how do I use it?


Can anybody help point me in the right direction?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...