I would like to change the variable – $validate to false from before the plugin. May I know how to do it? app/code/MyModule/ReviewCheck/Plugin/ReviewModel.php <?php namespace MyModuleReviewCheckPlugin; use MagentoFrameworkMessageManagerInterface as MessageManagerInterface; class ReviewModel { protected $messageManager; protected $request; public function __construct( MessageManagerInterface $messageManager, MagentoFrameworkAppRequestHttp $request ) { $this->messageManager=$messageManager; $this->request=$request; } public […]
Magento2
I am using Redis cache for session storage in my Magento 2.4.3-p2 based store. The app/etc/env.php setting looks like 'session' => [ 'save' => 'redis', 'redis' => [ 'host' => '<private-ip>', 'port' => '6380', 'password' => '', 'timeout' => '5', 'persistent_identifier' => '', 'database' => '2', 'compression_threshold' => '2048', 'compression_library' […]
I have 2 columns in xml with js component, but i want display each column if condition is true, so if precio_anterior is not empty and value is different to 0 show precio_anterior column if not, show precio_suscriptor: This is my code: /app/code/Vendor/Catalog/view/frontend/ui_component/widget_recently_viewed.xml <column name="precio_suscriptor" component="Vendor_Catalog/js/product/precio_suscriptor" sortOrder="3" displayArea="details-area"> <settings> <label […]
In Magento 2 di.xml we can inject an array to a class like this: <type name="VendorModuleModelFoo"> <arguments> <argument name="data" xsi:type="array"> <item name="item1" xsi:type="string">Item 1</item> <item name="item2" xsi:type="string">Item 2</item> </argument> <arguments> </type> How can we inject the same data array to another class VendorModuleModelBar without duplicating it like this? <type name="VendorModuleModelBar"> […]
Currently, I am not getting the out-of-stock products from the configurable product on the product page (product/view controller). File : <?php /** * Product view controller */ namespace MagentoProductRedirectionControllerIndex; use MagentoCatalogApiProductRepositoryInterface; use MagentoCatalogModelDesign; use MagentoFrameworkAppActionHttpPostActionInterface as HttpPostActionInterface; use MagentoFrameworkAppActionHttpGetActionInterface as HttpGetActionInterface; use MagentoFrameworkAppActionContext; use MagentoFrameworkAppObjectManager; use MagentoFrameworkControllerResultForward; use MagentoFrameworkControllerResultForwardFactory; use […]
I installed magento2 with LEMP (nginx + php8.1-fpm) magento root: /var/www/html/ I am trying to add a seperate folder and execute a phpfile inside this folder in magento root: /var/www/html/mynewfolder but when i try to open https://example.com/myfolder/connect.php i am having : 404 error: Page not found. what should i do?
I have a CMS-created page where I used the “Insert Widget” option to insert a static block into the textarea field, which ended up as: {{widget type="MagentoCmsBlockWidgetBlock" template="widget/static_block/default.phtml" block_id="78"}} When I save and reload the the front-end page, it renders as the above code instead of the block (which is […]
I get “The value specified in the URL Key field would generate a URL that already exists.” but I checked the table “url_rewrite” and there is no entry with that key. The URL is “verbrauchscalculator“. If I call the URL in the browser, then a page opens. There is also […]