i think this would give a better dx with cleaner modules to start with.
or do many people want a combined-fixed-plus-variable coupon?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

geek-merlin’s picture

battle plan:
* copy basic_coupon to fixed_coupon and percentage_coupon
(leave basic coupon for a smooth upgrade)
* get the names of the functions right
* throw out in each of the two new modules what isn't needed

pcambra’s picture

+1 to this

pcambra’s picture

Status: Active » Needs review
FileSize
5.98 KB

Working on it. I'm separating the fixed and percentage coupons in two modules.

http://drupal.org/sandbox/pcambra/1454380
http://drupal.org/sandbox/pcambra/1454390

And patch attached to standarize

pcambra’s picture

Pushed refresh support for fixed amounts and also one component price per coupon when fixed.

pcambra’s picture

Rebased against latest head.

pcambra’s picture

Little tweaks after fixing active flag

pcambra’s picture

Finished the upgrade path from basic coupons to fixed/percentage

I was going to promote the sandboxes to full projects and committing this but had some strange problem: []

Attaching the latest patch.

fearlsgroove’s picture

@pcambra -- sorry haven't reviewed your patches yet but I'm looking forward to this. You mentioned promoting sandbox projects. Do you envision the fixed/percentage coupons be available only as separate projects, or rolled into "contrib" modules in this project?

pcambra’s picture

Oops, I forgot to paste the issue reference #1483876: Promoted full projects merged

As soon as that one gets resolved, I'll promote fixed and pct as independent projects and commit all this together.

pcambra’s picture

Answering more clearly, there won't be a contrib folder anymore on this project, same as shipping.

pcambra’s picture

Status: Needs review » Fixed

And commited!

geek-merlin’s picture

cool you dunnit!
(i'm so stuck in other projects, but cant await to check it out.)

kiwimind’s picture

Thanks pcambra. Can't wait to try this out!

muschpusch’s picture

@Pcambra: thanks a lot. i use a heavily patched version at the moment and it still has some flaws. Is the current dev release usable for percentage and fixed coupons?

pcambra’s picture

Absolutely, last -dev doesn't have either pct coupons or fixed amount ones, you'll need the those new modules to get something working :)

Status: Fixed » Closed (fixed)

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

AdamGerthel’s picture

Is there an upgrade path? What happens to current coupons if you use start using the new, separated modules instead of the old combined one?

pcambra’s picture

Yes, you'll find an upgrade form in the Settings screen of commerce coupon