The option to specify which price component the coupon should be stored against does not work. (That is, it's passed to the rules action but the coupon's component is always used, instead.)

Also, base_price is probably a poor default, since at the moment commerce_coupon creates a separate price component for each coupon in the database. (This isn't particularly good, either, and is being addressed at #1797184: Every single coupon loads in checkout) This hasn't been an issue since the option is ignored outright; the patch adjusts the default to reflect current behaviour, which should I hope head off regression.

This patch provides a default to use the coupon's price component (which is the current functionality) but enables this option to work as expected, if you want to put the coupon on a more generic price component, e.g., one you define in your module or the "discount" default provided by drupal_commerce.

CommentFileSizeAuthor
commerce_coupon_pct-component.patch3.26 KBbradjones1

Comments

bradjones1’s picture

Status: Active » Needs review