I have a wholesale role that has a minimum order. Normal users however dont have a minimum order. Do you have something like this?

Cheers,

Aaron

Comments

fred0’s picture

Currently it does not. When I get a chance to go and deal with the other open issues I will see if this can be implemented.

alioso’s picture

Suscribing

i-sibbot’s picture

Subscribing to, would be great if this additon added a set of Maximum Quantity fields shown against all available roles in the product fieldset at create and edit.

fred0’s picture

The problem I see with this request is that for a site with many roles, the iterations of the settings could become overwhelming in the interface. I suppose we could use a permission to enable it per role and only those enabled would be displayed in the attributes interface. However, as I noted in another issue, I am now working a full time gig and don't have as much time to implement new features. If someone would like to make patch, then that might get this ball rolling sooner. Or... make me an offer. I'm willing to give up some off time from the regular gig if there's a financial incentive to do so.

As a side note: I try to contribute to the FOSS community when I can, but this is a module that will predominantly be used for obviously commercial purposes so I have no qualms about asking those who need something to pay for it.

holsworth’s picture

subscribing

bartezz’s picture

+1 role based min and max would be very nice idd!

What donation/sponsorship amount are you looking for?
There might be a small budget for this with my next possible project.

Cheers

fred0’s picture

Bartezz, I am willing to entertain any offer.

fred0’s picture

To make this more flexible and easier to use, here's what I am thinking would be a reasonable approach:

1. Implement a user definable list of "permission set" names in the main Product Feature interface (admin/store/settings/products/edit/features).

2. Each defined permission set then appears in the user permissions interface (admin/user/permissions) as its own entry with its own role selections. One would then set the allowed roles for each.

2. In the individual product features interface, have separate pop-up box selection (one for both min and max) that allow one to choose a permission set to associate with that product's min/max. Choosing a set applies the role permissions associated with that set (in step 2) to the min and max.

Thoughts?

bartezz’s picture

Hi Fredo,

So if I understand correctly one would be able to create multiple "permission sets", let's say a "retail role permission" and a "wholesale role permission". Then under admin/user/permissions one could check the "retail role permission" for a role "retail customer" and the "wholesale role permission" for a role "wholesale customer".

Then on a per product base one could set exactly what? There's where I'm starting to get confused :)

I like the first part. What I would love to see on the product edit page is the following (yes just thought of another feature):

role                          min         max         increment
retail customer            0           10           1
wholesale customer     10           0            10

Where 0 is an unlimited and also the default value and the increment can be set as well. Not sure if this latter feature is workable but it would be great. As in wholesale products are often sold in certain quantities (per package). Or do you know of another solution to achieve this?

Will still have to figure out what kinda budget I'm looking at since I haven't gotten to discussing money yet with the client. But possibly around the 250euro mark. Does that sound alright?

Cheers

fred0’s picture

The idea was that the permission set name would appear in the product edit settings, not the role names.
Also, I had not considered setting different min/max values per role. My idea was that you would set the min/max and then select a permission set, if desired, to limit the enforcement of the min/max to those roles enabled for the permission set.

Placing the role names into the product edit settings takes us back to my concerns in #4 above where a site with many roles could seriously (and unnecessarily) clutter the interface.

bartezz’s picture

Ok, I understand your last point, but then this would be an option though, right?!

permission set                          min         max         increment
retail customer permission            0           10           1
wholesale customer permission     10           0            10

I think it's a nessecity to be able to set the min and max for different permission sets per product, thereby being able to enforce min and max quantities for different roles. Also an increment value would be very nice to enforce certain roles to buy by quantities of X (increment). For wholesale purposes, the often need to buy per box/package instead of per piece.

Cheers

fred0’s picture

In that case, my approach would be slightly different. I would not use the permission set idea and instead, if a role is given min/max permissions, that role would then appear in the product edit with it's own settings as you describe. This could potentially make for a very long settings page.

Another concern is which role is enforced if a user has multiple roles that have with min/max limits. That implies some sort of setting to order them for priority (more complicated). And should that priority setting be global or per product (even more complicated).

A sub note of that is then which text gets displayed on the product page if enabled.

That's going to take some consideration.

javlinsharp’s picture

Im interested in this concept of role based capabilities for min/max and the increment value.
Anyone willing to join forces on an offer to fred0?

bartezz’s picture

I'm still working on the outlines of the project I'll be needing this for. But I can state the needs I have;

- per product fieldset with min-max module form
- per product one should be able to set a min, a max, an increment for each role
- some kind of permission settings to enable which roles should be settable in the fieldset above to prevent clutter
- possibly edit permissions of the per product/per role variables

The problem of multiple roles per user could be fixed by a dependency of http://drupal.org/project/role_weights

The idea of permission sets doesn't really work in this case but I reckon in most cases in retail and wholesale. I have checked with multiple clients and basically all products are packaged with numbers of products per package.

How does this sound to you javlinsharp and fred0?

Cheers

lilacbow’s picture

Is there any progress on this? It is exactly what I am looking for to enforce minimum quantity orders for wholesale user roles. Sounds perfect.

lilacbow’s picture

I can't contribute $ until my site is a go, but I would contribute a product gift!

beatnikdude’s picture

Subscribing
Currently using modified 6.x-1.x-dev on a development site to achieve a wholesale minimum. Currently w/ hardcoded roles, its not pretty. I would be interested in making this happen and would definitely test any solutions.

bartezz’s picture

Has anyone tried the 2.x version of uc_multiprice. I've just developped a lot of features (i18n support / role based pricing / import & update / price fallback settings for currencies) which the maintainer has committed.

I think the solution used in uc_multiprice might be a solution for this module as well. It works on the "add one more" principle. In the module settings page one can activate the module for certain roles. Then on the node edit form there's select list a maintainer can select a role (or country) from after which an extra set of inputs is generated via AHAH. So only inputs are generated when needed, no more clutter.

For the role based pricing I made the module semi dependend of role_weights module. So the role with lowest numeric weight will be used to define pricing so it doesn't matter if a user has multiple roles.

Am not 100% sure if I will be needing UC Product Min and Max yet but if I do I will see if I can implement role based min, max and increment in a similar way....

Cheers

beatnikdude’s picture

Bartezz,
Sounds like a promising angle for uc_multiprice module. I will keep an eye on that as I am currently using uc_price_per_role and a modified wholesale_product_minmax.
I would like to see a uc_price_per_role add functionality for minimum, maximum quantity limits on products.
For my needs I would like to see separate minimum & maximums based on roles as well.

bartezz’s picture

Hi BeatnikDude,

You are mentioning wholesale_product_minmax is that a custom version of the uc product minimum and maximum module?
Not sure the feature request you've made is in the right issue queue. I think this kind of functionality should be implemented in this module, possibly 'borrowing' code form uc_multiprice.

Cheers

fred0’s picture

Bartezz, I have just committed fixes for all known bugs. Once the new nightly build is available, I would be interested in seeing how you might approach adding role definitions.

stewart.adam’s picture

StatusFileSize
new7.5 KB

Attached patch gets us halfway there and supports the creation of uc_product_minmax features that apply to only a single role or all roles. However, the limit of one definition is still in place. In order to get this working with multiple roles simultaneously, someone would have to patch this for use with role_weights because a user could be a member of two role conflicting definitions (e.g. 'authenticated user' and 'wholesaler'). I may look at doing this eventually, but it was out of scope for my current project.

avpaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, since Drupal 6 is now not supported.