Bring Your e-Store Live on Mobile for Free!

Before conjuring up your mind in writing the complex block of coding and spending hours in mobilizing your Magento store, you can have your own app without any need of coding skills. Yes, you can become an app owner and bring your Magento store live on your customers’ mobile devices with a zero level of mastery in coding and app development process.

Envision Ecommerce has done all heavy lifting for you: be it brainstorming about the best technology, platforms, payment gateways, real-time data synchronization and other aspects. The MageIonic app that effortlessly turns your Magento store into a feature-rich hybrid mobile app.

Zero level of mastery in coding! Yes, just add your business details and personalized business content and get ready to bring your Magento store live on mobile. The MageIonic app is a no coding mobile app building solution, specially designed to cater all yours as well as your customers’ requirements!

Have a look at the features, advantages and other important aspects of MageIonic

Easy Navigation

Easy Navigation

A user-friendly navigation allows customers to extract all the guessing work. That’s why MageIonic comes with an easy navigation for making your actions effortless.  For this your customers will grab:

Social Login;

Supports both Android & iOS platforms;

Ease of shopping.

90 Days Free Trial Period

90 Days Free Trial Period

MageIonic comes with 90 days free trial period so that you can mobilize your Magento store and you’ve nothing to lose at this starting point. You don’t have any need of developers, designers to build an app for you within your desired deadlines.

Enhanced Product Display for Marketing Purposes

Product Display for Marketing Purposes

The app is equipped with an outstanding feature that allows merchants to display products in more enhanced ways. That further ensures maximum attraction towards your products from your targeted audience.

White Labelled Ionic App, Highly Customizable and Instantly Ready

Highly Customizable and Instantly Ready

Another important fact of MageIonic is that it is a white-labeled mobile app and highly customizable. Once you enter your business details and personalized business content, it will get instantly ready for your Magento store.

Google Analytics Tracking

Google Analytics Tracking

MageIonic incorporates Google analytic tracking functionality so you can track each consumer’s activity and stores’ sale via the app.

Works for MultiStores

Works for MultiStores

If you are running your own Magento based online multistore, you can also mobilize your multistore with the convenience of a single app, i.e. MageIonic.

Other Beneficial Features

Real Time Data Synchronization

Flexible and intuitive backend

Most secured payment gateways

Delivers fast performance across every device for being hybrid

 

So, what are you waiting for? Avail this all in one solution to meet your business requirements and enjoy a 90 days trial period for free!

Envision Ecommerce Upgrades its 7 WordPress Plugins to Latest Versions

We at Envision Ecommerce always keep an eye on current market trends and upgrade our products from time to time to deliver best customer experience. In order to follow the same pace, we’ve come up with our 7 upgraded WordPress plugins. These plugins include Advance Request a Quote, WooCommerce Product Catalog, Price & Discount based on Custom User Roles, Multiple Products Add to Cart, Advance WooCommerce Image Lazy loader, WooCommerce Advance Image Zoom and Bulk SMS Textart WooCommerce Connector. All these plugins have been undergone a complete compatibility check, testing and bug fixation process, and upgraded to the latest versions. Some of them have been rebuilt with tons of new features.

Advance Request a Quote – Upgraded to latest version release i.e. 4.0 and tested for compatibility in line with all recent versions.

WooCommerce Product Catalog – Upgraded to latest version release i.e. 4.0 and a new option ‘Hide price from shop and product pages’ is added for all users and non-logged in users. Also, it has undergone a complete compatibility check for all WordPress or WooCommerce versions. Some issues such as Jquery confliction of model pop-up with paid, email layout & sending email confliction and catalog PDF off are resolved now.

Price & Discount based on Custom User Roles – Upgraded to latest version release i.e. 4.0 and tested for compatibility in tune with all recent versions such as WordPress 4.7.3, WooCommerce 2.6.14 and PHP Version 7.1.

Multiple Products Add to Cart – Upgraded to latest version release i.e. 4.0 and made it enable for automatic checking the checkboxes if user changes the quantity of products for ‘Add to cart’.

Advance WooCommerce Image Lazy loader – Upgraded to latest version release i.e. 3.0 and undergone a complete compatibility check in tune with all recent versions such as WordPress 4.7.3, WooCommerce 2.6.14 and PHP Version 7.1.

WooCommerce Advance Image Zoom – Upgraded to latest version release i.e. 3.0 and undergone a complete compatibility check in tune with all latest versions of WordPress, PHP and WooCommerce.

Bulk SMS Textart WooCommerce Connector – Upgraded to latest version release i.e. 2.0 and plugin compatibility tested for all recent versions like WordPress 4.7.3, WooCommerce 2.6.14 and PHP Version 7.1.

