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

agence web coheractio’s picture

Anyone having the same issue ?

agence web coheractio’s picture

bump

tr’s picture

Category: bug » support
Status: Active » Closed (works as designed)

This 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.

JohnDoranNY’s picture

Version: 6.x-2.2 » 7.x-3.x-dev

How 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

JohnDoranNY’s picture

Status: Closed (works as designed) » Active
longwave’s picture

Title: price adjustment not working for text field options » Allow price adjustment for text field options
Category: support » feature

Changing to feature request.

ownage’s picture

I 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?

longwave’s picture

Category: feature » support
Status: Active » Fixed

This 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.