The Death Of Magento Performance: 13 Common Guidelines

The world is moving fast, and people’s attention span is decreasing. Even for online shopping people opt for it because they can save a lot of time and efforts in the process. So, speed and good Magento performance are central to the success of any eCommerce store. A 1-second delay in page response can result in a 7% reduction in conversions. The speed of your business website matters. Fast-loading websites perform better on every front: higher search ranking, excellent user experience, and better user engagement. Most importantly, quick-loading websites deliver higher conversions and higher revenue.

When we are talking about the Magento Performance site, it’s not just about the page load speed, but every function and process a customer has to go through from searching for products to the checkout process. Performance optimization is an integral part of Magento development and cannot be underestimated. Magento 2 has fixed many issues with the previous version, but there is still a lot you can do to improve the performance of your Magento 2 site.

Magento Performance: 13 Common Guidelines

There are many Magento Performance optimization techniques out here. In this post, I am going to share with you some simple tips to speed Magento 2 store.

Server Requirement & configuration optimization

As you may know, the server is the key factor for Magento Performance. If your picked server is not good enough you can’t have a good website. Hence, to have a good website, we suggest you replace it with a dedicated server. Moreover, when you choose a host, please keep these categories in mind.

Code and Database Optimization

Regularly Improve your database performance using query indexing and broad optimization scripts. Use your DB management system to optimize the database on the frequent basis. Let’s me show you little tips to optimize via MySQL configuration. You can try and get the following settings in my.cnf

query_cache_type = 1
query_cache_size = 32M
php_value memory_limit 128M

Optimize Magento database by Cleaning log

If you are wondering when you need to optimize Magento database, you can check your site. In case you have around 200MB, it is time for cleaning.

Enable JS & CSS optimization

CSS and JS file help your front end look better. Yet, they are one of the core factors that slow down your site speed. Luckily you can cut influence in magento 2 by enabling JS & CSS optimization.

To enable JS & CSS optimization: Go to Stores -> “Configuration” in “Settings” Section -> “Developer” in “Advanced” Tab -> Section “JavaScript Settings” (Fields “Enable Javascript Bundling“, “Merge JavaScript Files“, “Minify JavaScript Files” change to “Yes”)

css optimization

Go to Stores -> “Configuration” in “Settings” Section -> “Developer” in “Advanced” Tab ->-> Section “CSS Settings” (Fields “Merge CSS Files“, “Minify CSS Files” change to “Yes“)

css optimization


Implementing a Content Delivery Network (CDN) with Magento is one of the easiest ways to instantly see decreased load times which enables serving your assets from a location geographically closest to your customers and hence reduces latency and increases download speed for those assets. To set up CDN, please go to STORES -> Configuration -> GENERAL -> Web -> Base URLs (Secure) then insert your HTTPS URLs in here and bring your customers fast loading speed.

Images Optimization

You shouldn’t use images that are much larger than necessary. If your site requires a small image, such as 50 x 50, there is no need to upload a much larger file to get the same result.

Enable Cache for Magento Performance

Caching improves load speed response time on your Magento Store. A cached page will be stored after one visit or pre-generated and stored. Magento Enterprise Edition offers full page caching as a default option for the category, product, and CMS pages. To Enable cache Go to Stores -> “Configuration” in “Settings” Section -> “Catalog” in “General” Tab -> Section “Storefront” -> Fields “Use Flat Catalog Category” and “Use Flat Catalog Product” change to “Yes”.

css optimization

Minify CSS, JavaScript, and HTML

Minifying removes all unnecessary characters from source code without changing its functionality. These unnecessary characters usually include white space characters, new line characters, and comments, which are used to add readability to the code but are not required for it to execute.

Enable Flat Categories and Products

One of the main problems that slow down Magento Performance 2 speed is the read speed of database; especially, in case your Magento 2 store has a large number of products. To enable flat-options: Go to Stores -> “Configuration” in “Settings” Section -> “Catalog” in “General” Tab -> Section “Storefront” -> Fields “Use Flat Catalog Category” and “Use Flat Catalog Product” change to “Yes”.

css optimization


Catalog Size

The larger your catalog, the greater the burden on your server(s) to load pages, especially when we’re talking about SKUs tipping over 100K. You can enable Flat Categories and Products to improve load speed.

Check Links

A broken link is a hyperlink to a webpage that doesn’t exist it’s a waste of your page’s load time.

