[7.x] Fix download URL not generated for digital line items / product variants#1251
[7.x] Fix download URL not generated for digital line items / product variants#1251morhi wants to merge 3 commits intoduncanmcclean:7.xfrom
Conversation
Change return value to false when item variant key is missing.
|
@duncanmcclean Hey duncan, do you think it's possible to merge this change? Are the failing tests actually because of my change? |
|
Some tests are passing - so I'm not sure. Just triggered a re-run. I'll aim to take a look today/tomorrow - it's on my to-do list. If you need to use this fix before then, you could potentially look at using a composer patch. |
|
That's totally fine. I don't need it today :) Thank you! |
|
Actually, it looks like the Simple Commerce 6 replaced it with a An update script should have run during the upgrade process to update existing content. I can't remember the reasoning behind the change, but I imagine it was so you didn't need to toggle "Is Digital Product" for each variant - which would be tedious if you have lots of variants. If you have a physical product w/ downloads, you'd need to select "Product Type: Physical" and only select downloads for the digital variant. It shouldn't generate download links for variants without downloads. |
|
Gotcha, that makes sense. I believe my blueprint's visibility for that field isn't correct, that's why I didn't figure out that it should work like you describe. Thanks for the hint! |
I noticed that when I mark a single variant as digital, the download URLs are not generated because the handler only looks for the digital flag on the product itself. This change means that the handler also recognises variants that are marked as digital, even if the product itself is physical.