Taxonomy qty

Bartezz - October 21, 2008 - 17:30
Project:UC Discounts
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

I came here from http://www.ubercart.org/contrib/143.
I'm trying to make the discount module work for me but have some issues with the following;

I've created a taxonomy qty (http://www.ubercart.org/contrib/143#comment-24926) discount and have the following conditions;
group 1 - weight 0 - property 'taxonomy qty' - op >= - value 5
group 1 - weight 0 - property 'taxonomy qty' - op < - value 8

Action:
Discount product Taxonomy price from order - Amount 6%

Now when I order 6 products of taxonomy X I don't get discount, but when I remove the second ( <8 ) condition it does work?
I could set the weight and check exclusive on the second condition but then all my other taxonomy qty discounts will stop working.
But when I remove the second condition and also have a discount for >8 products the systems gives the discount for 5-7 (6%) plus >8 products which is 12%. Bit too much :)

What I'm basically trying to do is give 6% bulk discount when one orders 5-7 items of product X and 12% if one orders more than 8 items of product X.
Normally a simple bulk discount would do. Yet due to attributes product X can have 2 different variations, let's say I order product X with attribute color red 4 times and product X with attribute color white 4 times the system won't discount. Eventho it basically is product X times 8. So I thought I'd use Taxonomy Qty and create a term for each product which I need to discount.

Hope my story isn't to confusing and someone can help me out!

Regards

#1

Bartezz - October 21, 2008 - 18:40

Hmmz, I think I found the reason for it not to work: weight

group 1 - weight 0 - property 'taxonomy qty' - op >= - value 5
group 1 - weight 1 - property 'taxonomy qty' - op < - value 8

doesn't work

group 1 - weight 0 - property 'taxonomy qty' - op >= - value 5
group 1 - weight -10 - property 'taxonomy qty' - op < - value 8

does work, so it needs to check the greater value (8) before the lesser value (5).

Is this a bug or a feature?

EDIT
Well I should have checked more thorough....

I found now that when one orders 4 times product X she/he still get's the discount, but when ordering the 2 times the item the discount isn't being calculated? Eventhough this is the condition:
group 1 - weight 0 - property 'taxonomy qty' - op >= - value 5

Some weird stuff going on, will get back on this!

Cheers,
Bart

#2

psynaptic - October 22, 2008 - 11:55

The module seems to work in part but other bits either just don't altogether or are so confusing it seems like they don't work. I can't get the operators to work as I would expect.

It's great that you are looking into this and reporting back which bits are clearly broken, keep it coming. We need to do a full audit of the module and all these examples will certainly help.

#3

Bartezz - October 23, 2008 - 09:09

You're welcome! I think discount module is a must have on ubercart so I hope my input helps!
Do you think the conditions part of it is something that can be fixed?

Cheers,
Bart

#4

joachim - October 26, 2008 - 17:56
Title:Conditions and actions» Taxonomy qty

Bart, are you using the code from the comment you've linked to?
Because as far as I know, that code (uc_discounts_productm.module) isn't in our version yet. What is it meant to do?

#5

Bartezz - October 26, 2008 - 23:07

Hi Joachim,

It's quite a nice idea! Let me explain what I'm using it for.

I have some products which have customizable attributes like engraving. If one adds this same product 5 times with different attributes she/he doesn't get 5 items bulk discount because ubercart sees them as 5 different products.

I use the submodule to give discount based on the quantity of a certain taxonomy group ordered. In my case I created a term for each product so one will still get bulk discount eventhough ubercart sees them as different products.

There is a problem with the submodule though. I emailed jiojio74 about it but haven't heard back yet. Basically he used uc_discounts.product.module and rewrote it partially. Now line #25 in the code; 'property' => 'product_from_order', will cause the normal product discount submodule to break.

Besides that it's a good discount idea!

The thing is that I tried the operators also on uc_discounts.product with the taxonomy qty module uninstalled and they still don't work. So the operators in discount core don't work properly I think. Hope someone with more knowledge of things will look at this soon cause I need it badly.

Keep me posted!
Cheers,
Bart

#6

Bartezz - November 2, 2008 - 16:05

Subtle bump :)

Any news on the conditions?

 
 

Drupal is a registered trademark of Dries Buytaert.