The prices in the confirmation are the normal prices without the discounts.
Should i use another variable in the formtemplate(customer.itpl.php) for that or is this a bug in the discount module?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

Can you describe your discount here? I see the discount l listed in order confirmation emails without theming.

robbertnl’s picture

I am using discounts based on the item count. For example, customers gets a discount when they order more then 100 of the same product.
I use the default customer.itpl.php. Which variable should contain the discount information? Or am i missing a setting somewhere for including the discount information in the mails to the customer?

robbertnl’s picture

i am using the non-cck field discount. Can you tell me what i forgot?

robbertnl’s picture

Status: Active » Postponed (maintainer needs more info)

In the review order page(/cart/checkout) is the discount missing as well

robbertnl’s picture

Status: Postponed (maintainer needs more info) » Active
robbertnl’s picture

Title: No discounts in order confirmation mail » No discounts in order confirmation mail / checkout page
Status: Postponed (maintainer needs more info) » Active
msumme’s picture

I'm having the same problem as well. Quantity based discounts and they're not showing up on the checkout page (where mailing address and payment information is entered) or on the order review page right after that.

I'm not sure if this problem is new, or if it's been this way since it was installed.

piepkrak’s picture

I am having the same problems listed above. The checkout and order review pages do not calculate and/or display the discounts.

ezra-g’s picture

Category: support » bug

This is because uc_discounts_alt is incompatible with jQuery update and the discount display requires jQuery. I'll post a patch that addresses the JS but really I don't see why we shouldn't be able to display discount information without JS, so that seems like its own separate bug.

protopopov’s picture

I have same problem.
I view checkout page and enter discount codes, press button, but a line with discount amount has not been shown.
Then I press "View order" - a discount line has been displayed.
I also noticed that on checkout page then I press update discounts button the table uc_orders has been updated - a total field has been calculated correctly, so ajax callback is worked, but changes don't made on page.

FranCarstens’s picture

Having the same problem. Discount are not showing on Checkout and are not applied. They do show on Cart page.

yktdan’s picture

Same issue, I think. This is so I subscribe and see when it is fixed.

freatida’s picture

Same issue. Using quantity discounts with no codes. Discounts are calculated on cart page but not on checkout page.
This was working fine for me until yesterday, when I upgraded to latest version of the module. Then it stopped working. I switched back to the older version, but still not working.

robbertnl’s picture

Priority: Normal » Critical

Marking as critical, since the non-cck field discount is now almost useless with this bug

ryangroe’s picture

FileSize
1.73 KB

I have replicated the error using jquery_update (6.x-2.0-alpha1) and come up with a fix that is backwards compatible. Please test the attached uc_discounts.js replacement file. It should work with jQuery 1.2 and jQuery 1.3, uc_discounts_alt branch 1 and 2.

kaata’s picture

doesnt work for me

ryangroe’s picture

Can you provide some information about your setup? Are you seeing a javascript error (under "Tools/Error Console" in Firefox when you load the page or click to calculate discounts.

ryangroe’s picture

Here's what I am running and both the 1.0 and 2.0 branches are working for me:
Drupal 6.17
Ubercart 6.x-2.2
jQuery Update 6.x-2.0-alpha1
Content Construction Kit (CCK) 6.x-2.7
Date 6.x-2.4
Ubercart Discounts (Alternative) 6.x-2.x-dev (2010-Jan-08) + attached fix
(plus a bunch of other modules which should not effect this behavior)

Please let me know what you are running differently and exactly what you are seeing. For me I was initially getting an alert box popping up and a js error in my FF Error Console indicating the jQuery selector format "@id=*..." was invalid.

yktdan’s picture

Also fails for me. Nothing related to this issue in FF Error console. I do get a message line in the cart that the discount was applied ($0) instead of a 25% discount that should have been applied.

Drupal 6.17
Ubercart 6.x-2.2
jQuery Update 6.x-2.0-alpha1 (Tried to install but it says it is incompatible with D6.17 - so test is without it)
Content Construction Kit (CCK) 6.x-2.7
Date 6.x-2.4
Ubercart Discounts (Alternative) 6.x-2.x-dev (2010-Jan-08) + attached fix

yktdan’s picture

Ignore above comment about jQuery Update 6.x-2.0-alpha1 (I got the wrong module). With correct one installed I get the same failure.

freatida’s picture

Works for me, thanks very much for the fix. Only issue is I have to enable the enter discount codes pane and then hide it with css. If I don't have the discounts code pane enabled, no discount is applied on checkout page.

ryangroe’s picture

Good to hear, freatida. I know hiding the panel via CSS is a hack. I will add a global configuration flag for that at some point.

Everyone else please give me as much information as you can to debug and I will do my best. Thanks!

ahughes3’s picture

Status: Fixed » Active

I was also having trouble getting the discount to display on the check out screen when the discount codes pane was disabled. I followed the instructions listed on #21 and the discounts now display correctly on the Ubercart checkout screen , BUT the discounts are not applied when I actually get to the PayPal checkout screen.

ezra-g’s picture

Status: Active » Fixed
FileSize
4.91 KB

Sorry about the delay here.

I committed the attached patch which should resolve the issue, and will be available when the dev is re-rolled. Please re-open this issue if it isn't resolved.

ahughes3’s picture

Status: Active » Fixed

The patch did not work for me. When disabling the discount codes pane my discounts on the check out screen did not calculate.

Also, I still was unable to get the discount code to transfer over to the PayPal checkout screen

ezra-g’s picture

Status: Fixed » Active

It's possible I uploaded the wrong patch.

Can you confirm that you cleared your aggregated JS cache though?

ezra-g’s picture

FileSize
1.18 KB

Sorry, how about this one ;)?

