Closed iindranil closed 5 years ago
That is strange, version 4 was exactly a fix for that bug. We will look into it.
Thank you for your quick response @domeglic
Also, I noticed that It's not working based on Cart Price Rules setup.
For example, I need this kind of feature where If customer added 1 qty "Main product" then 1 qty "Gift product" will be added automatically which is fine but If customer added "Main Product" 2 qty then "Gift product" not added 2 qty.
I am confused that is it not working ? or extension doesn't support this feature? or have I configured something wrong?
Thanks in advance!
This is not supported because that only works if the cart rule condition is specified as "when main product in cart". However if the cart rule would be for example "subtotal 100€ or more" then we could not apply the same logic.
We might add this option in the future.
Thanks for your confirmation, @domeglic
Any idea about the above issue I mentioned? Why gift item getting double after placed order which is fine until click on the placed order button?
Is there any quick solutions which I can fix because it's running on the live server?
Any update on that issue?
Thanks!
I could not reproduce the issue on Magento v2.2.3 (or v2.2.5) with the module version v1.0.4. Are there any other extensions that change checkout or totals calculation?
I had the same problem! The only solution I found was having to change the file "/vendor/magento/module-quote/Model/Quote/Item/ToOrderItem.php" (of course, creating a module for the override).
Before the "return" of the "convert()" function add your code.
An example:
$productGift = ['SKU1', 'SK2', 'SK3'];
if (in_array($ item->getProduct()->getSku(), $productGift)) {
$orderItem->setQtyOrdered(QTD);
}
Bye!
issue with double qty successfully fixed with 1.0.4 (from 1.0.3)
The issue is still there when the invoice printed you see the free product ordered as double. not solved yet.
@cgsoratto thank you so much for your solution. It worked
Hello, i have the same problem, i've just changed the cgsoratto's patch like :
if($orderItem->getData('product_type')=="freeproduct_gift"){
$orderItem->setQtyOrdered(1);
}
No need to insert the SKU, only the free products will be set to qty = 1.
Is there any update ?
Thank you,
I could not reproduce it on the latest version, but I will do more testing and see if I can.
Unfortunately I still cannot reproduce this bug. I tried it on Magento v2.2.6 and v2.3 with the latest freeproduct 1.2.0 and I always get only 1 gift item in order and invoice/pdf.
Unless there is new information about steps to reproduce the bug then I am closing this issue for now.
I am using the 1.0.4 version where gift item added perfectly when I added main product. and removed gift product perfectly when I removed main product.
But when I placed order then gift product qty getting double automatically.
I am using Magento ver. 2.2.3.
Can you guys please have a look into this issue thank you,