How To

How to get Product List in System Configuration in Magento 2

In this competitive market of E-commerce, it’s necessary to deliver something beyond the expectations to your customers. Because having a great user experience encourages your customer to purchase more and more from your store. At MageComp, we do the same we imagine, we build, try and test extension, again and again until we get satisfied to deliver a perfect product to our valuable customers. So, they do not need to worry once they set-n-up.

Recently, one of the customers came with a requirement of highlighting some of the store products by making easy backend selection to serve personalized product experience. And we started coding, at that time we have decided to display product list on system configuration to make an easy selection of products using the multi-select box. Here is another blog series to get Product List in System Configuration in Magento 2.

First we need to add this below code to ‘System.xml’ file available ad below location to add multi select box to system configuration.
app\code\vendor\extension\etc\adminhtml\system.xml

 
    VENDOR\EXTENSION\Model\Config\Productlist

Now create another file ‘Productlist.php’ inside your extension folder with below code to fetch and display products list.

app\code\vendor\extension\Model\Config\Productlist.php


Lastly, Comment below if you face an issue while using this code.
Happy Coding!
Click to rate this post!
[Total: 9 Average: 4.1]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

Recent Posts

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

11 hours ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

11 hours ago

Magento 2: How to Add Header and Footer in Checkout

Hello Magento Friends, In today’s blog, we will discuss adding a header and footer to…

1 day ago

Understanding Flexbox Layout in React Native

Hello React Native Friends, Building a visually appealing and responsive mobile app is crucial in…

3 days ago

HYVÄ Themes Releases: 1.3.6 & 1.3.7 – What’s New

We're thrilled to announce the release of Hyvä Themes 1.3.6 and 1.3.7! These latest updates…

3 days ago

How Modern E-Commerce Platforms Leverage Docker & Kubernetes for Scalability

Your e-commerce platform is surging - orders are rolling in, traffic spikes are becoming the…

4 days ago