Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2009 at 14:14 UTC
Updated:
5 Mar 2013 at 18:50 UTC
Hi
I have a use case where a user (anonymous) needs to enter a code to get the actual price of a product. The price of the product is different depending on that code and that code shouldn't be displayed to all web sites users.
I've set a price adjustment by setting up an option for this. This works fine when using a drop down to select the code.
However, price is not adjusted when setting option as a "text field".
Many thanks for your help
Laurent
Comments
Comment #1
agence web coheractio commentedAnyone having the same issue ?
Comment #2
agence web coheractio commentedbump
Comment #3
tr commentedThis is not a bug, you are just misunderstanding how textfield options work. A textfield is just one option, with one price adjustment - Ubercart doesn't parse and interpret the contents of the textfield. I personally would not use attributes for what you're trying to do. There are several contributed modules that will let you dynamically calculate a price, and one of these is probably more appropriate.
Further discussion belongs on ubercart.org.
Comment #4
JohnDoranNY commentedHow would one, for example, have an optional text field for "Optional Engraving".
Lets say its for ordering a watch, and the user has an option to enter the Name and/or small message they with to have engraved on the watch.. They could (a) leave it blank and purchase the watch at normal price (no engraving costs) or (b) enter a message and be charged $25.00 additional for the engraving?
I tried setting up this scenario without luck... for some reason with the optional text box enabled.. it never gets calculated into adjustments... doesn't matter if the user enters some text or not. How could I go about setting this up properly?
btw: using latest dev version 7.x.3.x-dev from 7/4/2011
Thanks
Comment #5
JohnDoranNY commentedComment #6
longwaveChanging to feature request.
Comment #7
ownage commentedI need to do the exact same thing as JohnDoranNY.
It doesn't seem to calculate the additional fee if we type in the text box.
You would think this wouldn't be too hard to implement with one simple conditional statement:
"if text box is not null, do price adjustment specified in the option configuration"
Is there any help out there for this issue?
Comment #8
longwaveThis should be achievable with either hook_uc_product_alter() (see uc_attribute_uc_product_alter() as an example), or perhaps through Rules (using the "A product is being loaded" event). I can't think of any other way we could add this to core where it would be useful for everyone.