Rakesh Patel
  • Member for 1 year, 11 months
  • Last seen more than a month ago
How to add a attachment to an email -Magento 2
2 votes

Here add below Lines to your di.xml file which are call your Overwrite files. [vendor_name] / [Module_name] / etc di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3....

View answer
How to add media query for div alignment
1 votes

Add to CSS @media (max-width: 576px) { .block-static-block:nth-child(odd) { //add css for left slide } .block-static-block:nth-child(even) { //add css for right slide ...

View answer
Magento 2 How to redirect to a custom block from a Controller
1 votes

Try this code <?php namespace Vendor\Module\Controller\Index; use Magento\Framework\Controller\ResultFactory; class Search extends \Magento\Framework\App\Action\Action { ...

View answer
magento2 js owlCarousel not working
Accepted answer
1 votes

Try this code <?php $filter = 'hompage_feature_2'; $product = $block->getProductCollectionHomepage($filter); $items = []; foreach($product as $value){ $items[] = $value; } $type = 'widget-new-...

View answer
Pop Up Login Form In magento 2
1 votes

Try this code Vendor/Theme/Magento_Theme/templates/form/login.phtml <div id="your_popup_container" style="display:none"> <div class="block block-customer-...

View answer
Magento 2 - Redirect to an URL after downloading a file
1 votes

try this code <?php namespace Vendername\Modulename\Controller\Index; use Magento\Framework\App\Filesystem\DirectoryList; class Actionname name extends \Magento\Framework\App\Action\Action { ...

View answer
Show/Hide configuration field in Magento 2
0 votes

Try this <section id="custom_customer" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="...

View answer
How to hide menu product page
0 votes

Try this via Layout XML like <referenceBlock name="product.info.details" remove="true"></referenceBlock> or remove tab with reviews <referenceBlock name="...

View answer
Make Google reCaptcha field mandatory on a custom form (works fine on contact us and login form but not on a custom form)
0 votes

Try this code <?php $url = $_SERVER['REQUEST_URI']; $productName = parse_url($url, PHP_URL_QUERY); $productName = str_replace("%20"," ",$productName); ?> <form class=&...

View answer
Magento 2 get option label from custom admin dropdown
0 votes

use Magento\Store\Model\ScopeInterface; Use this code to get your system.xml field value const ENABLE_MENU = 'sectionname/groupname/fieldname'; protected $scopeConfig; public function ...

View answer
How to input these variables in a magento 2.3.4 mail template
0 votes

here is my execute function (observer) any other file code add You can try as below: $templateVars = array( 'store' => $this->storeManager->getStore(), '...

View answer
Magento 2 : Module is disabled, shows in disabled list, but the functionality in admin remains
0 votes

Try this link in Add than run Uninstall Script File: app/code/Vendor/Module/Setup/Uninstall.php https://www.mageplaza.com/magento-2-module-development/magento-2-how-to-create-sql-setup-script.html

View answer
My new created block for footer links will not show up in frontend
0 votes

step 1 create static block Find create block Identifier name step 2 This code add in your theme in default.xml <referenceContainer name="footer-container"> <container name=&...

View answer
How to make a field dropdown with value in Dynamic Row magento 2 Admin
0 votes

Add into your ui-form xml <fieldset name="label_setting"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="...

View answer
Magento 2 : Class interceptor does not exist
0 votes

From my experience: We should work on developer mode when developing. This is because auto-generated classes (Proxy, Factory, Interceptor) will be generated on the fly. DI compile doesn't need in this ...

View answer
Get the id of url in controller
0 votes

In controllers and blocks you have direct access to the request object. Try this code $data = $this->getRequest()->getParams(); $categoryid = $data['id'];

View answer
How to add Enable Disable functionality for a referenceBlock in Magento 2
0 votes

You can try a different approach to solve your issue. I assume that you are using <referenceBlock name="product_recommendations_pdp" to add a block or execute an action on the specified ...

View answer
Get product name and url within phtml file - Magento 2
0 votes

You need to load product to get product name With Object Manager $productId = "10"; //Product Id $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $...

View answer
How to hide short product description from Catalog page
0 votes

You remove it in layout xml. Make the file {theme_dir}/Magento_Catalog/layout/catalog_product_view.xml with this contents: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3....

View answer
Redirect controller in magento 2
0 votes

Try this code use Magento\Framework\Controller\ResultFactory; public function execute() { $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT); ...

View answer