પોસ્ટ્સ

Magento 2 Issue Resolved

  1 Issue : Deprecated Functionality: pathinfo(): Passing null to parameter #1 ($path) of type string is deprecated in  /home/vdc/projects/php81/jaymin/vendor/magento/framework/View/Asset/PreProcessor/FileNameResolver.php on line 42 solved :  $extension = pathinfo($fileName  ?? "", PATHINFO_EXTENSION); solved :  $extension = pathinfo((string)$fileName  ?? "", PATHINFO_EXTENSION); 2 issue : You have been seeing this error lately. It says “unable to load theme by specified key“. solved :  Open a Terminal Emulator such as PuTTY. Log in to your SQL account. Then input: delete from core_config_data where path = 'design/theme/theme_id' and value = '<your key>'; Note: <your key> here is the key in the error log. With the example above, <your key> is 4. link : https://www.thecoachsmb.com/solved-unable-to-load-theme-by-specified-key-error-in-magento-2/

How To Install Magento 2 And Find Path

  Magento Install CMD php bin/magento setup:install --base-url=http://127.0.0.1/magento245/pub --db-host=localhost --db-name=magento245 --db-user=root --admin-firstname=Admin --admin-lastname=admin --admin-email=admin@gmail.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 --search-engine=elasticsearch7 --elasticsearch-host=localhost --elasticsearch-port=9200 for DetaBase open http://localhos/adminer.php path find cmd ?templatehints=magento file path phtml vendor/magento/module-theme/view/frontend/templates/html/footer.phtml  default, Luma’s view.xml vendor/magento/theme-frontend-luma/etc/view.xml.

How to Call Static Block in Cms Page Magento 2

    1 .   How to Call Static Block In Phtml Method to call CMS static block in phtml <?php echo $this->getLayout() ->createBlock('Magento\Cms\Block\Block') ->setBlockId('your_block_identifier') ->toHtml(); ?>  2 .   CMS block in Magento 2 using Layout XML <referenceContainer name="content">   <block class="Magento\Cms\Block\Block" name="unick_block_name">     <arguments>       <argument name="block_id" xsi:type="string">my_cmsblock_identifier</argument>     </arguments>   </block> </referenceContainer> 3. Block Call in Page {{block class="Magento\Cms\Block\Block" block_id="home-page-block"}}

How to Remove Default Block in Magento 2

   Remove <referenceBlock name=”customer-account-navigation-account-link” remove=”true”/> Top Nav <referenceBlock name="top.search" remove="true"/> Remove - Page_Wrapper <referenceContainer name="header.container">            <referenceBlock name="top.search" remove="true"/>            <referenceBlock name="header.panel.wrapper" remove="true" /> </referenceContainer> Breadcrumbs Navigate to System > Configuration > Web > Default Pages choose Yes to get Breadcrumbs enabled <remove name="breadcrumbs" /> Footer <referenceBlock name="footer_links" remove="true"/> <referenceContainer name="footer" remove="true" /> <referenceContainer name="form.subscribe" remove="true" />  NewsLatter <referenceContainer name="copyright" remove="true" /> Minicart <referenceB

Cmd for Magento Theme Update

  For local sudo php bin/magento setup:upgrade sudo php bin/magento setup:di:compile sudo php bin/magento setup:static-content:deploy -f sudo php bin/magento indexer:reindex sudo php bin/magento cache:flush sudo chmod -R 777 app/ var/ pub/ generated/ For server php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento indexer:reindex bin/magento cache:flush chmod -R 777 app/ var/ pub/ generated/ Devloper Mode CMD  sudo php bin/magento deploy:mode:set developer/ Setup Upgrade Using Command Line php bin/magento setup:upgrade If you don’t want to remove pub/static files while installing/updating database then use following command. php bin/magento setup:upgrade --keep-generated Cache Clean Using Command Line php bin/magento cache:clean Cache Flush Using Command Line php bin/magento cache:flush View cache status Using Command Line php bin/magento cache:status Enable Cache Using Command Line php bin/magento cache:enable [ca