New answers tagged

1

Please follow below steps to achieve according to your requirement. In your custom module , please write below code in any of your custom xml file. Step 1: Please write below code in xml file PackageName/Vendor/view/frontend/layout/custom_index_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...


1

You can create below XML file in your custom module here.. app/code/VendorName/ModuleName/view/frontend/layout/sales_email_order_creditmemo_renderers.xml Content for this file.. <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/...


0

In my opinion, this module is ~okay~ but not ideal. Firstly, because it will create a brand new sales rule every time someone subscribes to your newsletter - this means it will create more work for you if you ever want to clean up your sales rules. A better solution would be to change this function entirely so that it loads a rule you have already created in ...


0

This github solution https://github.com/srenon/Cloudways_Mymodule is not working for version 2.3. The error is to use PHP unserialize and serialize function. Can any one update this code for 2.3 version?


0

Tilde Version Range (~) The ~ operator is best explained by example: ~1.2 is equivalent to >=1.2 <2.0.0, while ~1.2.3 is equivalent to >=1.2.3 <1.3.0. As you can see it is mostly useful for projects respecting semantic versioning. A common usage would be to mark the minimum minor version you depend on, like ~1.2 (which allows anything up to, but ...


0

It requires the Credentials for the repository from where you have installed that module and it fails to find it and consequently it hangs up. So you have to mention the credentials first. Please refer to the answer over here


1

It is unclear from your question where the html element is on the product page that you wish to show/hide. If it is in the details.phtml template you can extend this in your module or theme at Magento_Catalog\templates\product\view\details.phtml Check for your custom attribute and apply the css class name to the html element you want to hide/show: <?php ...


0

command: php bin/magento module:status Module_Name look in the database table: setup_module


0

The directory path of your module is wrong. It should be Schraubermarkt/Sales/Model/Order/Pdf/CustomInvoice.php Schraubermarkt/Sales/etc/di.xml Schraubermarkt/Sales/etc/module.xml Schraubermarkt/Sales/registration.php instead of schraubermarkt/module-sales


0

Yes, you can check using following query. SELECT * FROM setup_module WHERE module='Learning_GreetingMessage'; +--------------------------+----------------+--------------+-------------------+ | module | schema_version | data_version | +--------------------------+----------------+--------------+-------------------+ | Learning_GreetingMessage |...


0

You can check the included modules with the help of the command: php bin/magento module:status Or you can look in the database table: setup_module


0

Try This sales_email_order_shipment_renderers.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Email Creditmemo Items List" design_abstraction="custom"> <...


4

IMHO, the way I see it is this: app/code wild-guess PROs: possibly a leaner/ easier learning curve for juniors. But wouldn't recommend this, even if the person learning Magento is a beginner, they should go from day 1 with learning what composer is, play with it, then go and write Magento code. possibly easier to find your code in the project - again for ...


1

The preference mechanism doesn't work on abstract classes :) When you have such a scenario, you should look for public methods that use the protected ones and alter the behavior there with a plugin. For example, in the class you mentioned, I found the method getProcessedTemplate() which uses the protected methods responsible with setting the logo - you could ...


0

It is happening for me on php7.4 and server is apache2. My module is completely removed but I'm getting same error as above. Please advise how can I fix it. Thanks a million!!


0

Sometime you create the module access for all user but have some restriction with custom role based user. Use below code inside controller, it will allow to anyuser have the access. protected function _isAllowed() { return true; }


0

Old question, and posted answer is valid for sure Just wanted to point that the mentioned event (sales_quote_add_item) in question is available in Magento2, and it works fine for the asked customization with very few code public function execute(\Magento\Framework\Event\Observer $observer) { // your logic to get $yourPrice $quoteItem = $observer->...


0

I've found out that the problem was in my controller name index.php it and once I fixed everything worked ok so My file had to be Index.php instead


0

Follow miss things in Dckap Restrict States Module registration.php in Dckap\CustomerAddresses\ <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Dckap_CustomerAddresses', __DIR__ ); ?> module.xml in Dckap\CustomerAddresses\etc\ <?xml version="1.0"?>...


Top 50 recent answers are included