I have created more roles and more discounts for the same product, depending if the user is a customer, a reseller, etc. Then through Conditional Actions I have applied to the product the discount (let's say 10%) linked to the role entitled to the 10%'s discount.
On the product node I can see the discount is correctly applied. But when I purchase I get the discount applied only to the subtotal, while VAT e the Total Order are shown not discounted. If I also add the shipping cost, I get a first subtotal discounted, the shipping cost, a second subtotal not discounted and then VAT and Total Order not discounted.

I do not know what I'm doing wrong here. I tried to apply the discount eigther with the add mode and the multiply mode, but VAT and total seem not to "hear" the discount. Could you help me telling me what I have to do to solve this problem?

Thank you very much!

Attached is an image.png taken from the checkout page to help my english ;)
The Total original price ordered is of 400 euros.
As you can see, discounts have been applied and the subtotal is correctly 253 euros.
Then shipping cost is added for a 13 euros.
Then we have an overall subtotal without VAT, but it doen't report the discount: it is of 413 euros and then VAT is applied to this second subtotal.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Island Usurper’s picture

Category: support » bug
Status: Active » Needs review
FileSize
8.9 KB

I've been busy working on the 2.0 release of Ubercart, and I haven't been keeping this module in sync with those changes like I'd planned. I finally found some time to do it, though, so here's a patch for you to look at and test.

I think a large part of the problems with uc_discount are fixed by #595832: hook_line_item_alter() is called twice, but it needs some good reviews to make sure I haven't missed anything. You'll also need #600478: Subtotal excluding taxes doesn't use uc_price() if you use shipping quotes.

Valdes14’s picture

Thank you Island!

Your patches work almost perfectly.
The only error left is that products' VAT is calculated on the original (not discounted) product's prices. VAT applied to shipping cost is correctly calculated (I don't have and will not have uc_vat module enabled).

Now I get this picture (with a VAT of 20%, original products amount of € 300,00 and a discount of 50%):

Subtotal € 150
Shipping € 10
Subtotal without taxes € 160
VAT 20 € 62 (instead of € 32 - shipping's VAT is correct -2 euro-, products VAT should be € 30 not 60)
Total order € 222 (instead of € 192 due to wrong VAT calculation)

However, you made a very good job so far :-)

Island Usurper’s picture

That's an interesting observation. I just updated the patch at #600478-7: Subtotal excluding taxes doesn't use uc_price(), so if you can test that out again, that would be great.

Valdes14’s picture

FileSize
21.4 KB
23.67 KB

Now the ../cart/checkout page is correct (see screenshot-1.png), but in the ../cart/checkout/review page there is still an error (see screenshot-2.png) because in the "Subtotal excluding taxes" it counts only the shipping cost, not the product's cost, VAT is applied to the original, not discounted product's price and so the total is wrong too.

Valdes14’s picture

Hi Island,

did you have any chance to give a look to the checkout/review's page problem as per #4 above?
I attempted to see what is wrong in the code, but i'm not a programmer and I'm not been successful ;-)

So, I'm looking forward for your good news.

matero’s picture

I've patched with 597992_uc_2.0_catch_up.patch

Now the discount shows up in the total. Nice.

but...

Now on the completed order page I get:

warning: __clone method called on non-object in .../sites/all/modules/uc_discount/uc_discount.module on line 110.

The error shows up even with my "Calculate product discounts" Conditional Action deactivated.

Uggh
Any Ideas?

dave bruns’s picture

Just want to confirm the same error as #6, which happens after clicking 'submit' on the review order page. I am running:

ubercart 2.0
date conflict patch 611044
no locks patch (drupal.org/node/618932)
discount framework patch 597992

Error doesn't seem related to products with discounts - an order with a single non-discounted product also throws this error on submit. The order itself is created, but the order totals do not reflect the discount.

Let me know if I can provide more info.

GiorgosK’s picture

FileSize
9.53 KB

Here is an updated patch that works with ubercart 2.2
seems to resolve the problems from #4,5,6,and 7

NOTE: Does not need ANY other patch for discounts or ubercart core
THUS, don't use ANY of the patches mentioned in this thread ;-)

patch uc_discount 6.x-1.x-dev 2009-Aug-22
from within the modules directory
and please report back

NOTE: it also includes the small patch found here #623124: Show discount on cart and checkout pages in order to display discounts on the checkout page

NOTE to developers:
difference with previous patch is

