Hi,
I have three types of products set up. Simple products (book), downloadable products (ebooks) and grouped products (books and ebook) containing both simple and downloadable products.
1) When I purchase a downloadable product that product order does not appear in the my downloadable products section after completed purchase via worldpay module or using a purchase order invoice.
This happens on both my local mac and RHEL7 server.
Hi @chrisincisive
Make sure you copied media folder from Magento 1 to Magento 2 with download files
Hi Victor,
Thanks for your message.
I copied the downloadable folder across now but it's still the same. Actually i should have specified we sell ebooks but we don't host the ebooks themselves. That is done by a third party and we have a link that they click on to retrieve the book - so the ebooks themselves aren't stored on our server.
What isn't happening is that when we buy an ebook (by worldpay or invoice) the link doesn't appear in the my downloadable products section. All the migrated data does. But any new purchase doesn't appear.
This person also seems to be having trouble with magento 2.1.2 and my downloadable products: http://magento.stackexchange.com/questions/142627/troubles-with-downloadable-in-grouped-in-2-1-2
ok so weirdly points 2 and 3 (no title appearing in sales -> orders -> view order and checking out both downloadable and simple products from same grouped product) are actually to do with issue #4921. I was getting the
"checkout rules.js:58 Uncaught TypeError: Cannot read property 'length' of undefined(…)"
So I changed the number of lines for customer address to 1 (instead of 2) and that seems to have fixed the checkout so can now checkout with 2 products of the same grouped product and title now appears in the sales -> order -> view order screen. No idea why...but there you go.
However, point 1 still occurs - the downloadable product link still doesn't appear in my downloadable products after successful purchase?
Update 1...
I just checked the downloadable_link_purchased and downloadable_link_purchased_item tables and there aren't any entries in there for the new products, hence they aren't showing up. But I'm not sure why they aren't getting inserted into these tables?
Update 2 ...
i just installed a vanilla magento 2.1.2 to test. I added a downloadable product and bought it by invoice, complete the order and it appeared in the my downloadable section.
However, when i created a simple product and a downloadable product to a new grouped product and bought by invoice and completed the order, it didn't appear in my downloadable products.
Also product title is blank in sales -> order -> view order under items ordered. I tried changing number of lines to 1 (which fixed it in our version) but didnt' work on this vanilla version.
So the problem is downloadable products within grouped products.
if anyone has a fix for this would be much appreciated as can't go live until it's working?
thanks
we also tested magento 2.0.1 and this bug exists in there too.
Any idea what file the problem might be in? Would it be in vendor/magento/module-downloadable/Observer/SaveDownloadableOrderItemObserver.php or similar?
Any update on this please?
Hi, thank you for your report. I was able to reproduce issue with downloadable product inside grouped product on clear Installed Magento instance. Internal issue MAGETWO-62235 was created
Hi Olysenko,
Thanks very much!
Hi Olysenko,
Are you able to provide update on the status of the issue MAGETWO-62235?
Thanks
Adam
@olysenko
Would you please provide some information in which commit it was fixed? There are no any mentions in git history of this issue either.
@magento-engcom-team bump. The same question, see above.
Guys, I don't get - what is G1 Passed means? What commit is fixing the issue? @olysenko
Testing this with Magento 2.3.0, the problem is not resolved.
Also testing this with Magento 2.3.0, the problem is not resolved.
Why was this issue closed? I'm still seeing the bug in 2.3.1
This is still a problem in version 2.3.2.
The bug is in the observer SaveDownloadableOrderItemObserver. The following patch should fix the problem
--- a/vendor/magento/module-downloadable/Observer/SaveDownloadableOrderItemObserver.php (date 1563881877000)
+++ a/vendor/magento/module-downloadable/Observer/SaveDownloadableOrderItemObserver.php (date 1563881877000)
@@ -86,7 +86,7 @@
//order not saved in the database
return $this;
}
- if ($orderItem->getProductType() != \Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE) {
+ if ($orderItem->getRealProductType() != \Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE) {
return $this;
}
$product = $orderItem->getProduct();
A patch should rather check both types (product type and real product type), like in SetLinkStatusObserver and SetHasDownloadableProductsObserver:
if ($orderItem->getProductType() !== \Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE
&& $orderItem->getRealProductType() !== \Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE) {
return $this;
}
$product = $orderItem->getProduct();