Change to Production Mode

It is recommended to always upgrade your Magento system, your plugins, and other software your website depends on (to the latest version).

Change to Production Mode

Intended for deployment on a production system. Exceptions are not displayed to the user, exceptions are written to logs only, and static view files are served from `pub/static` only. New or updated files are not written to the file system.

php bin/magento deploy:mode:set production


In today’s world increasing page speed performance is getting more and more important for websites, especially for eCommerce stores, because users are becoming more demanding in terms of user experience. I have described how to speed up load times in Magento with recommending a number of solutions. If you are planning to increase Magento Performance and page speed on your website or mobile app then this article gives you the complete guide in less time and effort. You can also join the conversation if you have any other solution or idea which we can use to make it more attractive and easy. That’s all folks and feel free to contact us in case if you have any query.


Further reading

14 features in eCommerce Mobile App to increase your sales

The boom in mobile eCommerce has led to the creation of mobile apps and platforms. Our generation has become a comfortable shopping and paying their mobile devices. Smartphones and eCommerce Mobile App are having a meaningful impact on how we buy. Sales via the eCommerce Mobile App have grown 39% over last year to reach $123.13 billion this year in the United States. This means m-commerce will account for 1/3 of all eCommerce sales. Here is a list of 14 must-have features that attract online shoppers.

eCommerce Mobile App Features

  1. Simple Registration Process: Almost customers will not like to fill the long forms demanding too much information. Make the registration process simple & put smallest required fields for ease operation. People rarely prefer the app which demands too much information for a registration.
  2. All payment options supported: Sometimes it happens that a buyer has a strong wish to buy a product from the specific mobile app. Unfortunately, he doesn’t find the payment option he wants, then it may result in the decreased sale ratio. Put all possible payment options which are used by the most shoppers.
  3. Eye-popping themes: A phone has a limited space and if the design is too cluttered, it would make the user journey complicated. Ensure the app uses space without compromising on design and meets business objectives. Moreover, the visual should be attractive, engaging and must convey to the users. What an app does and why it is better than the competition
  4. A feature of Push Notifications: Some of the most successful eCommerce mobile apps are the ones that have Push Notifications into their list of features. Push notifications tend to inspire immediate action like exclusive promotions, special offers. You can pair up this feature with analytics, and you would see a significant boost in sales in no time.
  5. 100% Custom Branding: Get a custom mobile app with your own logo and color combinations at a nominal cost of development. which will add greatest features to your users like displaying products listing, users account creation, adding into carts, apply coupons, checkout, view order and much more.
  6. Synchronizations: Any changes on the website to the Categories, Catalog or Customers profile get reflected in your mobile phone app. So you don’t have to perform the changes on your app again
  7. Google Analytics: Google Analytics for Mobile Apps measures your app’s full value. See what users love and how to make them happier — and make your app more successful.
  8. Product Review: You might think that having negative reviews is a sale killer. The opposite is actually true. Having negative reviews can often be positive. It’s shown that products without negative reviews are seen as censored.
  9. Wish List Button: E-commerce sites that aren’t using wish lists are leaving revenue on the virtual desktop table. What’s better than having customers bookmark items they want and will most likely buy in the future?
  10. Related Products: People that buy online are impatient and you constantly lose sales as a result. Use Recomatic to display smart Related Products and get those sales back. No time to set it up? No problem! We take care of everything for you.
  11. Quick Checkout: A mobile app should contain Quick Checkout feature. The Quick Checkout feature allows shoppers to complete an order with predefined information from the quick check out profile and automatically sets the shipping and billing addresses for the customer.
  12. Multi-Currency: Build Magento app that can transact in an endless list of international currencies including USD, GBP, EURO, AED, YEN, INR and much more. Offer customers the true experience of international payments, anywhere, anytime.
  13. Multi-Lingual: A mobile app should also contain multiple language support so that customer can convert your store into 30 or more languages of their choice by simply selecting the languages from the drop down menu.
  14. Return Policy: Return policies are an essential feature of any e-commerce website. return policy should be clearly visible and well-written or illustrated.

Above mentioned are just main features that any E-commerce app must have. Excluding these, there are many other features which make the app successful. So, for the extended requirements of your business, you may have other customized app features.


