aneesahmadweb@gmail.com     03040836207

    To make optional any field Go to DB and eav_attribute table and find the name of label.Lets say we need to make postal code optional then find postal code from table and find the is_required coloumn. Here just change the value from 1 to 0. Thats it If you want to change the label of […]
    Read More
    Get Current product $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $registry = $objectManager->get('\Magento\Framework\Registry'); $currentProduct = $registry->registry('current_product'); $currentProduct->getId(); ?> To Get Current category and parent category on category page phtml file To add a Custom block under Product title on Product Page Paste below code in catalog_product_view.xml <referenceBlock name="product.info.main"> <block class="Magento\Catalog\Block\Product\View" name="block.namemy" before="-" as="block.alias" template="Magento_Catalog::product/title.phtml"> </block> </referenceBlock> <move element="block.namemy" destination="product.info.main" […]
    Read More
    Three types of Plugins Before Plugin After Plugin Around Plugin To start adding plugin first creade di.xml file and paste below code. Type name: Its a class, interface, or virtual type, that is observed by our plugin.Plugin name: plugin name.Plugin type: The name of a plugin’s class or virtual type.Plugin sortOrder: Order, in which the plugins calling the same […]
    Read More
    Implement lazy load Minify JS To minify install this module After run command php bin/magento fl32:minify:make To compress all product image use this module https://github.com/spatie/image-optimizer Then add this module.Because above module required this module. composer require spatie/image-optimizer After install run command php bin/magento justbetter:imageoptimizer:optimizeall Apply Lazy loading on All product in Magento 2
    Read More
    Add Accordion Drop down Button https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_accordion_symbol https://www.jqueryscript.net Add Read More button https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_read_more Get current url A great soucrce for code https://www.wikicoode.com/magento2 To get Base url in mgento 2 <?php $block->getBaseUrl();? Get Media Url
    Read More
    Load ...