Closed paco-shum closed 1 year ago
Hi @pvpcookie @sta1r here's a clean state branch. Thak you and sorry for the inconvenience.
Hey @paco-shum - conscious you may be busy. If we don't hear from you by close of play Friday, we'll merge your changes and add our own code per our review. Then we can ship it next week. 👍
Hmm, I have tried the following,
on this line there is a Quote load function (also should this be loadActive?) https://github.com/dotmailer/dotmailer-magento2-extension/blob/83e74a4c96881c486b58e5f894144477127b5449/Controller/Email/Getbasket.php#L111
so by this line there won't be any quote ID available (null) assuming the quote is not available within the current website so it will just return to the base URL https://github.com/dotmailer/dotmailer-magento2-extension/blob/83e74a4c96881c486b58e5f894144477127b5449/Controller/Email/Getbasket.php#L114
if, still want a check I guess on line 114 can use this instead
if ((!$quoteModel->getId()) || ($quoteModel->getStoreId() !== (int) $websiteId))
@paco-shum Thanks again for your contribution! Release goes out next week.
@paco-shum FYI this has been released in v4.20.3: https://github.com/dotmailer/dotmailer-magento2-extension/releases/tag/v4.20.3
This is a clean state branch copy for https://github.com/dotmailer/dotmailer-magento2-extension/pull/601
Original Issue:
When an abandoned cart contains configurable items, the original method won't be able to add the parent due to missing selected options on
$currentQuote->addProduct($item->getProduct());
See screenshot as exampleSolution:
Using getAllVisibleItems() instead, and loop through visible items to check for simple products that are contained within a configurable product. This method is borrowed from the merge() function within Quote but slightly simplified to match the original implementation.
Replication steps
The assumption