Issue
I have a task to locate why products are not shown to a non-logged customer after admin makes it. The fix is that if you re-index and clean cache the customer will see the new product or the second solution is to go to shared products, enter product categories and just save. Now the problem is I want to put a break point on that "save" button so I can see what goes on after that but I don't know how to find it in my project. Is there a simple way to know what code is your magento2 using on that given page/button or whatever.
Solution
If you are a person with a deep understanding of Magento then you can easily guess that clicking the "Save" button will call a controller to perform the data retrieval and save data.
In your case when saving it will go to file:
vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php
During the save process Magento will reindex the product you have saved. You need to put a breakpoint in the file I provided and find out why
Answered By - LitCommerce Expert Answer Checked By - Gilberto Lyons (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.