Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#39 | firebug-javascript.png | 5.37 KB | yan |
#27 | 673326-.patch | 1.18 KB | ezra-g |
#24 | 673326.patch | 4.91 KB | ezra-g |
#15 | uc_discounts.zip | 1.73 KB | ryangroe |
Comments
Comment #1
ezra-g CreditAttribution: ezra-g commentedCan you describe your discount here? I see the discount l listed in order confirmation emails without theming.
Comment #2
robbertnl CreditAttribution: robbertnl commentedI 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?
Comment #3
robbertnl CreditAttribution: robbertnl commentedi am using the non-cck field discount. Can you tell me what i forgot?
Comment #4
robbertnl CreditAttribution: robbertnl commentedIn the review order page(/cart/checkout) is the discount missing as well
Comment #5
robbertnl CreditAttribution: robbertnl commentedComment #6
robbertnl CreditAttribution: robbertnl commentedComment #7
msumme CreditAttribution: msumme commentedI'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.
Comment #8
piepkrak CreditAttribution: piepkrak commentedI am having the same problems listed above. The checkout and order review pages do not calculate and/or display the discounts.
Comment #9
ezra-g CreditAttribution: ezra-g commentedThis 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.
Comment #10
protopopov CreditAttribution: protopopov commentedI 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.
Comment #11
FranCarstens CreditAttribution: FranCarstens commentedHaving the same problem. Discount are not showing on Checkout and are not applied. They do show on Cart page.
Comment #12
yktdan CreditAttribution: yktdan commentedSame issue, I think. This is so I subscribe and see when it is fixed.
Comment #13
freatida CreditAttribution: freatida commentedSame 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.
Comment #14
robbertnl CreditAttribution: robbertnl commentedMarking as critical, since the non-cck field discount is now almost useless with this bug
Comment #15
ryangroe CreditAttribution: ryangroe commentedI 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.
Comment #16
kaata CreditAttribution: kaata commenteddoesnt work for me
Comment #17
ryangroe CreditAttribution: ryangroe commentedCan 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.
Comment #18
ryangroe CreditAttribution: ryangroe commentedHere'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.
Comment #19
yktdan CreditAttribution: yktdan commentedAlso 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
Comment #20
yktdan CreditAttribution: yktdan commentedIgnore above comment about jQuery Update 6.x-2.0-alpha1 (I got the wrong module). With correct one installed I get the same failure.
Comment #21
freatida CreditAttribution: freatida commentedWorks 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.
Comment #22
ryangroe CreditAttribution: ryangroe commentedGood 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!
Comment #23
ahughes3 CreditAttribution: ahughes3 commentedI 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.
Comment #24
ezra-g CreditAttribution: ezra-g commentedSorry 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.
Comment #25
ahughes3 CreditAttribution: ahughes3 commentedThe 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
Comment #26
ezra-g CreditAttribution: ezra-g commentedIt's possible I uploaded the wrong patch.
Can you confirm that you cleared your aggregated JS cache though?
Comment #27
ezra-g CreditAttribution: ezra-g commentedSorry, how about this one ;)?
Comment #28
fmueller CreditAttribution: fmueller commentedI 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.
Comment #29
davidburnsComment #30
Sohodojo Jim CreditAttribution: Sohodojo Jim commentedLATEST 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.
Comment #31
ian_v CreditAttribution: ian_v commentedI 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...
Comment #32
tanjerine CreditAttribution: tanjerine commentedsubscribing.
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!
Comment #33
AlanT CreditAttribution: AlanT commentedI 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.
Comment #34
pyg77 CreditAttribution: pyg77 commentedJust 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)
Comment #35
jrust CreditAttribution: jrust commentedFixes from #34 have been applied in CVS.
Comment #37
yan CreditAttribution: yan commentedThe 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
Comment #38
jrust CreditAttribution: jrust commentedHmm, 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.
Comment #39
yan CreditAttribution: yan commentedFirebug doesn't show any javascript errors. On
/cart/checkout
I get this:But on
/cart/checkout/review
and in the E-Mail this: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.Comment #40
jrust CreditAttribution: jrust commentedYou'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?
Comment #41
yan CreditAttribution: yan commentedI 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.Comment #42
ilyasmdgh CreditAttribution: ilyasmdgh commentedI 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
Comment #43
ilyasmdgh CreditAttribution: ilyasmdgh commentedThe discount does not show when none of the payment methods are enabled. When I enable one payment method then its showing. Thanks
Comment #45
YesCT CreditAttribution: YesCT commentedI 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.
Comment #46
revnoah CreditAttribution: revnoah commentedI 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!
Comment #47
fantom84 CreditAttribution: fantom84 commentedI 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
Comment #48
vegantriathleteJust 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.