Needs work
Project:
Commerce Discount
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Jul 2015 at 17:40 UTC
Updated:
18 Sep 2015 at 20:01 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #1
mglamanPatch. Here is description on message field, giving notice to implementation (probably needs better placement...)
Updated summary to include screenshots.
Comment #2
joelpittetWhat about applying this field to all offer types and doing a drupal_set_message?
Comment #3
mglamanUpdated patch which tests field on line item instance
Comment #4
mglamanHere is updated patch
Comment #6
mglamanUpdate import test
Comment #8
mglamanWhoops :/ this should be right way to do test.
Comment #10
mglamanJSON formatting is killing me, here.
Comment #11
joelpittetI think this looks great, but I'll let someone else take a stab at reviewing it first before committing.
Comment #12
rszrama commentedShoot, dude. I had no clue you wrote this patch. I had a similar requirement. However, instead of adding the discount message field to the offer type I made it to the discount bundles themselves. Since it's a 1:1 relationship between discounts and offers, I'm not sure why the field needs to be on the offer.
Re: placing the message, I also used a custom Views field handler to find and display relevant discount messages inline with line items. Works like a charm! Would just require the site to edit the cart (or any other) View to add the field.
Let me get a diff out of that project so we can compare if you're amenable.
Comment #13
rszrama commentedSo, turns out I may have asked Matt to write this patch and then promptly forgotten about doing so. Regardless of the approach, we'll need an update function, so setting to needs work for now.
Comment #14
mglamanWhy does this need an update function?
So we force people to flush caches?