//line 109 uc_discount.module
    case 'order_product':
        $node = clone $context['subject']['node'];
        $item = $context['subject']['product'];
        $cache = 'order_product:'. $node->nid .':'. $price_info['price'] .':'. serialize($item->data);
 

to

    case 'order_product':
      if (isset($context['subject']['node'])){
        $node = clone $context['subject']['node'];
        $item = $context['subject']['product'];
        $cache = 'order_product:'. $node->nid .':'. $price_info['price'] .':'. serialize($item->data);
      }
      else if (isset($context['subject']['order_product'])){
        $order_product = clone $context['subject']['order_product'];
        $cache = 'order_product:'. $order_product->nid .':'. $price_info['price'] .':'. serialize($order_product->data);
      }

since on the cart/checkout/complete page I found out that $context['subject']['node'] does not appear to exist but $context['subject']['order_product'] appeared to have all that was needed for $cache

used a debugger for this and hope my assumptions are correct

Valdes14’s picture

Thank you for your job GiorgosK, but unfortunately it doesn't solve my issue. So far the best result I reached is as per #4 above (ubercart 2.0 and Island patches) where the checkout page was correct.

I have seen here http://drupal.org/node/600478#comment-2305980 that you tried 2.2 taxes with and without http://drupal.org/project/uc_discount module in use and you noticed no problem whatsoever and that you have no problems without the 600478_tax_subtotal.patch (http://drupal.org/files/issues/600478_tax_subtotal_0.patch) using uc 6.x 2.2, taxes behave as expected.

I wonder if you just activated the uc_discount module or if you also configured it assigning some discounts, because I'm getting a complete different picture.

This is my situation:

Through conditional actions I created discounts assigning them to roles and I can see the correct discounts applied to products based on the different role I use to access the site, so I assume that part of the story is ok.

With regard to the checkout I get the following situations (I will use some screenshots as sometimes images describe better than words):

Situation 1) Using Ubercart 2.2 and uc_discount 6.x-1.x-dev 2009-Aug-22 (not patched) and accessing it with a role with no discout associated (so discounts are not shown) everything is fine: checkout page, preview page, order page and the order emailed. See screenshot nodiscount-nopatch.png

Situation 2) same as 1 above but this turn I use your patch 597992_1.patch (http://drupal.org/files/issues/597992_1.patch). The result is the same as in 1 above, so I get no problem with taxes eighter with or without your patch (which is likely the same you got).

Situation 3) Using Ubercart 2.2 and uc_discount 6.x-1.x-dev 2009-Aug-22 (not patched) but accessing it by a role with a discout of 30% associated. On checkout page Subtotal excluding taxes doens't reflect the discount, while preview page, order page and the order emailed do not reflect the discount at all event on product items. See screenshot withdiscount-nopatch.png

Situation 4) same as 3 above but this turn I use your patch 597992_1.patch (http://drupal.org/files/issues/597992_1.patch) and I get the same result as in 3 above.

So, do you experience the same issues if you apply a real discount or it is just me doing something wrong?

GiorgosK’s picture

I am actually using discounts per role with the help of conditional actions and I just have ubercart 2.2 and my patch applied to uc_discount and I seems to have solved all those problems

NOTE: a very important point is that you have to have taxes applied to discounts as well

in admin/store/settings/taxes/1/edit under "Taxed line items:" you should check both Discount and Tax as seen in the attached screen shot. That should do it.
EDIT: tax line does not need to be checked.

If this does not seem to help I would advise you to run update.php since it can clear all the cache. This was giving me a lot of headaches actually.

Valdes14’s picture

Well, I took some time doing several tests and I run updated.php quite a lot of times ;-)
I kept cecking my files with your patch to ensure I didn't miss a comma and the final result is that on the checkout page I'm always getting "Subtotal excluding taxes" and "VAT" applied to full price, not to discouted prices, i.e. I'm back to the original post in this tread, the only difference being that this turn the TOTAL is made up of the correct discounted product' subtotal plus the wrong not discounted VAT.

I'm not a programmer so I cannot judge if there is something wrong with the code or if it is just a misconfiguration on my part, in which case I don't know where to look at. All products in my site are subject to VAT and to be discounted, so I didn't create any class and I'm just using the standard product content type.

I testes also by checking Discount and Taxes on admin/store/settings/taxes/1/edit as you suggested, altough I don't understand why you are applying tax to taxes. On Ubercart site I found this post where Lyle says not to do so, see http://www.ubercart.org/forum/support/11358/tax_product_vs_tax_order. Anyway, I guess this is not the source of my problem.

4kant’s picture

Hi Valdes,

