Timeline for Get the existing product id in Magento 2
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:54 | history | edited | CommunityBot |
replaced http://magento.stackexchange.com/ with https://magento.stackexchange.com/
|
|
Aug 23, 2016 at 14:19 | comment | added | Sushivam | i get Argument 1 passed to Magento\Framework\Model\ResourceModel\Db\AbstractDb::load() must be an instance of Magento\Framework\Model\AbstractModel, string given in my load() @Sarfaraz | |
Aug 23, 2016 at 12:30 | comment | added | Sushivam | I want to get only the current product id, not the collection @Sarfaraz...I wan to get it dynamically, not by assigning some static values | |
Aug 22, 2016 at 13:06 | history | edited | Sharfaraz Bheda | CC BY-SA 3.0 |
posted complete answer for this question
|
Aug 22, 2016 at 12:56 | comment | added | Sharfaraz Bheda | Updated answer use that code to get product id | |
Aug 22, 2016 at 12:56 | history | edited | Sharfaraz Bheda | CC BY-SA 3.0 |
improved answer for perfect out put
|
Aug 22, 2016 at 7:03 | comment | added | Sushivam | Check the updated execute() @Sarfaraz...im unable to get the product id using the load() as above , i get the erro | |
Aug 22, 2016 at 7:01 | review | Low quality posts | |||
Aug 22, 2016 at 7:02 | |||||
Aug 22, 2016 at 6:58 | comment | added | Sharfaraz Bheda |
have you tried this $observer->getEvent()->getProduct()->getId();
|
|
Aug 22, 2016 at 6:51 | comment | added | Sushivam | its catalog_product_save_after event, i want to get the id during the product save | |
Aug 22, 2016 at 6:47 | comment | added | Sharfaraz Bheda | for which event you have created this observer? post event name anyone can guide on that direction. | |
Aug 22, 2016 at 6:46 | comment | added | Sushivam | tried that..but i want to get the existing product id... | |
Aug 22, 2016 at 6:44 | history | answered | Sharfaraz Bheda | CC BY-SA 3.0 |