fmueller’s picture

I don't know to which version the patch in #27 should be applied so I made the changes in that patch manually in the current version. The effect is, that cart/checkout shows the discount in the section "Payment method". Therefore I suggest to make the two modifications in the current development version as well.

davidburns’s picture

Status: Active » Needs review
Sohodojo Jim’s picture

LATEST PATCH - 673326-.patch (#27) - worked for me.

I had this issue, too, on a complex and somewhat customized site that needed a lot of recent modules updates. I noticed that the discount checkout page stopped working (the throbber and updated discounts-applied list display) but I suspected about everything else prior to nailing this down to the Javascript error reported (and apparently solved) here. I am running JQuery Update 1.3.2 and JQuery UI 1.7.2 and applying the patch restored the checkout page discount computation.

ian_v’s picture

I was having a similar issue to early commenters where the 'Order total preview' in the Payment Method pane on the Checkout page was not showing appearing at all; only the 'Subtotal' and 'Order total' appeared. Clicking the 'Click to calculate discounts' button would cause the throbber in the Payment Method pane to rotate, but still no discount would show (let's call this Problem #1). Also, once I updated to jQuery Update 6.x-2.0-alpha1, the Discount pane disappeared entirely (Problem #2).

For me, both problems were solved by ryangroe's revised uc_discounts.js file in comment #15. Problem #2 was solved by fixing the two lines you see modified by ezra-g's patch in comment #27. But that patch doesn't reflect the other relevant change to uc_discounts.js made by ryangroe in #15. In 6.x-2.x-dev (the nightly from 11/12/10) on line 160 is the line:

if (line_items.length > 0 && total_amount > 0)

If this conditional fails, the discount line item doesn't get set, and therefore the discount can't appear in the Payment Method pane. But since the 'total_amount' in the conditional (i.e. all the discount amounts combined) is a negative number, the conditional will presumably always fail (except when the discounts sum to $0.00). In ryangroe's revised uc_discounts.js, the conditional is modified to be this:

if (line_items.length > 0)

Another alternative might be to leave the logical AND and change the right-most comparison operator to either '<' or '!=':

if (line_items.length > 0 && total_amount != 0)

Here's my current setup, for the record:
Drupal 6.19
Ubercart 6.x-2.4
CCK 6.x-2.8
jQuery Update 6.x-2.x-dev
Ubercart Discounts (Alternative) 6.x-2.x-dev (2010-Nov-12)

PS much thanks to the maintainers for their hard work on this great module...

tanjerine’s picture

subscribing.

i've applied patch on #27 to my D6.19 setup, i have disabled jQuery Update and tried the fix on #31. Neither worked until I re-enabled the discount pane on checkout.

Running:
Drupal 6.19
Date 6.x-2.6
Ubercart 6.x-2.4
jQueryUI - 6.x-1.4
jQuery Update - 6.x-2.x-dev (not enabled)
jQuery Tools - 6.x-1.x-dev
CCK - 6.x-2.8

Thanks!

AlanT’s picture

I noticed earlier today that discounts were no longer showing up on the checkout page under "Payment Methods", although they did show up in the discount pane, and on the Order Review page. This was both before and after updating to yesterday's release.

Replacing the uc_discounts.js file with the one provided in #15 fixed the problem for me.

I do not have the jquery_update module, although I do have other jquery modules installed, in particular:
jQuery UI 6.x-1.4
Date 6.x-2.6

Hope this helps.

pyg77’s picture

Just to say that the patch of #15 doesn't worked for me, but combined with modification suggested on #31, everything now works quite fine.

So, to display discounts on checkout page, I had to :
1- edit uc_discounts.js
2- delete "@" on lines
$("input[id*=uc-discounts-button]:not(.uc_discountsOnLoad-processed)",
and
parameterMap["uc-discounts-codes"] = $("textarea[@id*=uc-discounts-codes]", context).val();
3- change
if (line_items.length > 0 && total_amount > 0)
into
if (line_items.length > 0 && total_amount != 0)

Thanks to ryangroe for this great module, and ezra-g and ian_v for their helping comments!

Drupal 6.19
Date 6.x-2.6
Ubercart 6.x-2.4
CCK - 6.x-2.8
(no jQuery xxxx modules)

jrust’s picture

Status: Needs review » Fixed

Fixes from #34 have been applied in CVS.

Status: Fixed » Closed (fixed)

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

yan’s picture

Status: Closed (fixed) » Active

The problem persists with both 6.x-2.0 (from Dec. 30th 2010) and 6.x-2.x-dev (from Feb. 25th 2011). Have the fixes from #34 really been applied? or did I miss something?

Drupal core 6.20
Ubercart 6.x-2.4
jQuery UI 6.x-1.4
jQuery Update 6.x-2.0-alpha1
Content Construction Kit (CCK) 6.x-2.9
Date 6.x-2.7

jrust’s picture

Hmm, the change was definitely applied -- there are no more "@id" usages in the javascript file. Please use something like firebug to let us know what the javascript error is.

yan’s picture

FileSize
5.37 KB

Firebug doesn't show any javascript errors. On /cart/checkout I get this:

Order total preview:
Subtotal:	15,00 €
Total discount:	-5,00 €
Order total:	10,00 €

But on /cart/checkout/review and in the E-Mail this:

Subtotal:	15,00 €
Total:	15,00 €

Actually it looks as if on /cart/checkout/review there is no javascript involved. Find a screenshot of firebug's output on /cart/checkout attached.

jrust’s picture

You're right, on the review page there is no javascript, it should just be added as a line item by the checkout_pane hook. Do you have the checkout pane enabled?

yan’s picture

Status: Active » Fixed

I think that was it, thanks jrust! Under "Checkout settings" >> "Checkout pane" (/admin/store/settings/checkout/edit/panes), the option "Enter discount codes" wasn't activated. After activating it, the discount appears both on checkout page and in confirmation mail.

ilyasmdgh’s picture

I have the checkout pane(Enter Discount Codes enables(checked)) enabled. I worked with both 6.x 2.0 and 6.x 2.x dev . The checkout page(/cart/checkout) shows the discount (I have a codeless discount of 1% for order from 1000-1999). On the review page(/cart/checkout/reiew) there is no mention of discount. When I submit order , I get correct mail showing the discount and also if I check the order in order history it shows the discount. Its just that in the review page there is no mention of the discount.The problem still persists for me.Can someone guess what I am missing ?? Thanks

ilyasmdgh’s picture

The discount does not show when none of the payment methods are enabled. When I enable one payment method then its showing. Thanks

Status: Fixed » Closed (fixed)

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

YesCT’s picture

I just ran into this.
Enabling the pane worked.
But it seems very odd, as my discount is applied automatically without the need to enter a code.

revnoah’s picture

Status: Closed (fixed) » Needs work

I already had the pane enabled and I'm still having this issue. I tried disabling and reenabling it to no avail. A look into the order object shows that it isn't a line item. What's really strange is that I can click Back on the review page, and then return to the page, and it's fixed!

fantom84’s picture

Issue summary: View changes

I found that we must enable "dicount panel" at admin/store/settings/checkout/edit/panes
after enable that, try create and fill checkout form.
with this discount panel a discount show normal in the review page and in a mail

vegantriathlete’s picture

Just an FYI: Even after all this time it's still necessary to follow the suggestions in #21. Enable the discount pane and then hide it with CSS.