PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, August 22, 2022

[FIXED] How to find where to put a breakpoint in Magento2?

 August 22, 2022     magento2     No comments   

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)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing