Timeline for Check products in cart if they are out of stock before place order REST API : Magento 2
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 28, 2019 at 8:00 | comment | added | Kul | @LovelySetia instead of Vendor/ModuleName/etc/webapi_rest/extension_attributes.xml put here Vendor/ModuleName/etc/extension_attributes.xml | |
Dec 24, 2018 at 9:12 | comment | added | Lovely Setia | I am using magento-2.1.12.@SoladogunIlyasAdemuyiwa | |
Dec 20, 2018 at 7:23 | comment | added | Soladogun Ilyas Ademuyiwa | @LovelySetia, I just tried your code in Magento 2.2.6 and its working fine. This is the code its generated at generated/code/Magento/Quote/Api/Data/CartItemExtension.php in pastebin.com/xsBrN6Ez | |
Dec 18, 2018 at 9:30 | comment | added | Lovely Setia | @SoladogunIlyasAdemuyiwa Yes,Please look here " pastebin.com/KHB799pQ" for extension_attributes. | |
Dec 7, 2018 at 12:17 | comment | added | Soladogun Ilyas Ademuyiwa | @LovelySetia, Did you put your extension attributes code?? <extension_attributes for="Magento\Quote\Api\Data\CartItemInterface"> <attribute code="stock" type="string" /> </extension_attributes> | |
Dec 6, 2018 at 14:24 | comment | added | Lovely Setia | I will deleted var/generation/*,var/page_cache/*,var/cache/*.After that run Setup:upgrade,setup:di:compile,setup:static-content:deploy commands.It still showing error @SoladogunIlyasAdemuyiwa | |
Dec 6, 2018 at 11:01 | comment | added | Soladogun Ilyas Ademuyiwa | @LovelySetia Make sure you recompile. It should generate that attribute setStock in the generated folder since attribute code is stock | |
Dec 5, 2018 at 9:50 | comment | added | Lovely Setia | This code give error :Fatal error</b>: Uncaught Error: Call to undefined method Magento\Quote\Api\Data\CartItemExtension::setStock() in /Vendor/CheckStock/Plugin/Stock.php:46 @SoladogunIlyasAdemuyiwa | |
Jun 28, 2018 at 5:51 | comment | added | Soladogun Ilyas Ademuyiwa | Thanks @sivakumar. Boolean is obviously better. But this still return a string of "0" and "1". Any reason for this?? | |
Jun 27, 2018 at 13:30 | comment | added | sivakumar | i think we can use a boolean flag <attribute code="stock" type="boolean" /> if ($stock) { $message = true; } else { $message = false; } | |
Jun 27, 2018 at 13:06 | review | Late answers | |||
Jun 27, 2018 at 13:06 | |||||
Jun 27, 2018 at 12:49 | history | answered | Soladogun Ilyas Ademuyiwa | CC BY-SA 4.0 |