Fme Extensions Blog

Latest news, tutorials, and best practices for Magento

Explore More
December 18, 2023Top Five Yielding Magento Themes

Magento is a popular e-commerce platform, and choosing the right theme can significantly impact the look and functionality of your online store. Here are five highly regarded Magento themes, each known for their unique features and design qualities:

December 13, 2023Magento: Extensions, Custom Development or Both? Choose Wisely

Hey there, fellow e-commerce enthusiasts! Let's talk about spicing up your online business game with some top-notch solutions. If you've been on the lookout for ways to boost your online store's efficiency, you're in luck! Enter Magento - the superhero among e-commerce platforms that's been hitting the mark.

December 11, 2023Top Magento Alternatives and Competitors in 2024

Hey, savvy e-commerce wizards! Are you ready for a whirlwind adventure into the vibrant world of online selling? Picture this: you're about to embark on a quest to find the ultimate e-commerce platform that'll skyrocket your business to the stars. Today, we're spilling the beans on the hottest topic around – the top alternatives to Magento in 2024.

Discover the latest from FME Extensions

Explore More
April 22, 2024Magento 2: How to Check if a Customer is Logged in?

The first question on your mind would be why I would want to check if customer is logged in Magento 2. Well, competition in eCommerce is at an all time high. In the coming years, this competition will only increase further. What does it mean? As a store owner, you need to find a way to retain and attract customers. This is only possible through the right strategies. After all, product quality is no longer the differentiating factor. Almost every online store offers more or less the same quality products. Our experience as a Magento extension development company tells us that customer personalisation is the key to long-term success. When we say personalisation, the first thing that comes into mind is artificial intelligence. No doubt AI can boost your eCommerce sales . Check out the below infographic on how AI boosts eCommerce. Instead of focusing your resources on AI, we have a much simpler solution. All you need to do is start treating your customers differently. For starters, treat logged in and non-logged in customers differently. For example, you may want to offer exclusive features or discounts to logged in customers only. To implement this, you first need to confirm whether a Magento 2 customer is logged in or not? Before we talk about ‘Magento 2 check if customer is logged in’, let’s talk about the Magento 2 login as customer extension. Afterwards, we’ll discuss how to check if customer is logged in Magento 2. About this Extension Why are we mentioning this extension? Too often, we hear store owners complain about poor reviews, lack of sales, and low engagement. They argue that their store has the best features, top quality products, and robust marketing strategies. Despite it, the store’s performance is lower than expectations and peers. Unfortunately, they fail to understand the most important aspect of any business – the customer. Unless a business understands the customer, they cannot succeed. Therefore, the emphasis must be on understanding the customer’s pain points, buying journey, and other aspects. With this extension, you can login to your store as a customer and experience their journey firsthand. There is no need to obtain customer credentials. This allows you to make changes to their account or help them with any issue. For example, a user may be experiencing a problem but unable to report. Your Magento experts can log in to their account, identify the problem, and fix it promptly. All this without the customer having to worry about sharing their credentials. Book a Live Demo here . Other Useful Extensions for Personalisation: Hide Price & Add to Cart Button Restrict Products by Customer Group Methods To Check If a Customer Is Logged-In in Magento 2 There are 2 ways you can check this. By injecting class and by using object manager. Although the 2nd method (object manager) is not recommended, it’s still used as an alternative. Method 1: By Injecting Class (Dependency Injection) In this method, first, you need to inject the following class in the constructor method: /Magento/Customer/Model/Session protected $_session; public function __construct( ... \Magento\Customer\Model\Session $session, ... ) { ... $this->_session = $session; ... } Then in your class, use the following code in any function to check if the customer is logged in or not: if ($this->_session->isLoggedIn()) { // Customer is logged in } else { // Customer is not logged in } Sample Code: <?php namespace [Vendor]\[Module]\Controller\Index; use Magento\Framework\App\Action\Context; use Magento\Framework\App\Action\Action; use Magento\Customer\Model\Session; class ClassName extends Action { protected $_session; public function __construct(Context $context, Session $session) { parent::__construct($context); $this->_session = $session; } public function execute() { // by using Session model if($this->_session->isLoggedIn()) { //customer has logged in // your code in here }else{ //Customer is not logged in // your code in here } } } Method 2: Using Object Manager You can use this method as an alternative to the above. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customerSession = $objectManager->get('Magento\Customer\Model\Session'); if($customerSession->isLoggedIn()) { // customer login action } Conclusion You can always contact our expert Magento developers if you encounter any issues with the above code. Feel free to contact us in case you have any issue in your Magento 2 store. Other Articles: How To Login as Customer in Magento 2? How To Redirect Customers to the Previous Page After Login in Magento 2? [Fixed]: Magento 503 Service Temporarily Unavailable? [Fixed]: There Has Been An Error Processing Your Request in Magento 2?

Read More
April 22, 2024Fixed: Magento 2 vendor autoload is not found. please run 'composer install' under application root directory.

Magento is without a doubt one of the most powerful and widely used eCommerce platforms. However, like any other platform, it can run into issues from time to time. One common issue that you are bound to encounter is the vendor autoload is not found. This issue can be quite frustrating even for expert Magento developers. This article will let you know everything there is to know about the issue and how to fix it. Understanding ‘Vendor Autoload is not Found Magento 2’ It is pertinent to understand why this occurs in the first place. Magento 2 displays this error when it is unable to locate the necessary autoload files in the vendor directory. For those of you who don’t know, the vendor directory is where Magento installs all third-party components. If Magento cannot locate the necessary files in this directory, it is near impossible for the platform to function smoothly. What Causes ‘Vendor Autoload is not Found’? There are several reasons contributing to the vendor autoload is not found error. The most likely reason is the composer installation process did not complete properly. You may have unknowingly interrupted the process, leading to missing files in the directory. Secondly, you may not have granted Magento permission to access the relevant files. Check your file permissions to ensure that the platform has relevant access. Problems with the composer cache can also contribute to the issue. Fixing the Magento 2 Vendor Autoload is not Found Error This error can pop up when you try to install Magento 2 on your server or create a Magento 2 instance on your local machine. The following steps will fix the error. Open command prompt and type cd\ Navigate to your Magento 2 root directory i.e. where you have kept your Magento 2 installation files. Example: cd xampp/htdocs/magento 2 Type the command ‘composer install’. Example: xampp/htdocs/magento 2/composer install This will import your packages and create the vendor folder, along with the autoload script. It will take a minimum 20 minutes to do this. So just relax. When the download completes, refresh the browser and you will see the error has gone. If you are getting the above error on your server, run the command ‘composer install’ on your server after navigating to the root directory. A common issue that people face is they can't use composer because they can't run it on their server (e.g. because it's shared and they have no shell access). In that case, you can still use composer. Run ‘composer install’ locally (an environment that has no such restrictions) and upload the local vendor folder it generates along with all your other PHP scripts. Hope it resolves the issue. Conclusion That’s it for this tutorial. If you have any Magento related queries, then ask our expert Magento support team . Related Articles: Magento 2 System Requirements Get Media URL in Magento 2 Get Base URL in Magento 2

Read More
April 21, 2024Magento 2: Add Custom Variable to Email Template

According to Statista , the global eCommerce revenue is expected to reach US$4.45tn in 2024. While this shows the popularity of eCommerce, it also highlights the growing competition. It wouldn’t be wrong to say that everyone is trying their hands at eCommerce nowadays. The customers relish this competition since they have much more choice than before. A customer in the US can order products from anywhere in Europe or Asia. From the business perspective, high levels of competition are a headache. Not only must the compete with local competitors but also those based thousands of miles away. There are several strategies to manage this competition. As a leading Magento development company, we have considerable experience in helping customers devise eCommerce strategies. We believe that personalisation is the key to long-term success. It helps build lasting relationships and improves sales. Read More About Email Personalisation: 5 Ways to Hyper-Personalize Your Marketing Emails Magento 2 offers a wide range of features for managing customer relationships and email communication is one such feature. Of course, sending generic emails will not help build loyalty. This is where the Magento 2 add variable to email template feature comes into play. Magento allows users to add custom variables to templates to make the email engaging. The concept of custom variables is not new. They are pieces of information used to perform different operations, hold values, and personalise communications. They are called variables because their values change according to context or programming logic Although Magento 2 provides plenty of predefined variables, the list is however limited. To meet your business specific needs, you can create custom variables and add them in pages, blocks, and email templates. Let’s see how to create custom variables and how to add them in an email template. Before we list the steps, we would like to about the Email Templates Extension by FME Extensions. About the Extension This extension allows you to hyper personalise your email communications, thereby ensuring greater customer loyalty and engagement. You can choose from a wide variety of mobile-responsive themes as shown below. Email customisation is incomplete without heading your logos, product details, and other relevant information. With this extension, you can add all this and more. You can also add your social media links to boost traffic to social media channels. If you are interested in this extension and wish to know more, book a live demo . Magento 2 Add Custom Variable to Email Template Step 1: Create a Custom Variable Login to Magento 2 Admin and navigate to System -> Other Settings -> Custom Variables Click Add New Variable after the page loads Now enter the following custom variable information. In the Variable Code field, enter an identifier using all lowercase characters without spaces. You can use an underscore character or hyphen to represent a space. For example: my_custom_variable Enter a Variable Name , which is used for internal reference. For example: My Custom Variable To enter the value that is associated with the variable, do one of the following: For Variable HTML Value , enter the variable value formatted with simple HTML tags. This option allows you to format the value. For example: This content will appear in bold. For Variable Plain Value , enter the variable value as plain text without formatting. For example: This content will appear as normal text. Click Save and you are done with creating your custom variable. Step 2: Add Custom Variable to Email Template Follow these steps to add custom variables to email templates: Navigate to Marketing -> Communications -> Email Templates Choose the template where you want to add the variables to or create a new template. Clicking on the Insert Variable button above the Template Content field will load the list of both predefined and custom variables. Click on any custom variable you want to add to the template and it will be automatically added in the field. Don’t forget to Save the changes when you are done. tr:nth-child(even) { background-color: #dddddd; Variables Used in Magento Email Templates Some of the variables used in magento email templates: Email Template Variables VARIABLE MARKUP TAG Email Logo Image Alt {{var logo_alt}} Email Logo Image URL {{var logo_url}} Email Logo Image Height {{var logo_height}} Email Logo Image Width {{var logo_width}} Template CSS {{var template_styles|raw}} New Account Template Variables VARIABLE MARKUP TAG Billing Address {{var formattedBillingAddress|raw}} Email Order Note {{var order.getEmailCustomerNote()}} Order ID {{var order.increment_id}}">contact us . For complete list of variables used in magento email templates, check this guide .

Read More