A Good mobile app involves more than technology and the latest tools. An effective mobile app is a platform that requires a solid strategy. These are the very common feature which a mobile app have. If you are planning to create an eCommerce mobile app than the experienced team at Ipragmatech will help you. We will first understand your ideas and then creates an amazing product to you. which is Mobile App Builder for e-commerce Mobile App to you. If you need more help and idea about setting up your mobile app, feel free to contact us.


Magento: A Gift for You

Mobile app builder for your online store based magento2

Further Reading

7 Reasons to choose Magento eCommerce platform for your Online Store

A complete guide to build a native e-commerce mobile app

6 Reasons eCommerce Store Needs Mobile App


7 Easy tips to improve magento store loading speed in 2017

Magento is an open-source eCommerce platform with a large number of active online merchants using it. Magento is very robust with great flexibility, scalability, and customization. Most of the CMS or eCommerce platforms like Magento and WooCommerce are having issues with speed and their performance degrading over time. Why do we need to optimize Magento performance?

    • According to KISSMetrics, 40% of the customer will abandon an eCommerce site if it takes longer than three seconds to load. More noticeable, an ONE-SECOND delay in load time can result in a 7% reduction in conversions.
    • As you know by now, Google is using site speed in web search ranking, and not only for Google but mainly for the User Experience (UX) on your eCommerce store.

In this article, we share some tips and tricks on how you can optimize Magento performance of your Magento based eCommerce store.

Tips to improve Magento store loading

1. Latest Version:

Always upgrade to the latest Magento version. Not only will you get more features and bug- and security fixes, but with every update, Magento performs better. You didn’t check every time to magneto website to for latest release, Magento does a good job of notifying you of important updates that become available within your messages inbox.

2. Enable Flat Catalog:

Magento uses the EAV model (entity attribute value) to store customer and product data. Enabling the flat catalog for categories and products merges product data into one table, thereby improving performance by responding to MySQL queries faster. If your eCommerce store has more than 1000 products, this can very beneficial.

Magento uses the EAV model (entity attribute value) to store customer and product data. Enabling the flat catalog for categories and products merges product data into one table, thereby improving performance by responding to MySQL queries faster. If your eCommerce store has more than 1000 products, this can very beneficial.
1. Login to your Magento Store as admin
2. Navigate to “System” → “Configuration” → “Catalog.”
3. Under “Frontend” change “Use Flat Catalog Category” and “Use Flat Catalog Product” to “Yes.”
4. Click on “Save Config.”
5. Clear the cache. The recommended way to do this is to delete everything from the /var/cache directory. You can also do it by navigating to “System” → “Cache Management” and clicking on “Flush Cache Storage” which is equivalent to deleting all the cache.

3. Cache & Indexers: 

There are many forms of caching that can be implemented with Magento. Combining NGINX + APC + Memcache + Varnish caching is a great way to success. Magento also comes with a built-in caching module as well. One more thing using Magento’s page caching. It reduces the web server processing load is taken off from the web server by serving pages already visited before from a cache which makes it a lot faster. There are lots of pages caching extensions available for Magento you can choose according to your requirement.

Using a PHP accelerator is another form of caching. They increase the performance of PHP scripts by caching them in their compiled state. You can use a PHP accelerator like APCXcacheeAccelerator  etc.

As we know Magento has lots of feature one of them is the indexer. Magento updates indexes on every object store by default, but in some cases, manual updates are required. Basically, indexes are used to speed up Database queries.

4. Code and Database Optimization:

Use a PHP accelerator like Zend and uninstall unnecessary PHP or Apache modules you don’t need or use. Improve your database performance using query indexing and broad optimization scripts. Use your DB management system to optimize the database on the frequent basis.

Magento has a compilation feature which has been reported to sometimes give up to a 50% performance boost. By default, Magento’s application files are searched in a certain order every time the page loads, which results in a lot of filesystem reads. In Magento admin, (top menu) System > Tools > Compilation, click Enable. This will take all the active scripts in Magento’s core structure and bring them to the front for faster website speed. The Magento compiler reduces these reads by copying all of these files into a single include directory and also caches ones that are used more frequently.

Optimizing your product images can dramatically increase the speed of your pages as this decreases their download times. You can compress them before uploading them using a tool like PhotoShop or there are a number of extensions you can use to auto-optimize them like TinyPNG Extension.

5. Merge CSS & JS:

