Answers for "how to change magento minicart logo"

1

how to change magento minicart logo

::First let me clear that you can't edit magento core themes directly from /app/design/magento!!!::

::If you want to change it your self then, you've to create your own one and make changes as required!!::

::Now let's go to the point!::

::first => Create custom.css file at /app/design/vendor/theme/Magento_Theme/web/css/::

::second => create default.xml file at /app/design/vendor/theme/Magento_Theme/layout/::

::Now put the file contents like below::

::CSS::

::

.minicart-wrapper .action.showcart:before{

content:url('../images/minicart.jpg')!important;

zoom:1.5%;}
::

::XML::

<head>
    <css src="Magento_Theme::css/custom.css"/>
</head>
//make sure to copy the default structure for xml file.

//I have not pasted that here because i am a noob to stackexchange!!

:::Last Step :::

move your new minicart image to the /app/design/vendor/theme/Magento_Theme/web/images/minicart.img extension

::Finally run below commands::

::Make sure to remove /pub/static/frontend::

::bin/magento setup:upgrade::

::bin/magento setup:di:compile::

::bin/magento setup:static-content:deploy -f::

::bin/magento indexer:reindex::

::bin/magento cache:flush::

::chmod -R 777 ../magento root directory name::

::Thank You::
Posted by: Guest on February-22-2022

Code answers related to "how to change magento minicart logo"

Browse Popular Code Answers by Language