After enabling the UC Coupon module, I get errors during checkout, even when no coupon is applied:

Notice: Undefined index: coupon in uc_product_panes_uc_checkout_pane_alter() (line 336 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Undefined index: coupon_automatic in uc_product_panes_uc_checkout_pane_alter() (line 336 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).

and when one is applied:

Notice: Undefined property: stdClass::$model in uc_product_panes_uc_checkout_pane_alter() (line 327 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Trying to get property of non-object in uc_product_panes_uc_checkout_pane_alter() (line 340 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_product_panes/uc_product_panes.module).
Notice: Undefined index: table in uc_coupon_form() (line 1292 of /home/content/21/7456221/html/childmodelmag/sites/all/modules/uc_coupon/uc_coupon.module).

Any ideas? Thanks

Comments

arski’s picture

mmh, the first part are just warnings which you can ignore for now, while the second part suggests that coupons are not real products, i.e. don't have an SKU - is that right?

Either way I'll be able to take a closer look in a week or so after I'm back home from a business trip.

Cheers

andregriffin’s picture

I set the Discount Coupon module settings to not add the coupon as a line item anymore, and I no longer get errors.

wodenx’s picture

StatusFileSize
new792 bytes

Dunno about the first 2. The coupon conflict is bc yes, the coupon is not a real product and has no associated node. The attached patch to uc_product_panes, along with the latest commits to uc_coupon 2.x-DEV should make the notices go away. Either way, these are just warnings and you can safely ignore them.

wodenx’s picture

StatusFileSize
new578 bytes

whoops - previous patch had a stray dpm() call in it. Removed in this one.

wodenx’s picture

Status: Active » Needs review
arski’s picture

hmm, I can't really reproduce this issue.. what exact configuration do I need to have to get it? Right now I just created a product with a coupon attribute and whatever I do I don't get any errors..

Also, what module versions are you running? I would recommend you to update to the latest stable releases of UC and uc_coupon and the latest -dev of uc_pcp so that we're not talking about different things.

Cheers

arski’s picture

Status: Needs review » Postponed (maintainer needs more info)

need more info to reproduce and test your patch.

arski’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing as there appears to be no followup.. if you still experience this bug with the latest versions of all involved modules, please let me know, and also how to reproduce. Cheers

demma10’s picture

Sorry for such a late post, I've only experienced this issue in the last few weeks. I'm receiving the same error messages as the original poster but only for some products in my store.

These are the conditions under which I'm experiencing the errors:

- Special Discounts pane is displayed on checkout page (off by default, but on for some products)
- Coupons are added as line items (needed for correct tax calculations)
- Discounts applied automatically
- The Coupon Entry pane is turned off
- Rules are set up to apply automatic discounts

The above is the setup for my website's store, I don't know how many of these conditions are involved in producing the errors.

I have the dev release of uc_coupons installed but not the dev release uc_product_panes. I'll report back once I've installed the dev version of uc_product_panes. I can either add a follow-up to this issue or start a new issue.

arski’s picture

Status: Closed (cannot reproduce) » Active

Well, we can reopen this, though I just know it won't be until next year that I personally will have time to look into this I'm afraid.. Please also provide your Drupal, Ubercart and this module versions.

demma10’s picture

No worries. My site setup is as follows:

Drupal 7.16 (held back because of the Views form redirect issue: http://drupal.org/node/1836082)
Ubercart 7.x-3.2
Discount Coupons 7.x-2.1-alpha7+2-dev (this is the current dev version)
Ubercart Product Checkout Panes 7.x-1.1
Rules 7.x-2.2

I'm not sure if the Rules module is part of the conflict or not. At present all of the coupons on my site are applied via rules.

demma10’s picture

I finally installed the dev version of UC Product Checkout Panes and can confirm that the patch in comment #4 works.

arski’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Fixed

patch committed. Thank you all for your patience.

Status: Fixed » Closed (fixed)

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