I don't see where to set my price per role on the default attributes/options editor. Am I overlooking it, or is price per role (options) only on each Product instance?
| Comment | File | Size | Author |
|---|---|---|---|
| price-per-role-per-option.png | 14 KB | texas-bronius |
I don't see where to set my price per role on the default attributes/options editor. Am I overlooking it, or is price per role (options) only on each Product instance?
| Comment | File | Size | Author |
|---|---|---|---|
| price-per-role-per-option.png | 14 KB | texas-bronius |
Comments
Comment #1
fenstratThe default attribute price is entered on the Options tab (in the Price field). Additional price roles for each attribute are set on the Option prices tab.
It's a little confusing that the default price is entered on one tab and the additional role prices on another, but it was the most straight forward way to add this functionallity to Ubercart.
Comment #2
fenstratHmm, also helps to actually read your question.
The answer to which is yes, at this stage there are no default attribute/options role prices. They're only available for each product instance.
Comment #3
texas-bronius commentedThanks for the reply. I won't clutter the thread with a feature request, but should someone else stumble across this, then maybe that will warrant it.
Comment #4
texas-bronius commentedThis has become an important feature.
Could you help provide some guidance as to how one might go about changing the module to allow setting a "default" price per role per option? Is there a particular challenge that exists with Options?
Would it be appropriate to work in some kind of logic that says "if uc_pprop.nid" not set, then use this default value? This way, any option used on any product could default to the reseller value provided here. If the store admin changes this value on the product, he can get a special per-node association (as currently).
Thanks
-Bronius
Comment #5
texas-bronius commentedSo
uc_price_per_role_load_option_pricesreturns option prices via $nid, and this is loaded in just a couple places. As a proof-of-concept, it should be possible to run this query first, then if no option prices are returned for that node, a subsequent query is made for node-less option prices for the array of $oid passed in.I'm not sure how to write that query in Drupal, but it might be something like:
in sql. Then, the same hook_form_alter could use the same output and apply the "default" values.
I think this should offer an unobtrusive mechanism of providing both a price per option per node and a default price per option to fall back on.
Comment #6
fenstratA uc_price_per_role_default_option_prices table or the like would need to be setup to store default prices, just as uc_attribute_options stores default prices.
They'd then need to be inserted into uc_price_per_role_option_prices when an attribute was turned on for a given product.
This would be a nice feature. No time at present to write it myself.
As for the "updateability" of attribute prices on products based on updating the default attribute take a look at #298395: Let admin push class attribute/option changes out to existing nodes
Comment #7
lilacbow commentedI really need this option for my website. I have a wholesale user role with discounted pricing of 50% off per product, but I cannot extend this
discount to the options. That is a HUGE drawback. Am I wrong in thinking that the Retail/Wholesale capacity for this Drupal,Ubercart system is
deficient. I am new to this so any direction, comment or advice is greatly welcomed.
Comment #8
fenstrat@lilacbow uc_price_per_role already allows you assign prices per role to attributes. That was covered in this issue: #708434: Attributes Pricing in 6? - until there is a 1.1 release you'll have to use the -dev version.
This issue is about extending that functionality to allow options to have a default prices.
As for the retail/wholesale capabilities of Ubercart they are fairly well developed. For d7 you might also be interested in http://drupal.org/project/commerce