Wednesday, May 10, 2017

Magento 2 Useful Commands List

Setup Upgrade Using Command Line
php bin/magento setup:upgrade
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 [cache_type]
Disable Cache Using Command Line
php bin/magento cache:disable [cache_type]
Static Content Deploy Using Command Line
php bin/magento setup:static-content:deploy
Static Content Deploy For Particular Language Using Command Line
php bin/magento setup:static-content:deploy en_US
Static Content Deploy For Specific Themes Using Command Line (Working on 2.1.1 or later)
php bin/magento setup:static-content:deploy --theme Magento/luma --theme Magento/second_theme
Exclude Themes on Static Content Deploy and does not minify HTML files Using Command Line(Working on 2.1.1 or later)
php bin/magento setup:static-content:deploy en_US --exclude-theme Magento/luma --no-html-minify

Reindexing Using Command Line
php bin/magento indexer:reindex

View the list of indexers Using Command Line
php bin/magento indexer:info
View indexer status Using Command Line
php bin/magento indexer:status
Show the mode of all indexers Using Command Line
php bin/magento indexer:show-mode
Enable module Using Command Line
php bin/magento module:enable Namespace_Module
Disable module Using Command Line
php bin/magento module:disable Namespace_Module
Uninstall Module Using Command Line
php bin/magento module:uninstall Namespace_Module
Check Current Mode Using Command Line
php bin/magento deploy:mode:show
Change To Developer Mode Using Command Line
php bin/magento deploy:mode:set developer
Change To Production Mode Using Command Line
php bin/magento deploy:mode:set production
Run the single-tenant Compiler Using Command Line
php bin/magento setup:di:compile

Thursday, June 23, 2016

How to change Rs to Indian rupee symbol (Devanagari letter “र”) at product display page?

Don't change code at all. In the admin panel, go to System > Manage Currency > Symbols.
There you should see all currencies used by your store and you can change their symbol.
But you should use the Unicode character “र” instead of a GIF.
Indian Currency symbol unicode : ₹

Below character encode should work in magento to display Indian Rupee sign.
&#8377 = र
₨ = ₨

i.e. &#8377 1,300 displays र 1,300.

How to change Currency symbol in magento ?

Hello Everyone,

                 Today I’m going to tell you how to change Currency symbol in magento.In simple words, This tutorial will tell to change the currency symbol of dollar (from $ to Rs). 

For this, you need to edit lib/Zend/Locale/Data/en.xml
Well, the xml file to edit depends upon your locale settings. My locale is set to English (United States). So, I will have to change en.xml file.
You can change your locale setting from
Admin Panel –> System –> Configuration –> GENERAL –> General –> Locale options –> Locale
If your locale is Japanese (Japan), you need to change lib/Zend/Locale/Data/ja.xml
If your locale is Hindi (India), you need to change lib/Zend/Locale/Data/ne.xml
It’s similar for other locale settings. I have locale setting as English, so I will be editing en.xml file.
- Open lib/Zend/Locale/Data/en.xml
- Find the following :-

<currency type="USD">
    <displayName>US Dollar</displayName>
    <displayName count="one">US dollar</displayName>
    <displayName count="other">US dollars</displayName>
    <symbol>$</symbol>
</currency>
- Change
<symbol>$</symbol>

-to
<symbol>Rs</symbol>
But wait, you are still not done. The most important thing is still left.
- Clear the Cache.
- Go to System –> Cache Management
- Refreh Cache.
- If you have not enabled the Cache OR if it didn’t work even after refreshing the cache, then
- delete the cache folder present inside var (var/cache)

Magento 2 Useful Commands List

Setup Upgrade Using Command Line php bin/magento setup:upgrade Cache Clean Using Command Line php bin/magento cache:clean ...