Magento actually has a built in feature to concatenate (merge) your CSS and Javascript files into one file. This will reduce your total number of HTTP requests and in turn help speed up the loading of your pages. By using the advanced configuration in Magento admin, you can merge you JavaScript and CSS files, this reduces the load time. Please be aware that merging your javascript files may cause issues that need to be further resolved, but in the end, it certainly is best for your store.

6. Use CDN:

Implementing a Content Delivery Network (CDN) with Magento is one of the easiest ways to instantly see decreased load times. Using a content delivery network (CDN) such as MetaCDN enables serving your assets from a location geographically closest to your customers and hence reduces latency and increases download speed for those assets. Magento lets you define where certain assets (CSS, javascript, images, etc.) are loaded from such as a URL pointing to a CDN.  Magento CDN integration guide for details how to integrate the MetaCDN Site Accelerator into your Magento installation.

7. Hosting environment:

And last but not least, choosing a reliable and fast web host can be one of the most important decisions you will make when trying to improve Magento performance. We recommend staying away from shared hosting as they tend to overcrowd their servers and you will end up sharing resources between hundreds of website. We suggest going with a VPS like socialfoxhosting.comDigital Ocean, Linode etc. The reason is that you will be in complete control of your resources.


There are many ways to optimize Magento performance for your Magento based eCommerce site. Some of them we have discussed here. If you suffer from slow Magento performance, we can help you with Magento optimization to speed up Magento in no time! Making sure your eCommerce solution is running fast is one of the most important factors to your sales, SEO rankings, and overall best user experience.

For further reading

How to build custom Magento Rest API effortlessly in less than 2 hours : Part 1

Sooner or later you’ll run into a case where you need REST API for your online store and you found that Magento does not support all Magento REST API. What should you do now? How can you write REST API for your online store as per client need?

The Magento REST API allows you to use various data entities such as customer, catalog and order information to third party applications. I’d like to share it with you a quick, simple, well written and easy solution with will explains how you can write an extension for Magento REST API.

Magento REST API Features

  • Simplistic design approach
  • Testing and troubleshooting is easier
  • Better performance than ever
  • Ability to manage customers, addresses, orders, inventories and products using HTTP verbs such as GET, POST, PUT and DELETE.
  • Data requests and responses can be in XML or JSON format.

Custom Extension for REST API

Create new custom module on your Magento server with the following structure to create a custom module with REST support.



Here’s the list of files required for the desired setup, Here Ip is the package and Productapi are the module name. You can edit as per your need:

  • app/code/local/Ip/Productapi/etc/config.xml: It’s a module configuration file.
  • app/code/local/Ip/Productapi/etc/api2.xml: It’s a file which declares the APIs provided by our module.
  • app/code/local/Ip/Productapi/Helper/Data.php: It’s a file used by the Magento translation system.
  • app/code/local/Ip/Productapi/Model/Api.php: It’s a model file which implements the logic of our API methods.
  • app/code/local/Ip/Productapi/Model/Api2/Product/Productlist/Rest/Guest/V1.php: It’s a file to support Magento’s v1 REST API.

Magento REST API Step 1: Enabling Extention

The first thing to now do is create your module definition file in app/etc/modules (not in the above folder diagram). For my extension, this is call Productapi.xml

<?xml version="1.0"?>

Magento REST API Step 2: Extensions Configuration

Now, we need to start setting up our extensions configuration.  We need two files for this in our extension’s etc folder; config.xml and api2.xml.


Create the config.xml file and put in the Ip -> Productapi -> etc directory and paste the below code. Here we are configuring Helper and Model file for the REST API and no need to change in Magento core file.

<?xml version="1.0"?>


Create api2.xml and put in the Ip -> Productapi -> etc > api2.xml and paste the below code:

            <ip_productapi translate="title" module="ip_productapi">
                <title>Ip Products</title>
        	<ip_productapi_list translate="title" module="ip_productapi">
                <title>Product List</title>
                <attributes translate="attribute1 attribute2 attribute3" module="ip_productapi">

On the Model(under Resource), we are telling Magento the name of the models used in the API calls. privileges section say what our users(guest, customer) can do here.

On the attributes section, we are set up the attributes which we need on the REST API response. For the moment we are returning three attributes(attribute1, attribute2, attribute3).

The last section of api2.xml is the route. On the route section, we are telling the front controller name of the REST API. Magento API runs on the route and whenever gets API call it uses the route and pass request to the definition. That’s all from extension configuration and now all we need to do is write the API class to handle the REST request.

