skip to Main Content

How to get newly created product id while using after plugin (Interceptor) in Magento 2

I have created interceptor for catalog product controller's save action <type name="MagentoCatalogControllerAdminhtmlProductSave"> <plugin name="ricky_catalog_save_product" type="RickyCatalogPluginProductSave" sortOrder="10" /> </type> My plugin class is below namespace RickyCatalogPluginProduct; class Save { public function afterExecute( MagentoCatalogControllerAdminhtmlProductSave $subject, $result) { $productId = $subject->productId; // This…

VIEW QUESTION

Why overriding this core file "MagentoQuoteModelShippingMethodManagement.php" causes errors

i wrote a simple module to override this core Model class, but on frontend it shows this error message: "Fatal error: Uncaught TypeError: Argument 3 passed to MagentoQuoteModelQuoteShippingAssignmentShippingProcessor::__construct() must be an instance of MagentoQuoteModelShippingMethodManagement, instance of shippingmoduleModelShippingMethodManagementInterceptor ....." HERE IS…

VIEW QUESTION

Magento 2 – Error Message when click Button Cache clean catalog images

How to fix error with this message when I click to button "Clean the Catalog Images Cache File": The directory "/var/www/html/project-community-edition/pub/media/catalog/product/cache/d08a1eb7b61352ea219ec60a4090e56e/h/t" cannot be deleted Warning!rmdir(/var/www/html/project-community-edition/pub/media/catalog/product/cache/d08a1eb7b61352ea219ec60a4090e56e/h/t): Directory not empty

VIEW QUESTION

How to add Block into another one – Magento 2

what's up! I need a little help. I am trying to create some blocks usign the code below: <referenceContainer name="content"> <block class="GysaQuotesBlockAdminhtmlQuotesEdit" name="quotes_quotes_edit" template="Gysa_Quotes::quote/create/form.phtml"> <block class="GysaQuotesBlockAdminhtmlQuotesEditProducts" template="Gysa_Quotes::quote/create/products.phtml" name="quotes_quotes_edit_products" /> </block> </referenceContainer> But the block "quotes_quotes_edit_products" doens't showing up. I have…

VIEW QUESTION
Back To Top
Search