I do have the same issue as you.
I think, discounts are well configured by you in CA.

Furthermore I´m using two more product classes.
As you said: the "Subtotal" value shown in checkout page is the correct discount total.
And although I tried without any tax rules the "Order total" value is the "un"-discounted value (price).

Customers are forced to pay the original price(s).

I haven´t tried any patches yet.

CU - 4k

4kant’s picture

Now I applied the patch #1 (http://drupal.org/files/issues/597992_uc_2.0_catch_up.patch).
Got the same effect as Valdez in #2 in checkout and review.

Furthermore I get an error after submitting the order:

Order number: [order-admin-link]
Customer: [order-first-name] [order-last-name] - [order-email]
Order total: [order-total]
Shipping method: [order-shipping-method]

Products:
- 1 x

Next thing I did was deleting the tax-rule again, emptying cache etc.
Still the same error in checkout/complete

4k

GiorgosK’s picture

@4kant
the patch you tried does not work because UC2.2 release has some major changes under the covers

if you are using UC2.2 please try newer patches first such as patch from #8 (but apply in a clean installation of uc_discount - without any patches on it)

I have tried all other patches around and don't work but this one I created and its working

Still I needs some testing so we can tell the developer to apply it to the module

4kant’s picture

@GiorgosK
thanks for your hint.

Just to be clear: there´s no other patch I have to combine with this "597992_1.patch"?

Or do I have to take a look somewhere else too?

GiorgosK’s picture

just patch from #8 ALONE on clean installation of uc_discount
(everything else I tried created problems)

4kant’s picture

Hi GiorgosK

here is my report (wrong values are strong):

  1. Applied the patch on a clean uc_discount install. uc_vat installed but no tax rate and flatrate 0 -->
    • Discount product price product shows discount price (correct)
    • Order this product --> Subtotal and Order total are correct in checkout and review page
    • Submit the order --> everything´s OK
    • Combine the discounted product with two non discounted products in the order --> all steps are OK
  2. Add a tax rate (19% European Tax) (Taxed Line items "Discount" and "Tax") -->
    • Tax and Discount price in Cart are OK
    • Tax value in checkout and review page is taken from original price, not discount!
    • subtotal and order total are OK
    • turn off taxed line items --> no difference
  3. uninstall VAT European Vat support -->
    • clear all caches
    • subtotal is correct
    • now the line "subtotal excluding taxes" appears (was turned off in VAT configuration) and shows the original price (correct)
    • tax is taken from the original price (wrong like last case)
    • this time: "order total" is subtotal + tax (wrong!)
    • turn back on tax line items "discount" and "tax" --> no difference
  4. install VAT European VAT Support again (just to be clear whether I didn´t take care before)
    • the total order is back correct (same value as subtotal)
    • the tax value is taken from the original price (still wrong)

With the European Tax (VAT) it´s very close to be correct.

Is there something i can change (try) in configuration?

Thanks

GiorgosK’s picture

Are you using http://drupal.org/project/uc_vat ?

the discount above and the latest patch assume
the core uc_taxes from uc 2.2 and uc_discount 6.x-1.x-dev from 2009-Aug-22
no other extra modules have been tested and are probably not compatible with this module

if you want uc_vat support/features added you have to create another issue in this module's issue queue or in uc_discount issue queue

Another option would be to try the core uc_taxes which work pretty good with different taxes per region/country ...

- Enable module
- admin/store/settings/taxes/add
Create different taxes for each country/region (remember under Taxed line items: check Discount)
- Click conditions and use Condition: Check an order's billing State/Province and select appropriate regions that apply
admin/store/ca/uc_taxes_1/edit/conditions

4kant’s picture

- Uninstalled uc_tax
- cleared caches
- delete browser cache
- did what you described (add tax, regions, conditions)

The result is the same as 3.

4kant

GiorgosK’s picture

did you apply the patch from #8 ?
that is what this patch is doing here !!

4kant’s picture

#8 - of course.
The effect was that instead of having order totals without discounts they are now correct.

I don´t know where the difference is to your installation/configuration.
Are there some other configurations in CA that I don´t know yet?
Or a tax rate for US parallel?

GiorgosK’s picture

FileSize
13.54 KB

Just did a test run with a clean drupal install and all works as I described

- Clean install of drupal 6.14, ubercart 2.2, latest dev release of uc_discount and patch from #8
- created an action for discount, (trigger calculate order discounts, action: apply a discount, multiply -0.50)
- created one tax rule with (tax line items: checked Discount)

take a look at the screenshot that proves this

if you want to work with your existing ubercart I am not sure what patches are still in your code
overwrite ubercart files with a clean set of files from http://www.drupal.org/project/ubercart
also install clean code of uc_discount and patch it with 597992_1.patch
do a clean cache and should be ready to go

if this does not work probably you have modified other ubercart related files ... try with a clean install like I did

4kant’s picture

Tried the trigger "Calculate order discounts" as you described in my existing installation.
The result is the same as yours: Everything works like you showed in your screenshot.

The difference between your and my CA-configuration is:

I used the trigger "Calculate product discounts".
This is useful to show discounted price(s) on the product page (and I guess it is important to have this feature).

If I combine both triggers (taking care of correct weights) I realize that the trigger "C. order discounts" does not use the discounted value of "C. product discounts".

4k

GiorgosK’s picture

Status: Needs review » Reviewed & tested by the community

Don't think that the original uc_discount was meant to show the discounted price on the product page !!! I think only on the checkout and review pages !!

That is why there is a new module around that does that but have not tested it http://drupal.org/project/uc_member_pricing

thus I am marking this issue as RTBC

Valdes14’s picture

Thank you very much 4kant and GiorgosK for your work.

Well, now we know that GiorgosK's good results are due to the fact he applys discounts to order totals while 4kant and I we are applying discounts on a per product basis, which I feel is a feature really important.

I hope uc_discount was not intended to be used only with order totals and I would like to know Island Usurper opinion about this point. As a matter of fact, I stated in #1 that I was using "more roles and more discounts for the same product, depending if the user is a customer, a reseller, etc." and Island didn't say I was doing wrong at that time. Furthermore I did other tests and I found that with a Drupal 6.14, a fresh UC2.2 and a fresh uc_discount patched as per #8 plus Island patch http://drupal.org/node/600478#comment-2145516 "600478_tax_subtotal.patch" I get completely correct figures on checkout page (as it was in #4). Things then get messed up on preview and order pages, but on my opinion it is just a matter of enanching Island's patch because if the checkout page is correct it means Island's patch is on the right direction.

Just my 2c :)

jurgenhaas’s picture

I've done intensice testing for a client of mine on this issue for the last 3 days and I'm quite sure, this is not a uc_discount problem. It is related to the uc_vat module and I have just created a new issue there describing all my findings: #677868: UC_VAT and UC_DISCOUNT compatibility problem

Valdes14’s picture

I'm happy the discussion is getting on :-)

I just want to point out that, as said in #2, I'm not using the vat_uc module.

jurgenhaas’s picture

Which module is calculating your tax then? Is it just CA driven? If so, then I wouldn't be surprised if there were similar problems but tzhe UC_VAT discussion should probably be in #677868: UC_VAT and UC_DISCOUNT compatibility problem

GiorgosK’s picture

NOTE:

my patch solution from comment #8 above uses the default uc_taxes that comes with core ubercart (does not use this project http://drupal.org/project/uc_vat)

and assume works as described (using it on two installations already)

Valdes14’s picture

@#28 I'm using the default uc_taxes module too. I differ from GiorgosK in the discount application as per #23 and #25.

p4trizio’s picture

Hi GiorgiosK,
I applied you patch and everything is working fine if not for this error:
Fatal error: __clone method called on non-object in (path to drupal)/sites/all/modules/uc_discount/uc_discount.module on line 111.
This is happening when a customer is viewing his/her orders. It seems to give this error only with discounted orders, the others are working fine.

Hope I can help

p4trizio’s picture

Does anybody have the same problem? Or I'm the only one?

jazzitup’s picture

@GiorgosK: You've mentioned a great new module http://drupal.org/project/uc_member_pricing - is there a way for UC Discount Framework goes along with that module like this:

If there's a price set for a user/role by using uc_member_pricing, it should be possible to prevent that price from altering by any of product related discounts. Is there any workaround for this or should it be a new feature request for uc_discount?

GiorgosK’s picture

@p4trizio
Unfortunatelly I can't reproduce what you say in #31
please give a more detailed description of exactly the steps that are leading to this error

GiorgosK’s picture

@madjoe
I have not tested that module thus I can't comment about it ... you have to test it yourself ...

kccmcck’s picture

My configuration requirements are unique, but similar to the topics discussed in this thread.

I have two user roles: "Type1" & "Type2."

