I would like to be able to update a products list price or cost by another of the price fields. I think if Token support was enabled this would be easy. Here's my use case;
We have a client with a large jewelry store and wholesale pricing for different roles. They entered the Sell price, and a wholesale price, but forgot to enter a List price. The list price is being used to show the 'Retail/Full' price styled with a line through it.
So now I need to update hundreds of products list price based on the Sell price.
I will take a look at the code for this, but probably after DrupalCon.

Thanks

Comments

SeanA’s picture

This sounds like a reasonable feature-- not Token support, but the idea of using one of the price values as a base for setting one of the other price values.

I don't think Token support would be useful to accomplish this. It should be pretty easy to add an extra option field to the 'action selection' form, for choosing one of the price values to use as a base value.

jlockhart’s picture

StatusFileSize
new67.99 KB
new35.55 KB

Yeah you're right Token would be overkill, selecting one of the other prices makes more sense.
So running with that, and pie in the sky thoughts, what do you think about this.

Modify the action so that there is only one: Update Ubercart Price action that looks like this.

Ubercart Product Actions.png

That way the user could select the price they want to change, the base price to use (defaults to sell price, and maybe jquery the base to match the modify price when it changes), and how they want to change it.

Additionally, for Ubercart stores with wholesale or discounted pricing I've been using the Ubercart Price per Role module, which provides additional prices based on allowed roles. It would be cool, and probably not too difficult, to check if that module is installed and provide those price fields in the drop down as well. This would make it incredibly useful for managing an Ubercart storefront pricing system. i.e. like this.

Product_Table.jpg

What do you think? I'll pull the module down and start looking at how it works and try to help work on this.

SeanA’s picture

Title: Enable Token Support » Update price value based on another price

Combining the price adjustments into a single action makes sense, however, what about existing sites? This would spring a change on them, and it also makes the price change form more complicated. So I'm thinking it might be better to create a new action "Update a price based on another price value" using this new form.

Supporting Price-per-role is a good idea too. That should probably be tackled separately, when that module gets Views support. I believe there is some progress on Views integration for UC Price Per Role, but it hasn't landed yet. See #646724: Views integration (Ubercart Price Per Role). I haven't looked at the latest patch there.