craftcms / digital-products

Sell digital products with Craft Commerce.
https://plugins.craftcms.com/digital-products
MIT License
18 stars 9 forks source link

Adding a discount coupon code to digital products does not apply cart adjustment #43

Closed rob-baker-ar closed 4 years ago

rob-baker-ar commented 4 years ago

Digital Downloads Version: 2.1.4 Digital Products Version: 2.3.0 Commerce Pro Version: 2.1.13 Craft Pro Version: 3.3.6

Steps (using modified templates from the Commerce example):

  1. Set-up discount with coupon code to apply a fixed amount discount for a specific digital product
  2. On the front end, add above product to cart
  3. On a basket screen, set the coupon code, click update basket
  4. Basket should update with discount cart adjustment but no new adjustment appears

The discount does work if adding a regular Commerce product to the cart (as long as the product to which it applies has been set in the coupon set-up screen).

A bit more info about our set-up:

We have regular Commerce products which are physical guide books, each one has a digital equivalent product which when purchased uses Digital Downloads to generate a link or links (stored on the order in a custom field) to a PDF file or files stored in a non-web accessible asset volume.

Guide Book Commerce products have a "Digital Product" field linking to the digital version of the product. The Digital product itself is simple - it's just a title and an asset field linking to the actual PDF file(s). It does not need loads of fields as it just uses the values in the parent product.

I would expect that if adding both the Commerce product and the Digital product to the cart and applying the discount code, the coupon should be applied to both products if set as for both in the commerce coupon screen - however, it only applies to the parent.

rob-baker-ar commented 4 years ago

I have to apologise, it looks like I did not have "Promotable" checked in the product management screen for the digital products but did for the regular products.

Closing.