"Type1" receives a 3% discount on EVERY product while "Type2" receives a 5% discount on only a SELECT number of products based on if the product(s) fall under a specific taxonomy category. For this reason, I need to use the "Calculate product discounts" trigger as opposed to "Calculate order discounts" trigger. I don't want to use the UC Member Pricing module because I don't want to have to specify the percentage-based discount for every product node. I like UC Discount's ability to apply the rule automatically.

For this particular site, my Ubercart setup doesn't need to collect credit card information or process payments. Instead, I'm using Ubercart to act more as an "order-form." Customers receive an email notification after they have placed an "order," and the total dollar amount (before taxes) reflects the correct product discounts (thanks to the patch from #8).

Although the order total is correct and the discounts are correctly applied in the email notification, when I review the order as an admin, the order total does not reflect the discounts, which is what I need to resolve. How can I configure or patch the UC Discount module to display the correct order total at admin/store/orders/view?

I would greatly appreciate your suggestions.

GiorgosK’s picture

@Kathryn531
I don't see any problem on admin/store/orders/view
discounts are displayed properly

For all users trying this patch
This is the setup that I have tested this patch with

Trigger: Calculate order discounts
Condition: Check the role of the user. 
Action: Apply a discount Multiply -0.50, Discount type: Order total , Line items: Discount

Any other setup is not tested and I can't assume its working

brunodbo’s picture

Applied patch in #08: works for me. Discounts are now shown correctly in the order's total. No errors so far.

- Trigger: Calculate product discounts
- Condition: Some custom PHP code to apply discount when the user flagged a product node (using flag.module)
- Action: Apply a discount to a product / Multiply -0.50 / Discount type: Products

Thanks @GiorgosK!

jazzitup’s picture

If patch in #08 works, can we officially test it and port it in dev?

rfmartorelli’s picture

Status: Reviewed & tested by the community » Active

I need the entire order discounted based on the purchase of one item (a trial membership), but for some reason the discount only gets applied to the one item and not to the whole order. Does anybody have any suggestions as to why this might not be working?

GiorgosK’s picture

@rfmartorelli
a lot of people have tested this and found it to be working
but it only applies to limited cases (lets get this commited first)

make sure you understand the assumptions of where it applies

my patch solution from comment #8 above uses the default uc_taxes that comes with core ubercart (does not use this project http://drupal.org/project/uc_vat)

setup to make it work

Trigger: Calculate order discounts
Condition: Check the role of the user.
Action: Apply a discount Multiply -0.50, Discount type: Order total , Line items: Discount

any other settings might not work

GiorgosK’s picture

Status: Active » Reviewed & tested by the community
Island Usurper’s picture

Status: Reviewed & tested by the community » Fixed

Firstly, apologies for not staying on top of this issue queue. I ought to get a co-maintainer, or probably just hand it off to someone.

Secondly, I committed the patch in #8 since it seems like it fixes several people's problems.

Thirdly, I would really like to keep compatibility with uc_vat, so if someone can figure out how to make that happen, that will be great.

Valdes14’s picture

Happy to hear from you again Island!

Great that you committed the patch #8, so discount based on orders will find it's proper way.
But what about discount based on products? Any news?

Status: Fixed » Closed (fixed)

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

dsdeiz’s picture

Hi! Yeah, I believe this is closed though I have a similar problem. It was also displaying Fatal error: __clone method called on non-object in /path/to/drupal/sites/all/modules/uc_discount/uc_discount.module on line 111

I then tried var_dump'ing $context['subject']['node']) and the result was bool(false). Does it mean that it would pass the isset() function?

If so, then I guess it can be changed to if (isset($context['subject']['node']) && is_object($context['subject']['node'])){?

Any help appreciated!

Thanks!

Anonymous’s picture

Status: Closed (fixed) » Active

I have 6.x-1.x-dev which apparently has the #8 patch implemented, however the discount is still applying to the amount before tax, instead of the order total:

Order total preview:
Subtotal: $2,000.00
10% Sale Discount: -$200.00
Subtotal excluding taxes: $1,800.00
GST: $200.00
Order total: $2,000.00

I am using Ubercart's built-in 'taxes' functionality to apply the GST tax. The discount type is set to "Order total" and under "Line Items", Tax is checked.

GiorgosK’s picture

Title: Discount not reflected on total order » Discount not reflected on total order (FIXED for Trigger: Calculate order discounts)

@afestein

did you have these settings for your configuration ?

Trigger: Calculate order discounts
Condition: Check the role of the user.
Action: Apply a discount Multiply -0.50, Discount type: Order total , Line items: Discount

this patch took care of ONLY this case
I believe the important setting is "Trigger: Calculate order discounts"
any other settings/cases MOST PROBABLY don't work

if you indeed have any other settings and things don't appear to work please open up a new ticket with ALL the details
and you can point to this issue for reference to the developer

Anonymous’s picture

Sorry, I didn't pick up on that. I will create a new issue.

tjjacobsen’s picture

All,

I'm seeing the "Fatal error: __clone method called on non-object in /path/to/drupal/sites/all/modules/uc_discount/uc_discount.module on line 111" message wheneven I try to view / edit / delete the order.

The repro steps are simple:

This happens every time I edit an order then select "add a blank link" in the products section.

Any thoughts?

-Todd

GiorgosK’s picture

@tjjacobsen

is your setup exactly like this

Trigger: Calculate order discounts
Condition: Check the role of the user.
Action: Apply a discount Multiply -0.50, Discount type: Order total , Line items: Discount

if not then this issues solved this case
if your case is different please open up a different issue

just outline the steps one needs to reproduce your problem

calbasi’s picture

Hi dsdeiz,

You are right, I've got same error you describe here:

http://drupal.org/node/802900

and your patch is the solution to get ride of the error message.

Ps.: now, patch described in #8 is part of dev (and official) release, and ii don't prevent the error I've got.

Ps.: I describe my bug (solved with your code)

Ubercart (6.2.3) and Uc_discount (dev from 20100711)
I've got discount by role over orders, by taxonomy over products , by "total order amount" over order...
And all was OK
But, a shop worker has modified AN order (only one). I don't know if she has changed any prices, weights...
And the result is that I can edit any of my orders BUT this only one (the edited order).
Then, THE REASON (tigger) WITCH ACTIVATES MY BUG IS THE EDITION OF A ORDER (/admin/store/orders/xxxxx/edit)

Before application dsdeiz patch I've tried to disable all discounts in Contitional Actions page, but it didn't solved my issue.

I add more information or do futher test for you, if mantainers/developers are interested (please, contact me at joan (@) calbasi (dot) net)

Regards

GiorgosK’s picture

I don't think patch from #8 is in dev release (or anywhere) you have to apply it
otherwise developer would have changed status of this issue

allanp’s picture

I have installed a fresh copy of Ubercart and the uc_discount module but I am still getting the same problem as GiorgosK outlined in #22: on the checkout page discount and texes are fine, but on the review order page the taxes are based on the amount before the discount is applied. (but if you click "back" on the review page to go back to checkout and then return to the "Review order" page the taxes are shown correctly).

I did not apply the patch from #8 because Island Usurper had committed that patch (see #43)

I am using: Calculate order discounts for the trigger and Apply a discount for the action.

Any ideas what I may be doing wrong?

antiorario’s picture

GiorgosK: I checked, and the patch from #8 is in the latest dev release. But the module is still nowhere close to working properly.

I'm trying to apply a discount *after* taxes, or after Order total, but the module keeps applying discounts only to products, completely disregarding what comes after (whether it's fees or taxes or anything). I'd have a look myself, but I've never developed for Ubercart-related modules, and right now I don't have the time. Maybe I can give it a try in a month or so, if no one else comes up with a solution.

czeky’s picture

Hi all, some issues here as well, after 20% discount (with 10+ products in a basket) everything works fine except tax is not REcalculated and stays at the level it was before discount, if someone could help eith this, would be cool, thank you all..

original price 100
discounted price 80
tax is 20% so tax has to be 16, not 20

GiorgosK’s picture

Status: Active » Fixed

As per Island Usurper (module maintainer) this patch solves a limited case scenario
and it is already in at least the dev version

and that is reflected in the title of this issue as well

please make sure your setup is EXACTLY this (you can change 50% to your own value)

Trigger: Calculate order discounts
Condition: Check the role of the user.
Action: Apply a discount Multiply -0.50, Discount type: Order total , Line items: Discount

IF its not please open up a new issue and describe it so someone can look it up

czeky’s picture

Hi, my case is:

Trigger: Calculate order discounts
Condition: Check an order's number of products
Action: Apply a discount, multiply -0.2, Discount type: Order total , Line items: Discount, field "Order products" not fileld

GiorgosK’s picture

Try the setup above
if it still works (and it should) please open up a new issue

Status: Fixed » Closed (fixed)

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

jaypark’s picture

"used a debugger for this"
GiorgosK what debugger?

GiorgosK’s picture

you could use
eclipse, aptana, netbeans with xdebug or other debuggers
http://drupal.org/node/147789

I personally use netbeans