We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    • How to Detect Mobile Device in Magento 2?

      I created Index.php controller for that at app/code/Vendor/Modulename/Controller/Index/ and add this below code : <?php namespace VendorModulenameControllerIndex; class Index extends MagentoFrameworkAppActionAction { /** * @var MagentoFrameworkViewResultPageFactory */ protected $resultPageFactory; /** * @var MagentoFrameworkHTTPHeader */ protected $httpHeader; /** * @param MagentoFrameworkAppActionContext $context *…

      READ MORE
    • How to get category by url key in Magento 2?

      Here is the code for getting category by category URL key. The module name is: Magemonkeys_Categorydata Create a block file: Categoryurl.php <?php namespace MagemonkeysCategorydataBlockIndex; class Categoryurl extends MagentoFrameworkViewElementTemplate { { protected $filter; public function __construct( MagentoCatalogBlockProductContext $context, MagentoCatalogModelCategoryFactory $categoryFactory, array $data =…

      READ MORE
    • How to set custom tab on product detail page to download and show pdf links?

      If you want to set one more custom tab to show pdf & download them then follow the below steps. Step 1: Create a file like  app/code/Magemonkeys/Custompdftab/registration.php <?php MagentoFrameworkComponentComponentRegistrar::register( MagentoFrameworkComponentComponentRegistrar::MODULE, 'Magemonkeys_Custompdftab', __DIR__ ); ?> Step 2: Create a file like app/code/Magemonkeys/Custompdftab/etc/module.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">…

      READ MORE
    • How to check programmatically elasticsearch is enabled or not in Magento2?

      If your site has installed a third-party search engine and you want to know the elastic search is enabled or not, you can identify it. First, you need to instantiate the MagentoElasticsearchModelConfig class to your __construct() method. And then you can use the below code. <?php…

      READ MORE
    • How to create custom link for my account section in Magento 2?

      In this tutorial, we are going to discuss that how can we create a custom link for 'my account' section in Magento 2 for customer's dashboard. The first thing we need to do is to create a layout XML file in our theme.…

      READ MORE
    • In Magento 2, how to set custom price for products in cart?

      Firstly, we have to create a custom module. Then, we have to declare a file named events.xml to catch an event that takes place after a product is added to the cart. Create events.xml file at the following path Magemonkeys/CustomPriceInCart/etc/frontend/events.xml <?xml version="1.0"?> <config…

      READ MORE
    • How to add new button on sales order view page in admin side?

      If you want to add a new button on the sales order view page in the admin side then you have to do that by the plugin. Please follow the below steps. Step 1: Create a di.xml file on the below path…

      READ MORE
    • What to do when Magento 2.3.1 created invoices miss items?

      This could happen when bundled products and simple products are mixed in the order. To solve this, override the Invoiceservice.php from vendor/magento/module-sales/Model/Service/InvoiceService.php and change the below functions codes. public function prepareInvoice(Order $order, array $qtys = []) { $isQtysEmpty = empty($qtys); $invoice = $this->orderConverter->toInvoice($order);…

      READ MORE
    • Magento2 : Display New label of product in product list page

      If you need to display a new label of the product on the list page, then you can do it via helper file. Here I have made one extension for that. 1, First you need to create module directories on app/code. 2.…

      READ MORE
    • How to get category count in Magento 2?

      You can get the total category count for the store in Magento 2 by using the getCount() method. You can fetch that information from MagentoCatalogApiCategoryManagementInterface. All you need to do is just create a simple Model class which will help you to retrieve…

      READ MORE
    Recent Articles
    Get a Free Quote