New answers tagged

2

Your controller should extend Magento\Backend\App\Action and implements Magento\Framework\App\Action\HttpPostActionInterface, also don't forget about ACL. So should look something like this: namespace Vendor\Module\Controller\Adminhtml\Folder; class NewFunction extends \Magento\Backend\App\Action implements \Magento\Framework\App\Action\...


0

You need to try code like this one. <?php namespace Vendor\Module\Controller\Adminhtml\Folder; class NewFunction extends \Magento\Backend\App\Action { public function execute() { $params = $this->getRequest()->getParams(); //OR $name = $this->getRequest()->getParam('hello'); } }


0

I have done somewhat similar to this for this first you have to upgrade the admin_user table using UpgradeSchema UpgradeSchema.php <?php namespace Vendor\Module\Setup; use Magento\Framework\Setup\UpgradeSchemaInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\Setup\ModuleContextInterface; class ...


0

First you need to create category custom attribute with used_in_product_listing and visible_on_front set to ture $eavSetup->addAttribute( \Magento\Catalog\Model\Category::ENTITY, 'col_three_category', [ // ... 'used_in_product_listing' => true, // for category pages 'visible_on_front' => ...


0

I created an extension which allows you to attach a file to the contact form https://github.com/DominicWatts/ContactAttachment Take a look at the controller. It has everything you need.


0

Inorder to attach the file in mail, Please follow the below steps Step #1: Need to extend the core transportbuilder File path: root/app/Faceless/AttachmentModule/etc/di.xml; <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> ...


0

This is not possible with the default functionality of Magento 1 or Magento 2. A complete answer to your question would require an entire module to be coded from scratch. However, there are 3rd party modules that do exactly what you want and more. Some good links to check out are: https://marketplace.magento.com/ https://www.magearray.com/formula-pricing-...


0

Please debug with this file to find below content to check how its working. vendor/magento/module-backend/Block/Dashboard/Graph.php elseif ($idx == 'y') { $valueBuffer[] = $indexid . ":|" . implode('|', $yLabels); }


0

Please try with below code : <?php //$instruction = "container"; //$instruction = "referenceContainer"; $instruction = "block"; //$instruction = "referenceBlock"; $path = '/var/www/html/magento2/vendor/magento'; $command = 'cd '.$path.' && egrep -r -i --include \*.xml "<'.$instruction.'".*?"name=" *'; exec($command, $output); $...


0

all file is like app/code/local/Mypackage/Custommodule/Block/Mymodulename.php app/code/local/Mypackage/Custommodule/etc/config.xml app/design/frontend/base/default/template/mypackagecustommodule/mymodulename.phtml app/design/frontend/base/default/template/mypackagecustommodule/mymodulename_1.phtml app/design/frontend/base/default/template/...


0

Try this /app/design/[Vendor]/[theme]/Magento_Contact/layout/contact_index_index.xml file and paste this. <referenceContainer name="page.wrapper"> <container name="contact.custom.block" before="main.content"> <block class="Magento\Cms\Block\Block" name="cms-block-identifier"> <arguments> <...


0

I'm sharing some links with you, i hope you'll find it helpful, you can also customize as per you need, also you can see tutorials of them, in case you wanna learn how to make it yourself. Magento 2 Banner Slider Extension FREE by Mageplaza Banners Slider Extension For Magento 2 By PHP-Cuong PHP-Cuong Youtube Tutorials Thanks.


0

Using dompdf Define in email_templates.xml :- <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd"> <template id="custom_template_id" label="custom_template_id" file="pdftemplate.html" type="html" module="Vendor_Module"...


1

I Think the Generated Document has no Proper File Extension So Please try to add .pdf after file name (in your case the file name should jMvJIA50kksnMXL1gxcC0um5Hm0vL0HA.pdf) then open Document , Also check your code properly add the document extension for fix this issue permanently ex: your_filename.pdf Hope this help you , Thanks


Top 50 recent answers are included