Skip to main content

Posts

Magento 2 Customization: Change Currency Symbol Position with Code

How to Change Currency Symbol Position in Magento 2 In Magento 2, the default behavior places the currency symbol on the left side of the price. However, many store owners may wish to move the currency symbol to the right for better localization or customer experience. Since Magento 2 does not provide a built-in feature for this, we’ll demonstrate a simple programmatic solution to change the currency symbol position. Why Change Currency Symbol Position? Positioning the currency symbol correctly enhances user experience and aligns with regional conventions. For example: Left Position : Common in USD ($100). Right Position : Common in countries like France (100€). To meet these requirements, we will use an Observer and events.xml configuration file. Step-by-Step Solution to Change Currency Symbol Position 1. Create events.xml Location: app/code/vendor/Exenstion/etc/frontend/events.xml XML: <? xml version = "1.0" ?> < config xmlns : xsi = "http://www.w3.org/200...

How to Enable IMAP PHP in xampp

The imap extension comes as standard with the PHP installation. You just need to enable it in your php.ini   Enable IMAP in XAMPP: You need to configure your php.ini file to enable IMAP extension Search for the line ;extension=php_imap.dll and remove semicolon(;) and restart your xampp. The line should look like as mentioned below. extension=php_imap.dll Note : New php version does not have dll anymore. The default php.ini should already contain a line to load the extension but commented out: ;extension=imap Remove semicolon from above like below extension=imap Enable IMAP in Linux: If you are using LAMP server, First install IMAP using the command on terminal $ sudo apt-get install php5-imap To enable IMAP, run the following command. sudo phpenmod imap Restart apache server with below command sudo service apache2 restart

CSS margin property - Clarification margin: 0 0 10px;

 In this post we will going to explain the CSS margin property  margin: 0 0 10px; The margin CSS property sets the margin area on all four sides of an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left. CSS margin short hand code can be a bit confusing at first. margin: 0 0 10px;  Top margin = 0 Right/Left margin = 0 Bottom margin = 10px or pixels margin: 30px;   //All four margins are 30px margin: 10px 40px;  //Top & Bottom margin = 10px, left & right = 40 margin: 10px 20px 30px; // top=10, left/right=20, bottom=30 margin: 10px 20px 10px 20px;  // Top=10, Right=20, Bottom=10, Left=10