This Magento 2 extension replaces the standard Saudi Riyal (SAR) currency symbols with a custom font symbol throughout your store.
- ✅ Custom Saudi Riyal font symbol using Unicode character
 - ✅ Automatic symbol replacement on all price displays
- ✅ Support for product pages, category pages, cart, and checkout
- ✅ Dynamic content support (AJAX updates)
- ✅ Responsive design compatibility
- ✅ Print-friendly styling
- ✅ Easy installation and configuration
- ✅ Enhanced period removal for clean display
- ✅ Tested on V2.4.7, V2.4.8
-
Copy the
zone99/SARSymboldirectory to your Magento 2 installation:app/code/zone99/SARSymbol/ -
Enable the module:
php bin/magento module:enable zone99_SARSymbol php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy php bin/magento cache:flush
Add to your composer.json:
{
"require": {
"zone99/sar-symbol": "^1.0"
}
}Then run:
composer install
php bin/magento module:enable zone99_SARSymbol
php bin/magento setup:upgrade- Set your store currency to SAR (Saudi Riyal)
- The extension will automatically detect SAR currency and apply custom symbols
- Clear cache after installation
The extension includes:
saudi-riyal.woff- Web font formatsaudi-riyal.ttf- TrueType font format
Replaces these standard SAR symbols:
﷼(Unicode SAR symbol)SAR(Text abbreviation)ر.س(Arabic abbreviation)
With custom symbol:  using the saudi_riyal font
The extension now includes advanced cleanup to remove unwanted periods that may appear after currency symbols, ensuring clean display across all contexts.
- Product detail pages
- Category/listing pages
- Shopping cart
- Checkout process
- Mini cart
- Price totals
- Admin panel (where applicable)
<!-- Standard usage -->
<span style="font-family: 'saudi_riyal'"></span>
<!-- With CSS class -->
<span class="saudi-riyal-symbol"></span>zone99/SARSymbol/
├── Block/
│ └── Currency.php
├── Helper/
│ └── Data.php
├── etc/
│ └── module.xml
├── view/frontend/
│ ├── layout/
│ │ └── default.xml
│ ├── templates/
│ │ └── currency/
│ │ └── converter.phtml
│ ├── web/
│ │ ├── css/
│ │ │ └── saudi-riyal.css
│ │ ├── fonts/
│ │ │ ├── saudi-riyal.woff
│ │ │ └── saudi-riyal.ttf
│ │ └── js/
│ │ └── currency-converter.js
│ └── requirejs-config.js
├── registration.php
├── composer.json
└── README.md
- Module Name: zone99_SARSymbol
- Package Name: zone99/sar-symbol
- Namespace: zone99\SARSymbol
- Version: 1.0.0
- Author: zone99
- License: GPLv3
- Chrome 30+
- Firefox 25+
- Safari 7+
- Edge 12+
- Internet Explorer 11+
- Check that font files are properly deployed to:
pub/static/frontend/[theme]/[locale]/zone99_SARSymbol/fonts/ - Clear browser cache
- Verify CSS is loading correctly
- Ensure SAR is set as current currency
- Clear Magento cache:
php bin/magento cache:flush
- Check JavaScript console for errors
- Verify module is enabled:
php bin/magento module:status zone99_SARSymbol
- Enable CSS/JS minification
- Use a CDN for static assets
- Enable browser caching
To modify the symbol or add new replacements:
- Edit
Helper/Data.phpconstants - Update CSS selectors in
saudi-riyal.css - Modify JavaScript in
currency-converter.js
The module uses a clean architecture that can be easily extended:
- Helper Class:
zone99\SARSymbol\Helper\Data - Block Class:
zone99\SARSymbol\Block\Currency - JavaScript Module:
zone99_SARSymbol/js/currency-converter
<css src="zone99_SARSymbol::css/saudi-riyal.css"/><block class="zone99\SARSymbol\Block\Currency"
template="zone99_SARSymbol::currency/converter.phtml" />$helper = $this->helper('zone99\SARSymbol\Helper\Data');GPLv3 License
For support and questions:
- Email: contact@99.zone
- Module: zone99/sar-symbol
- Initial release
- Custom font symbol support
- Automatic symbol replacement
- Enhanced period removal functionality
- Responsive design
- Multi-page coverage
- Clean code architecture