Needs review
Project:
Commerce Coupon (D7)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2013 at 14:12 UTC
Updated:
12 Nov 2014 at 01:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pcambraOh yeah, absolutely... coupon order reference is created just for the default bundle, order types generate new bundles so you need either to add the field manually or provide a patch that loops the bundles and adds it automatically.
Comment #2
BD3 commentedAhh, wonderful. I manually added it and am able to checkout as normal. I am however getting the error below now on the cart page and checkout, but everything works as it should.
Notice: Undefined index: path in template_preprocess_entity() (line 1020 of /sites/all/modules/entity/entity.module).I went to my custom order type and added an existing field (commerce_coupon_order_reference) and kept the same configuration as the regular order type. I then hid the coupon field under Manage Display as the regular order type has this hidden as well. Maybe I am missing one more step to get rid of this error message?
Thanks for your help and quick response!
Comment #3
pcambraDoesn't look related unless the new order types are missing the path property, you can use Commerce Devel to better track the error but it's unlikely that it comes from coupon.
Comment #4
BD3 commentedOops, my bad. It was unrelated. It had to do with a recent upgrade to Drupal Commerce 7.x-1.6 which was throwing that error.
Thanks for all your help!
Comment #5
pcambraReopening this, maybe someone can post a patch for taking care of this automatically
Comment #6
doru.furtuna commentedHi guys,
Just implemented automatic Commerce Order Type support in the patch bellow.
Please review.
To see the changes you have to re-enable the Commerce Coupon module.
Thanks.
Comment #7
bensey commentedThis is pretty serious, anyone using multiple order types will have their sites break completely (mine was WSOD-ing for admins looking at orders). Can we get this committed to commerce Coupon?
For those with similar issues, a quick fix for me was executing the below patch code using devel's execute PHP page to adjust all the order types immediately.