Category: Magento 2

  • Add custom fonts to magento 2 theme

    First we will upload the font files to app/design/frontend/[your_vendor_name]/[your_theme_name]/web/fonts The available types are: “woff”, “woff2”, “ttf”, “eot”, “otf”, and “svg” Second we need to create file app/design/frontend/[your_vendor_name]/[your_theme_name]/web/css/source/_typography.less add the following Mixin to the file .lib-font-face( @family-name:'[custom_font_name]’, @font-path: ‘@{baseDir}fonts/[path_to_font_file]’, @font-weight: [font_weight], @font-style: [font_style], @font-display: [auto|block|fallback|optional|swap] ); [custom_font_name] : the name of your font that you will…

  • Magento2 Smartwave Megamenu error in categories admin

    After Porto theme removal (which includes Smartwave Megamenu), when accessing Categories page in the backend, you get an error report which contains: Class Smartwave\\Megamenu\\Model\\Attribute\\Width does not exist This is because the extension added new category attributes that reference source models which have been removed. To solve it, first DO A BACKUP of the database, then…

  • Fix Shopping cart empty after login / registration

    To fix the issue you should enable Persistent Shopping Cart Please follow these steps to enable Persistent Shopping Cart Step 1. Log in to your Admin Panel and go to Stores > Settings > Configuration. Step 2. Open the Customers tab and select Persistent Shopping Cart. Step 3. Uncheck the Use system value checkbox and set Yes in the Enable Persistence.  

  • How to Add New Region for Specific Country in Magento 2 for Egypt

    As we know Magento don’t provide list of Egypt regions we can add them by below method Method to Add New Region for Specific Country in Magento 2: Run the below SQL query: INSERT INTO directory_country_region(country_id, code, default_name) VALUES (“country_code”,”region_code”,”region_name”); For example, I want to add a new region “Cairo” for India as shown below:…