Try the New Version and Let Us Know What You Think!

The plugins with new versions are available at our Envision’s store. Try these upgraded plugins and let us know what you think by using the comment section below.

How to use Magento 2 REST API?

Magento has provided a tool “swagger” that we can use to check all the API response.

We can access swagger on our Magento installation:

http:///swagger

It will list all the API resources and we can try them out. We just need to apply admin token on the top to use it.

We can use below code to create admin token:

$userData = array("username" => "", "password" => "");
 $ch = curl_init(“http:///rest/V1/integration/admin/token");
	    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
	    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData));
	    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Lenght: " . strlen(json_encode($userData))));
         $token = curl_exec($ch);   
         $token = json_decode($token);

So, using above approach you can test the API response.

Here is an example to get product detail using REST API:

$ch = curl_init(http:///rest/V1/products/".$sku);
            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
             
            $result = curl_exec($ch);
            $result = json_decode($result,1);

How to create custom REST API:

There are no. Of APIs already present, but sometimes we may need functionality that is not present in default APIs list, so in that case we can create our custom API:

Alan Kent has shared in his blog how to create custom API https://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/

With the help of this blog we have created our own API, add to /remove from wishlist.

Here are the steps:

Create custom Magento2 module and add code shared below:

1. app/code/Eecom/Connector/etc/module.xml

?xml version="1.0"?
config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"
    module name="Eecom_Connector" setup_version="1.0.0"
    /module
/config

2. app/code/Eecom/Connector/etc/di.xml

?xml version="1.0"?
!--
/**
 * Copyright © 2017 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"
   preference for="Eecom\Connector\Api\WishListMethodManagementInterface"
                type="Eecom\Connector\Model\WishListMethodManagement" /
/config

3. app/code/Eecom/Connector/etc/webapi.xml

?xml version="1.0"?
!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd"
    !-- Managing Wishlist --
    !-- Example: curl http://127.0.0.1/rest/V1/wishlist/add/1/2 --
    route url="/V1/wishlist/add/:customerId/:productId" method="GET"
        service class="Eecom\Connector\Api\WishListMethodManagementInterface" method="add"/
        resources
            resource ref="self"/
        /resources
    /route
    route url="/V1/wishlist/remove/:customerId/:itemId" method="GET"
        service class="Eecom\Connector\Api\WishListMethodManagementInterface" method="remove"/
        resources
            resource ref="self"/
        /resources
    /route
/routes

4. app/code/Eecom/Connector/Api/WishListMethodManagementInterface.php

?php
/**
 * Copyright © 2017 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Eecom\Connector\Api;
/**
 * Interface WishListMethodManagementInterface
 * @api
 */
interface WishListMethodManagementInterface
{
    /**
     * Return Product added to wishlist true/false.
     *
     * @api
     * @param int $customerId
     * @param int $productId
     * @return  \Eecom\Connector\Api\WishListMethodManagementInterface true/false
     */
    public function add($customerId, $productId);
    /**
     * Return Product removed from wishlist true/false.
     *
     * @api
     * @param int $customerId
     * @param int $itemId
     * @return \Eecom\Connector\Api\WishListMethodManagementInterface true/false
     */
    public function remove($customerId, $itemId);
}

5. app/code/Eecom/Connector/Model/WishListMethodManagement.php

?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Eecom\Connector\Model;
use Eecom\Connector\Api\WishListMethodManagementInterface;
class WishListMethodManagement implements WishListMethodManagementInterface
{
     /**
     * Object manager
     *
     * @var Magento\Framework\ObjectManagerInterface
     */
    protected $_objectManager;
    /**
     * Wishlist Repository.
     *
     * @var \Magento\Wishlist\Model\WishlistFactory
     */
    protected $_wishlistRepository;
    /**
     * Product Repository.
     *
     * @var \Magento\Catalog\Api\ProductRepositoryInterface
     */
    protected $_productRepository;
     /**
     * Item Repository.
     *
     * @var \Magento\Wishlist\Model\ResourceModel\Item\Collection
     */
    protected $_itemRepository;
    public function __construct(
         \Magento\Framework\ObjectManagerInterface $objectManager, 
        \Magento\Wishlist\Model\WishlistFactory $wishlistRepository,
        \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
        \Magento\Wishlist\Model\ResourceModel\Item\Collection $itemRepository
    ) {
         $this->_objectManager = $objectManager;  
        $this->_wishlistRepository= $wishlistRepository;
        $this->_productRepository = $productRepository;
        $this->_itemRepository = $itemRepository;     
     }
    /**
     * Return Product added to wishlist true/false.
     *
     * @api
     * @param int $customerId
     * @param int $productId
     * @return  \Eecom\Connector\Model\WishListMethodManagement true/false
     */
    public function add($customerId, $productId){
        try{
            if($customerId && $productId){
                try {
                    $product = $this->_productRepository->getById($productId);
                } catch (NoSuchEntityException $e) {
                    $product = null;
                    return false;
                }
                $wishlist = $this->_wishlistRepository->create()->loadByCustomerId($customerId, true);
                $wishlist->addNewItem($product);
                $wishlist->save();
                return true;
            }else{
                return false;
            }      
         }catch (\Exception $e) {
                return false;
        }        
    }
    /**
     * Return item removed from wishlist true/false
     *
     * @api
     * @param int $customerId
     * @param int $itemId
     * @return  \Eecom\Connector\Model\WishListMethodManagement true/false
     */
    public function remove($customerId, $itemId){
        try{
            if($itemId){
                $item = $this->_objectManager->create('Magento\Wishlist\Model\Item')->load($itemId);
                if (!$item->getId()) {
                    return false;
                }
               $wishlist = $this->_wishlistRepository->create()->loadByCustomerId($customerId, true);
                if (!$wishlist) {
                     return false;
                }
                try{
                    $item->delete();
                    $wishlist->save();
                    return true;
                }catch (\Exception $e) {
                   return false;
                } 
            }else{
                return false;
            }
         }catch (\Exception $e) {
                return false;
        }
    }
}

After adding the above code, and flushing cache, new created APIs will be listed on the swagger to check the response.

Here is code to call these APis:

Add to wish List

$ch = curl_init(“http:///rest/V1/wishlist/add/"/”);
                    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
                     
                    $result = curl_exec($ch);
                    $result = json_decode($result, True);

Remove from wishlist

$ch = curl_init(“http:///rest/V1/wishlist/remove//”);
                    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));                   
                    $result = curl_exec($ch);
                    $result = json_decode($result, True);

If you still have any query regarding this “How to” or would like to add some suggestions to this solution, let us know your feedback or query at [email protected], and don’t forget to share this “How to” blog with your fellow Magento 2 users!

ParkSafe App Crosses 1000+ Downloads

We are thrilled to announce that our new innovation, i.e. ParkSafe app has hit the 1000+ downloads. So, we would like to thank each one of you for your valuable support and feedback. This would definitely not have been possible without you!

We are extremely happy to see that how people from Tricity are taking full advantage of our app to eliminate all their parking issues without fighting or hurting each other’s vehicles. Moreover, several media like FM radio stations, Newspapers, Magazine from Tricity have helped our app to reach such a comprehensive audience along with worthy outcomes!

To make your driving route even more hassle-free, we at Envision Ecommerce are continuously working on the app enhancements, although recently we have added some excited features like Real Time Traffic Alerts, Multiple Vehicles’ Registrations, Search Car Owner by Registration Number, and Mailing Temporary Tags just after registering vehicles. So stay tuned!

Thank you again for all your support! Yes, and don’t forget to share your story with us about how ParkSafe has helped you during your parking inconveniences. We would love to hear from you! Have a Safe and Happy Day 🙂

Google rolls out AdWords account-level call extensions & More Click-to-Call Updates

Last summer, in 2016 Google started a test by displaying business names in the headlines of call-only ads after the phone number, and that change led to outstanding conversion results. That’s why now Google is rolling it out of testing worldwide.

Google has just made the announcement regarding the Account-Level Call Extensions & More Click-to-Call Updates this Wednesday.

Account-level call extensions

With Account-level call extensions, advertisers will soon be able to set up all their call extensions on a larger scale rather than implementing them at a campaign or ad group level. However, this extension makes possible for advertisers to implement call extensions across their entire account. It is expected that this new series of update is slated to take off sooner at some point this week.

Call extensions detail at keyword and ad levels

Soon Reporting columns for “Phone calls” and “Phone impressions” will be available to check phone-through rates at the keyword and ad group levels in the interface of AdWords.

More Advertisers Will Be Included in Automated call extensions

Google will soon be adding more advertisers in automated call extensions in the coming months. Most probably the program will be introduced in January, in which Google automatically drags the phone numbers highlighted on landing pages and sets up call extensions in advertisers’ accounts that do not already have them.

Therefore, if you have got call extensions set up, then you don’t need to worry about this or if you intentionally don’t use them, then see the following link: http://searchengineland.com/adwords-call-only-ads-business-names-256953

How to Add A custom Field to Checkout and Saving it to Backend in Magento2?

PHP code that inserts additional field in LayoutProcessor >>

$customAttributeCode = 'custom_field';
$customField = [
    'component' => 'Magento_Ui/js/form/element/abstract',
    'config' => [
        // customScope is used to group elements within a single form (e.g. they can be validated separately)
        'customScope' => 'shippingAddress.custom_attributes',
        'customEntry' => null,
        'template' => 'ui/form/field',
        'elementTmpl' => 'ui/form/element/input',
        'tooltip' => [
            'description' => 'Yes, this works. I tested it. Sacrificed my lunch break but verified this approach.',
        ],
    ],
    'dataScope' => 'shippingAddress.custom_attributes' . '.' . $customAttributeCode,
    'label' => 'Custom Attribute',
    'provider' => 'checkoutProvider',
    'sortOrder' => 0,
    'validation' => [
       'required-entry' => true
    ],
    'options' => [],
    'filterBy' => null,
    'customEntry' => null,
    'visible' => true,
];
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['shipping-address-fieldset']['children'][$customAttributeCode] = $customField;

Add mixin to change the behavior of ‘Magento_Checkout/js/action/set-shipping-information’ which is responsible for data submission between shipping and billing checkout steps

Step 1. Create your_module_name/view/frontend/requirejs-config.js

var config = {
    config: {
        mixins: {
            'Magento_Checkout/js/action/set-shipping-information': {
                '/js/action/set-shipping-information-mixin': true
            }
        }
    }
};

Step 2. Create your_module_name/js/action/set-shipping-information-mixin.js

/**
 * @author aakimov
 */
define([
    'jquery',
    'mage/utils/wrapper',
    'Magento_Checkout/js/model/quote'
], function ($, wrapper, quote) {
    'use strict';
   return function (setShippingInformationAction) {
   return wrapper.wrap(setShippingInformationAction, function (originalAction) {
            var shippingAddress = quote.shippingAddress();
            if (shippingAddress['extension_attributes'] === undefined) {
                shippingAddress['extension_attributes'] = {};
            }
 shippingAddress['extension_attributes']['custom_field'] = shippingAddress.customAttributes['custom_field'];
 // pass functionality to original action ('Magento_Checkout/js/action/set-shipping-information')
 return originalAction();
        });
    };
});

Step 3. Create your_module_name/etc/extension_attributes.xml

To access your data on backend you can use:

$value = $address->getExtensionAttributes()->getCustomField();

If you still have any query regarding this “How to” or would like to add some suggestions to this solution, let us know your feedback or query at [email protected], and don’t forget to share this “How to” blog with your fellow Magento 2 users!

Successful Launch of ParkSafe App

We at Envision Ecommerce are in News again. Yes, indeed we are! But, this time we are highly honored and privileged to announce that our new, innovative parking app, i.e. ParkSafe has been officially launched by SSP Sh. Kuldip Singh (IPS), DSP Sh. Amroz Singh and SP Sh. Harbir Singh Atwal, Punjab Police at PCA Cricket Stadium, SAS Nagar, Mohali. Today, we held a press conference at PCA Stadium, aiming to aware vehicle owners and other citizens that they can now easily get out of congested parking space or other parking hazards along with the up-to-the-minute traffic flow information by using a ParkSafe mobile app.

parksafe logo screen

SSP Sh. Kuldip Singh (IPS) said that the app is exactly the type of asset that comes in handy. As, it supports the individuals to detect and connect with vehicle owner who has wrongly parked his/her vehicle nearby your vehicle and blocked your driveway via QR code/ ParkSafe Tag/ or Vehicle number.

scan-to-download

The real beauty of the app is that all your public and private parking issues will be sorted out in real time, which often used to snowball into major, minor scuffles.

We at Envision Ecommerce, providing the app free to public in the Tricity. It can be downloaded through iTunes and Google Play by searching for ParkSafe.

 

For more info, click here http://chandigarhmetro.com/parksafe-app-for-wrong-parking-problems-chandigarh-mohali/.

CSR initiatives undertaken by Envision Ecommerce

How to check If Customer is Logged In or Not Magento 2?

Method 1. To check the customer is logged or not on any page of the website:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$customerSession = $objectManager->get('Magento\Customer\Model\Session');

if($customerSession->isLoggedIn()) {

   // customer login action

}

Method 2.  To check if customer is logged from controller:

$this->_objectManager->get('Magento\Customer\Model\Session');

if($customerSession->isLoggedIn()) {

   // customer login action

}

If you still have any query regarding this “How to” or would like to add some suggestions to this solution, let us know your feedback or query at [email protected], and don’t forget to share this “How to” blog with your fellow Magento 2 users!