Magento REST API Step 3: Helper file

Next, we’ll need to create the Helper file to make sure the translation system of Magento works . It’s almost an empty file, but should be there as per the conventions!

 * Copyright © 2015 Ipragmatech . All rights reserved.
namespace Ipragmatech\Ipreview\Helper;
class Data extends \Magento\Framework\App\Helper\AbstractHelper
	public function __construct(\Magento\Framework\App\Helper\Context $context
	) {

Creating Magento REST API Model file

we need to create a model file to support the Magento V1 API. Let’s create a model file with the following contents. On this file, we will write our logic and return the response.

 * Override for Magento's Catalog REST API
class Ip_Productapi_Model_Api2_Product_Productlist_Rest_Guest_V1 extends Mage_Catalog_Model_Api2_Product_Rest 
	 * Return item GET
	protected function _retrieve()
		// Write your code Here


So that’s it as far as the file setup is concern for the custom API implementation. If you’re curious, enable the module from the back­-end and don’t forget to clear the cache. In the next Article, we’ll go ahead and know how to configure the application with the Admin role.


It’s important to remember that HTTP was conceived to communicate between systems, which share nothing but an understanding of the protocol. In general, the fewer assumptions beyond HTTP you make, the better: this allows the widest range of programs and devices to access your API.
If you are planning to add Magento REST API functionality on your website or mobile app then this article gives you the complete guide for creating Magento REST API structure in less time, effort and cost. You can also join the conversation if you have any other solution or idea which we can use to make it more attractive and easy. That’s all folks and feel free to contact us in case if you have any query.


For further reading

How to validate payment through PayPal using Magento REST API ?

In this digital age to maintain your business growth, Mobile application for your eCommerce becomes the main key point in short mCommerce. Data researched by Coupofy suggests that between 2013 and 2016 mobile shopping will grow 42% compared to regular eCommerce’s 13%, and mobile users will spend a total of $600 billion in 2018, a 300% growth from 2014’s $200 billion. Business owners are focusing on launching their mobile app to make their exists in this digital age. So the development of mCommerce is in the pick point now. As the mCommerce Mobile application development growing rapidly there are a lot of issues are in the queue related to design, performance, UI, payment gateway, validate PayPal payment etc. In this article, we are going to discuss how to validate PayPal payment through Magento REST API interface?

So what is the actual problem?

We are developing an android app for Magento base eCommerce site. We are using REST API. Payment and order related things integration is challenging for us, since we need more secure and careful module development. We are doing an android app so there is a situation where we have complete the payment process using PayPal express mobile SDK. In return, we get transaction id, according to my understanding we have to save with the created order. In the site, we configured PayPal successfully. So the transaction id passed to Magento, where we need to validate PayPal payment. Now at the end, we want an API from Magento side to save the transaction and complete the checkout process.

In fact lot of people have the same problem:


We have gone through the answer posted in the various community like StackExchange, Magento forum etc. After a little bit research, we have to use the following approach and quite suited well to our requirement.
1. Created a custom payment Method: In the box, Magento rest api does not support place order without the payment method. We have created a custom payment module with a custom method. For More detail how to create a payment module check here. Here is the code sample for our method:

 * Copyright © 2016 iPragmatech. All rights reserved.
namespace Ipragmatech\Paymentapi\Model;

 * Pay In Store payment method model
class Ippaypal extends \Magento\Payment\Model\Method\AbstractMethod

     * Payment code
     * @var string
    protected $_code = 'ippaypal';

     * Availability option
     * @var bool
    protected $_isOffline = true;

2. Enable only for the rest API: The above method enables only for the rest api and not supported on the web app for the payment. Make a new rest api endpoint to receive the transaction id and validate it from PayPal. After successful validation move to the next step.Check out the documentation to validate PayPal payment.
3. Saved transaction id with order: Once all validation are passed save the transaction id return by the PayPal with the order. A transaction is a proof that payment has been done. In Magento transactions are created when the invoice is created, although Magento creates the transaction by itself you don’t need to worry about that but in case you will have to create the transaction manually, here is the code snippet that will create a transaction:

public function createTransaction($order = null, $paymentData = array())
        try {
            //get payment object from order object
            $payment = $order->getPayment();
                [\Magento\Sales\Model\Order\Payment\Transaction::RAW_DETAILS => (array) $paymentData]
            $formatedPrice = $order->getBaseCurrency()->formatTxt(
            $message = __('The authorized amount is %1.', $formatedPrice);
            //get the object of builder class
            $trans = $this->_transactionBuilder;
            $transaction = $trans->setPayment($payment)
                [\Magento\Sales\Model\Order\Payment\Transaction::RAW_DETAILS => (array) $paymentData]
            //build method creates the transaction and returns the object
            return  $transaction->save()->getTransactionId();
        } catch (Exception $e) {
            //log errors here

Click here more detail regarding the transaction.


After all, we have used this approach to validate payment because this is well suited to our requirement. If you have a better idea please fell free to share in the comment. This might help a lot to us as well others.


7 Reasons to choose Magento eCommerce platform for your Online Store

The journey to launching your product on the internet and in essence to the World Wide Web has never been beautiful and easy. Magento 2, the new Magento eCommerce platform has your answers on the fingertips. It is time to move your traditional stores from physical world to the virtual world. If you are a retailer and you have been dreaming of getting online, your dream has come true with Magneto eCommerce platform.

All you have to do to try out our free trial setting and you are on your way to launching your products and stores online. The free trial gives you an opportunity to sample our Magento eCommerce platform and make an informed decision. Apart from setting up your store using affordable means, Magneto eCommerce platform helps you to migrate your core uniqueness in terms of your logo and color schemes online. Therefore, you clients would not get confused when they search your retail store online. It is a matter of getting into action, there are no upfront charges on our platform.

Benefits of Magento eCommerce platform

1. Open Source

Magento is a free eCommerce platform. It uses open source technologies and programming languages. The benefits of the open source are

  • Reliability
  • Stability
  • Auditability
  • Cost
  • Flexibility and Freedom
  • Support and Accountability

Magento facilitates above with high flexibility for developers.

2. Large Support Community

Magento community rapidly grows day by  day. Huge no of professional developers are working on Magento. They are always ready to support for any technical and programming help. Here is the few Magento solution hub.

  • Stack Exchange : This platform an interface to communicate with huge no of Magento developers. You can browse for the solution or ask anything related to Magento programming, technical issue, hosting etc.
  • Magento Community : This is an official forum for Magento. Basically, this provides a complete solution of Magento.

3. Extension and Themes

Magento Connect and Magento Marketplace is superstore of Theme and Extension for Magento 1.9.x and Magento 2 respectively. If you want to enhance the functionality of your eCommerce store you no need to start from scratch there are huge no of extension available in Magento Marketplace. There are extensions for anything from SEO and blogging to image handling and affiliate marketing. All of the extension have ratings and reviews, enabling you to decide whether to install or purchase one.

4. Multiple stores

One of the great features is Magento can run multiple storefronts from a single backend system. If you are running multiple stores for multiple brands but want to maintain one harmonized backend system then Magento should be the best eCommerce platform for you.

5. Support

The IT developers of Magento are ready to serve their support to the users. Along with an informational blog, Magento has a knowledge base, forums for chatting with other users and all the contact information you need for calling or emailing the company. It provides technical and business help as well.

6. Ready to Host

As being a large community there are lots of Magento Hosting provider. There are a lot of option to choose to host your Magento store on the basis of optimization, price, performance, scalability according to the size of your store. There are ready to use hosted Magento store, just add your theme and product and launch your site as soon as you want. Some of the are:
Ipragmatech : Scalable Magento2 stack AMI is ready to run, prebuilt environment setting for scalability, performance and high availability for your online store.
Bitmani : Launch Magento with one click from the Bitnami Cloud Launchpad for Amazon Web Services.

7. Ready to use Mobile APP

We all aware of the Mobile commerce, how it effect your eCommerce business. In this digital era, you can’t afford the cost of missing the mobile app of your store. There is huge no of Magento developers and Magento based mobile application development company who provides the ready-made solution just plug the app into your Magento store and lunch for your customer. Some of the are:

Ipragmatech : Magento mobile app for your Magento based online marketplace. Try 30days free Magento android app.
Simicart : Magento mobile solution for your Magento store.


If you want to stay in this competitive eCommerce business environment, choose Magento eCommerce platform for your eCommerce store. Magento platform has numerous features and functionalities that can make your Magento site as the most loved and preferred eCommerce site among your customers .Once you have tested the Magento eCommerce platform and experienced the sweetness of technological advancement. Imagine selling your goods using a mobile app at the comfort your living room. Magneto platform exists to simplify your life. Try it today and see the difference.

How to extend magento2 rest api in 7 easy steps ?

Recently, we were working on Hotel Booking marketplace to provide a partial day booking and real time pricing. As per recent study most of the users prefer to have mobile app for Hotel Booking, so our client also wanted an mobile app ( ios/android ) for his marketplace. He also wanted some custom features which were out of the box for magento. Though the magento rest api have most of the required feature but we also need to customize some api to support mobile client. So we have implemented custom api and would like to demonstrated How to extend magento2 rest api in 7 easy steps  ? We hope this article would help those who wanted to extend the current API and utilize it on their mobile client or third party integration. Let’s dive into creating custom API for Myorders using the below steps :

7 Easy steps to extend magento2 REST API

Step 1: Create Separate module for extend magento2 REST API

Let’s use the vendor name “Ipragmatech” and module name as a “Restfulapi”.  There are two ways to create module  :

  • Create Module using Online Tools : There are many online tools available to create module. We can use the CED  Module Creator , because its easy and straight forward.
  • Create Module Manually : We can create module manually. We need to remember the Folder structure of Magento 2. Please follow this article to create module manually.

We assume that you have successfully created the module.

Step 2: Create di.xml into app/code/Ipragmatech/Restfulapi/etc/

<?xml version="1.0"?>
<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
  <preference for="Ipragmatech\Restfulapi\Api\OrderInterface" type="Ipragmatech\Restfulapi\Model\Order" />

Step 3: Create webapi.xml into app/code/Ipragmatech/Restfulapi/etc/

<?xml version="1.0"?>
<routes xmlns:xsi=""
<!-- Routing define -->
<route url="/V1/order/myorder" method="GET">
 <service class="Ipragmatech\Restfulapi\Api\OrderInterface" method="myorder"/>
  <resource ref="self"/>
  <parameter name="customerId" force="true">%customer_id%</parameter>

Step 4: Create OrderInterface.php into app/code/Ipragmatech/Restfulapi/Api/


namespace Ipragmatech\Restful\Api;

use Ipragmatech\Restfulapi\Api\Data\PointInterface;

interface OrderInterface
public function myorder($customerId);

Step 5: Create Order.php into app/code/Ipragmatech/Restfulapi/Model/


namespace Ipragmatech\Restfulapi\Model;

use Ipragmatech\Restfulapi\Api\OrderInterface;

* Defines the implementaiton class of the calculator service contract.
class Order implements OrderInterface
public function myorder($customerId) {
 if(empty($customerId) || !isset($customerId) || $customerId == ""){
 throw new InputException(__('Id required'));
 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $orders = $objectManager->create('Magento\Sales\Model\Order')->getCollection()->addFieldToFilter('customer_id',$customerId);
 $orderData = array();
   foreach ($orders as $order){
   $data = array("order_id"=>$order->getEntityId(),"status"=>$order->getStatus(),
   $orderData[] = $data;
  return $orderData;
  return $orderData;

Step 6: Create the di.xml file into app/code/Ipragmatech/Restfulapi/etc/webapi_rest/ for customer authoriaztion:

<?xml version="1.0"?>
<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\Authorization">
<plugin name="customerAuthorization" type="Magento\Customer\Model\Plugin\CustomerAuthorization" />
<type name="Magento\Authorization\Model\CompositeUserContext">
<argument name="userContexts" xsi:type="array">
<item name="customerSessionUserContext" xsi:type="array">
<item name="type" xsi:type="object">Magento\Customer\Model\Authorization\CustomerSessionUserContext</item>
<item name="sortOrder" xsi:type="string">20</item>

Step 7: Check the myorder api on postman

  • As we know that magento 2 provide three way of authorization : Token based, oauth and session based authorization.
  • Let’s try the token based authorization.
  • curl -X POST "" \
    -H "Content-Type:application/xml" \
    -d '<login><username>[email protected]</username><password>123123q</password></login>'
  • Let’s try myorder api (Get Request ) on postman. Use . Set content-type: application/json  and authoriaztion : bearer token_number in header.
  • We will get the json response of myorder like :
            "order_id": "5",
            "status": "pending",
            "amount": "85.0000",
            "order_date": "2016-06-01 17:48:32"

Looking for ready-made solution

If you are looking for ready-made solution of magento mobile app. There are the following available solutions:

MagentoShop by iPragmatech

SimiCart by magestore


As per recent study most of the users prefer to have mobile app for Hotel Booking, so our client also wanted an mobile app ( ios/android ). So we would like to demonstrated How to extend magento2 rest api in 7 easy steps  ? We hope this article would help those who wanted to extend the current API and utilize it on their mobile client or third party integration. Feel free to contact us if you have any further query.


7 Key benefits of magento wordpress integration using SSO

Ever thought of increasing your online store sales by providing more information like usage of products e.g. how does drinking green tea can help in reducing weight or how does specific engine oil increase performance of your bike? You need more information than just product description so that customer can take his/her decision after reading those articles. Next thing comes in mind, how can I have this solution for e-commerce store? Magento is the powerful platform to create an online store and WordPress can help in creating contents/blogs. So Magento WordPress integration allows you to have the best of both the platforms: an eCommerce platform with great flexibility and a powerful content management system.

Writing about the product should be able to tell more to the potential customer and at the same time, we can have a link to purchase the product. So next question is how to integrate both platforms? how does Magento customer access the article site without new signing up to the WordPress website. Single Sign-On is the solution which allows the user to access different platforms without registering to it.

Let’s have a look on SSO, Single Sign-On is authentication process, which allows end user logs into one application and he/she will be automatically signed into every other application. The popular example is Google, which is used in our daily life. Google implements SSO for their products: Gmail, Google +, YouTube, Analytics, etc. When you turn on your computer and access Gmail, you log in for the first time. In this article, we are going to cover key benefits of Magento WordPress integration using Single Sign-On and recommend readily available solutions for your platforms?

Key benefits of Magento WordPress integration using SSO

SEO: Blogging also considers as one of the best SEO tools for online website and WordPress is a powerful blogging platform. Integrate your Magento store with WordPress and increase SEO of eCommerce products.

Increase customer engagement: With powerful blogging, WordPress has another strong feature as the community platform, with this great feature of WordPress increases your customer engagement on your Magento store.

Performance: If you want to enable blogging feature into your Magento store, you don’t need to install blog plugin for Magento. Resulting a high performance after reducing the numbers of plugins into your Magento store. Your store and blogging both will be to the independent different application.

Reduce password fatigue: Password fatigue is the feeling experienced by many people who are required to remember an excessive number of passwords as part of their daily routine. After integration, your customer will forget password fatigue problem to reducing the password to remember.

Reduce Re-registration: Reducing time spent for your customer registration and login for the same identity. Just allow your customer to register only once and access all other applications.

Remove the need for your customer to remember and manage multiple passwords: It’s impossible for the average user to remember strong passwords for all the cloud services they use. They started an insecure way to store their password like passwords in email, and even writing down passwords and pasting them to their monitors. Also, may start creating weak passwords.

Reduce the risk of user account lockout: User may use several cloud applications and may have confusion with the passwords. If your store provides a restricted number of login attempts, if it fails account get locked.

Available Solutions

There is the various solution available for Single Sign-On with the different approach. Some of them are:

auctionMagentoPress: MagentoPress Single Sign On Plugin provides a seamless log-in experience to your Magento online store users by allowing users to sign in to your WordPress site. When a user signs into your Magento site and visit to your WordPress site, The Magentopress Single Sign On Plugin passed the credentials to WordPress and allows the user to participate in WordPress simply by signing in to your site.

MAGENTO-SSOMiniorange : miniOrange provides secure access to Magento for enterprises and full control over access of applications, Single Sign On (SSO) into Magento with one set of login credentials.

MAGENTO-SSOokta: If your product connects several apps together but requires people to authenticate every time they jump into a new section, you’re losing major UX points. With Okta, users can click once to sign in to everything.

MAGENTO-SSOonelogin: OneLogin’s portal gives users one-click access to all their web apps in the cloud and behind the firewall – via desktops, smartphones and tablets. OneLogin’s policy-driven security and multi-factor authentication ensure that only authorized users get access to sensitive data.



Magento WordPress integration wins buyers and influence sales. Share your products with blogs and community to get the attention of more users. This is a perfect choice if you have an existing eCommerce site based on Magento and would like to integrate WordPress blogging/community without the hassle of implementing your own solution. Feel free to contact us if you have any questions related to e-commerce or online communities development.





Single Sign-On