We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    How to change product price with plugin in Magento 2?

    Product price is a dynamic thing. It keeps changing time-by-time.

    That’s why we came up today to talk about “product & pricing” subject.

    If you want to change product pricing with plugin, then this article is for you.

    Well, to do the same you have to add below code in di.xml

    <config>
      <type name="MagentoCatalogModelProduct">
        <plugin name="change_product" type=" MagemonkeysPricechangePluginProduct " sortOrder="2" disabled="true"/>
      </type>
    </config>

    After doing same, go to MagemonkeysPricechangePlugin to add new class Product.php.
    There you need to add code which we going to write below. Below code will work when the original method getPrice() complete. You can always put your logic into it.

    <?php
     
    namespace MagemonkeysPricechangePlugin;
     
    class Product
    {
        public function afterGetPrice(MagentoCatalogModelProduct $subject, $result)
        {
            return $result + 100;
        }
    }
    ?>

    Last but not the least, do flush cache before you check.

     

    How to set Customer’s Firstname and Lastname minimum characters validation in Magento 2?

    In Magento 2, Firstname and Lastname are consider as customer entities.

    Customer’s Firstname and Lastname attributes have been added during Magento 2 installation.

    Firstname and Lastname attributes are mostly used in the registration page and customer form.

    Today, we are going to discuss, how to set minimum characters limit in Firstname and Lastname.

    We are going to set minimum 2 characters limit in Firstname and Lastname.

    For that, We need to change validate_rules column in customer_eav_attribute table for Firstname and Lastname attributes.

    By default Firstname and Lastname attributes contain validate_rules value as {“max_text_length”:255,”min_text_length”:1}

    We need to change that validate_rules column value to {“max_text_length”:255,”min_text_length”:2} for set minimum 2 characters.

    Let’s see server side and client side validations:

    1. Server side validation (After Form Submit)

    You can create extension to get this functionality.
    Extenson Name : Magemonkey_ValidateCustomerName

    Create registration.php file in app/code/Magemonkey/ValidateCustomerName/ and add below code.

    <?php
    
    MagentoFrameworkComponentComponentRegistrar::register(
    MagentoFrameworkComponentComponentRegistrar::MODULE,
    'Magemonkey_ValidateCustomerName',
    __DIR__
    );

    Create module.xml in app/code/Magemonkey/ValidateCustomerName/etc/ and add below code.

    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
        <module name="Magemonkey_ValidateCustomerName" setup_version="1.0.0">
            <sequence>
                <module name="Magento_Customer" />
            </sequence>
        </module>
    </config>

    Create UpgradeData.php file in app/code/Magemonkey/ValidateCustomerName/Setup/ and add below code.

    <?php
    
    namespace MagemonkeyValidateCustomerNameSetup;
    
    use MagentoEavSetupEavSetup;
    use MagentoFrameworkSetupModuleContextInterface;
    use MagentoFrameworkSetupModuleDataSetupInterface;
    use MagentoFrameworkSetupUpgradeDataInterface;
    
    class UpgradeData implements UpgradeDataInterface
    {
        /**
         * @param EavSetup $eavSetupFactory
         */
        public function __construct(
            MagentoCustomerSetupCustomerSetupFactory $customerSetupFactory
        ) {
            $this->customerSetupFactory = $customerSetupFactory;
        }
    
        /**
         * Upgrades customer_eav_attribute table for validate_rules to set limit on character for first and lastname
         *
         * @param ModuleDataSetupInterface $setup
         * @param ModuleContextInterface $context
         * @return void
         */
        public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
        {
            $setup->startSetup();
            /** @var CustomerSetup $customerSetup */
            $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
    
            $entityAttributes = [
                'customer_address' => [
                    'firstname' => [
                        'validate_rules' => '{"max_text_length":255,"min_text_length":2}'
                    ],
                    'lastname' => [
                        'validate_rules' => '{"max_text_length":255,"min_text_length":2}'
                    ],
                ],
                'customer' => [
                    'firstname' => [
                        'validate_rules' => '{"max_text_length":255,"min_text_length":2}'
                    ],
                    'lastname' => [
                        'validate_rules' => '{"max_text_length":255,"min_text_length":2}'
                    ],
                ],
            ];
            $this->upgradeAttributes($entityAttributes, $customerSetup);
            $setup->endSetup();
        }
    
        protected function upgradeAttributes(array $entityAttributes, MagentoCustomerSetupCustomerSetup $customerSetup)
        {
            foreach ($entityAttributes as $entityType => $attributes) {
                foreach ($attributes as $attributeCode => $attributeData) {
                    $attribute = $customerSetup->getEavConfig()->getAttribute($entityType, $attributeCode);
                    foreach ($attributeData as $key => $value) {
                        $attribute->setData($key, $value);
                    }
                    $attribute->save();
                }
            }
        }
    }

    Above script will change validate_rules in customer_eav_attribute table to apply validation for server side.

    2. Client Side Validation (Before Form Submit)

    Override /vendor/magento/module-customer/view/frontend/templates/widget/name.phtml file to add client side validations.

    Add minimum-length-2 validate-length class in Firstname and Lastname input elements.

    So Firstname and Lastname inputes look like below in name.phtml file,

    Firstname input :

    <input type="text" id="<?= $block->escapeHtmlAttr($block->getFieldId('firstname')) ?>"
                           name="<?= $block->escapeHtmlAttr($block->getFieldName('firstname')) ?>"
                           value="<?= $block->escapeHtmlAttr($block->getObject()->getFirstname()) ?>"
                           title="<?= $block->escapeHtmlAttr($block->getStoreLabel('firstname')) ?>"
                           class="minimum-length-2 validate-length input-text <?= $block->escapeHtmlAttr($block->getAttributeValidationClass('firstname')) ?>" <?php if ($block->getAttributeValidationClass('firstname') == 'required-entry') echo ' data-validate="{required:true}"' ?>>

    Lastname input :

    <input type="text" id="<?= $block->escapeHtmlAttr($block->getFieldId('lastname')) ?>"
                           name="<?= $block->escapeHtmlAttr($block->getFieldName('lastname')) ?>"
                           value="<?= $block->escapeHtmlAttr($block->getObject()->getLastname()) ?>"
                           title="<?= $block->escapeHtmlAttr($block->getStoreLabel('lastname')) ?>"
                           class="minimum-length-2 validate-length input-text <?= $block->escapeHtmlAttr($block->getAttributeValidationClass('lastname')) ?>" <?php if ($block->getAttributeValidationClass('lastname') == 'required-entry') echo ' data-validate="{required:true}"' ?>>
    

     

    Magento 2: How to add country and region dropdown in admin form?

    If you want to add country and region inside the drop-down in custom module admin form, you landed to right page.

     

    Follow below instruction step-by-step to execute it.

    Step 1 : Add column in table field.

    Create new file : Setup/Installschema.php

    <?php
    
    ->addColumn(
    'country',
    MagentoFrameworkDBDdlTable::TYPE_TEXT,
    '2M',
    ['nullable' => false],
    'country' 
    )->addColumn(
    'store_ids',
    MagentoFrameworkDBDdlTable::TYPE_TEXT,
    '255',
    ['nullable' => false,
    'default' => $defaultstoreid,
    ],
    'store_ids' 
    )->addColumn(
    'statename',
    MagentoFrameworkDBDdlTable::TYPE_TEXT,
    '2M',
    ['nullable' => false],
    'statename'
    )
    
    ?>

    Step 2 : Add country and state drop-down with text

    Create new file : Block/Adminhtml/Grid/Edit/Form.php

    <?php
    $optionsc=$this->_countryFactory->toOptionArray();
    $country = $fieldset->addField(
    'country',
    'select',
    [
    'name' => 'country',
    'label' => __('Country'),
    'title' => __('country'),
    'values' => $optionsc,
    ]
    );
    
    $statename = $fieldset->addField(
    'state',
    'select',
    [
    'name' => 'state',
    'label' => __('State'),
    'id' => 'state',
    'title' => __('state'),
    'class' => 'required-entry',
    'required' => false,
    'values' => ['--Please Select State--'],
    ]
    );
    $fieldset->addField(
    'statename',
    'text',
    [
    'name' => 'statename',
    'label' => __('State'),
    'id' => 'statename',
    'title' => __('state'),
    'class' => 'statename',
    'required' => false,
    ]
    );
    
    /*
    * Add Ajax to the Country select box html output
    */
    $country->setAfterElementHtml(" 
    <script type="text/javascript">
    require([
    'jquery',
    'mage/template',
    'jquery/ui',
    'mage/translate'
    ],
    function($, mageTemplate) {
    jQuery('.field-statename').hide();
    
    jQuery('#addressbook_country').change(function(){
    var conceptName = jQuery('#addressbook_country').find(':selected').val();
    jQuery.ajax({
    url : '". $this->getUrl('grid/lists/regionlist') . "?country=' + conceptName,
    data: conceptName,
    type: 'GET',
    dataType: 'json',
    showLoader:true,
    success: function(data){
    // console.log(data.htmlconent);
    if(data.htmlconent==''){
    jQuery('.field-statename').show();
    jQuery('.field-state').hide();
    }else{
    jQuery('#addressbook_state').empty().append(data.htmlconent);
    jQuery('.field-state').show();
    jQuery('.field-statename').hide();
    
    }
    
    }
    }); 
    });
    
    }
    
    );
    </script>"
    );
    
    $statename->setAfterElementHtml(" 
    <script type="text/javascript">
    require([
    'jquery',
    'mage/template',
    'jquery/ui',
    'mage/translate'
    ],
    function($, mageTemplate) {
    jQuery('.field-statename').hide();
    jQuery(window).load(function(){
    setTimeout(function(){
    var statename ='".$model->getState()."';
    jQuery('#addressbook_state option').each(function (a, b) {
    if (jQuery(this).text().toLowerCase() == statename.toLowerCase() ){
    jQuery(this).attr('selected','selected');
    jQuery(this).trigger('change');
    
    }
    });
    }, 1000);
    });
    
    
    
    var conceptName = jQuery('#addressbook_country').find(':selected').val();
    if(conceptName != ''){
    jQuery('#addressbook_country').trigger('change');
    }
    }
    
    );
    </script>"
    );
    
    ?>

    Step 3 : Getting region list from controller.

    Create new file : Controller/Adminhtml/Lists/Regionlist.php

    /**
    * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
    */
    class Regionlist extends MagentoFrameworkAppActionAction
    {
    /**
    * @var MagentoFrameworkViewResultPageFactory
    */
    protected $resultPageFactory;
    /**
    * @var MagentoDirectoryModelCountryFactory
    */
    protected $_countryFactory;
    
    /**
    * @param MagentoFrameworkAppActionContext $context
    * @param MagentoFrameworkViewResultPageFactory resultPageFactory
    */
    public function __construct(
    MagentoFrameworkAppActionContext $context,
    MagentoDirectoryModelCountryFactory $countryFactory,
    MagentoFrameworkViewResultPageFactory $resultPageFactory
    )
    {
    $this->_countryFactory = $countryFactory;
    $this->resultPageFactory = $resultPageFactory;
    parent::__construct($context);
    }
    /**
    * Default customer account page
    *
    * @return void
    */
    public function execute()
    {
    $countrycode = $this->getRequest()->getParam('country');
    
    if ($countrycode != '') {
    $statearray =$this->_countryFactory->create()->setId($countrycode)->getLoadedRegionCollection()->toOptionArray();
    $state = '';
    if(count($statearray) > 0){
    // $state .= "<option value=''>--Please Select State--</option>";
    foreach ($statearray as $_state) {
    if($_state['value']){
    $state .= "<option value=".$_state['label'].">" . $_state['label'] . "</option>";
    }
    }
    }
    }
    $result['htmlconent']=$state;
    $this->getResponse()->representJson(
    $this->_objectManager->get('MagentoFrameworkJsonHelperData')->jsonEncode($result)
    );
    } 
    
    }
    
    ?>

    Step 4 : Save your data.

    Create new file : Controller/Adminhtml/Grid/Save.php

    <?php
    
    class Save extends MagentoBackendAppAction
    {
    /**
    * @var NamespaceModulenameModelGridFactory
    */
    var $gridFactory;
    
    /**
    * @param MagentoBackendAppActionContext $context
    * @param NamespaceModulenameModelGridFactory $gridFactory
    */
    public function __construct(
    MagentoBackendAppActionContext $context,
    NamespaceModulenameModelGridFactory $gridFactory,
    MagentoDirectoryModelCountryFactory $countryFactory
    ) {
    parent::__construct($context);
    $this->gridFactory = $gridFactory;
    $this->_countryFactory = $countryFactory;
    }
    
    /**
    * @SuppressWarnings(PHPMD.CyclomaticComplexity)
    * @SuppressWarnings(PHPMD.NPathComplexity)
    */
    public function execute()
    {
    $data = $this->getRequest()->getPostValue();
    if (!$data) {
    $this->_redirect('grid/grid/addrow');
    return;
    }
    try {
    
    $countrycode = $data['country'];
    $statearray =$this->_countryFactory->create()->setId($countrycode)->getLoadedRegionCollection()->toOptionArray();
    $rowData = $this->gridFactory->create(); 
    if($data['state'] == '0' || count($statearray) == 0){
    
    $data['state'] = $data['statename'];
    }
    $data['store_ids'] = implode(',', $data['store_ids']); 
    $rowData->setData($data);
    if (isset($data['id'])) {
    $rowData->setEntityId($data['id']);
    }
    $rowData->save();
    $this->messageManager->addSuccess(__('AddressBook has been successfully saved.'));
    } catch (Exception $e) {
    $this->messageManager->addError(__($e->getMessage()));
    }
    $this->_redirect('grid/grid/index');
    }
    
    /**
    * @return bool
    */
    protected function _isAllowed()
    {
    return $this->_authorization->isAllowed('Namespace_Modulename::save');
    }
    }
    ?>

    Well, that’s it. Try to adopt this solution and let us know how it worked for you.

    Everything you want to know about Magento 2 Multi Source Inventory

    Multi-Source Inventory is a Magento 2’s core which has started from Magento 2.3 version. It lets you define the closest shipping warehouse to the customer; estimate the stock remains and also send “low stock” notifications beforehand. Your Magento will let you know beforehand if your warehouses go empty after the big sale. You can update or improve your version whenever you want. With Magento MSI you don’t need a page builder module or any other feature to add. You don’t have to maintain the code which you don’t use.

    Magento MSI allows merchants to allocate products to every fulfillment source like physical stores, warehouse, etc. and they can also customize the default MSI implementation and integrate it with required third-party systems. No matter where your customer and warehouse location is and the type of product or sales channel the current version allows you to manage inventory. With the help of MSI, merchants can create marketing strategies.

    Now let’s see the main functionality of Magento MSI

    Manage Sources

    The very first place you go to leverage MSI functionality in Magento 2 admin panel is Manage Sources. Magento’s core team has given a new term called “source” which basically checks the physical stock where goods are stored and shipped from. It will allow you to create sources manually for every physical location of the products you want for example (England or Scotland in the UK)

    Soon after, you can set off a number of available products for each source in the product configuration menu.

    If you want to add or edit the sources simply log in to the backend and go to

    Stores ⟶ Inventory ⟶ Sources.

    If the merchant has several locations, it is necessary to Add New Source to enter the Multi-Source mode

    Manage Stocks

    Manage stocks has two main features one is multiple source grouping and the other is channel assigning to each group. Only a few Magento websites understand the term “channel”. For example, all your stocks are in one country, state, or region and you want to add a new warehouse in Germany to create a “warehouse GY” stock and assign it an “EU” channel.

    To manage stock you have to go to Stores ⟶ Inventory ⟶ Stocks.

    Here comes the Magento 2 source selection algorithm which is developed to help select which physical location is nearest to the customer and then provides a shipping location. Using a source selection algorithm it will assign location like if you assign a “warehouse GY” stock to a “US source by mistake then it will not choose these product quantity deductions for a customer from Germany as it will not be near to the location.

    Manage Catalog Product Inventory

    It has the same logic as in stocks. You need to assign sources for every product and then also allocated the quantity available to the product. You need to enable the “Notify Quantity” option so that you will get a notification of “stock running low on this product” which will help in managing your inventory. By default it takes 1 as the “Notify quantity” but you can customize as per your requirement.

    Saleable Quantity

    Magento MSI flows are steps that are very systematic like after you create sources and allocate stocks, then the quantity of the product is determined for each source, and then each stock is linked to a particular Magento website. When all this is done then the MSI module evaluates all the products to provide the saleable quantity per stock.

    When a customer places an order then the MSI module deducts the quantity of the product from the saleable quantity and it prompts a notification and action chain based on configuration. In case the in-stock product quantity is 0, it shows “out of stock” as the status. Similarly, if a customer wants to add more products to their cart than the available stock then they will be notified about the limited stock. Overall, it enhances performance by offloading the system.

    Order Management

    What about managing order and how does it work?

    Well, after the order is placed then the quantity of the ordered products is reserved until the order is completed. Shipping is provided only after the payment gateway and then the purchased quantity will be subtracted from the existing source quantity. Magento 2.3.0 provides only one source selection algorithm which is completely based on the source priority that is decided manually. Yet, the configuration for the approaching distance priority algorithm is already mentioned in the Magento user guide.

    Conclusion

    Magento MSI can connect different sources to the store and by using the algorithm of selection that chooses a source that depends on various conditions. In case any issues arise in the default functionality then the Magento community always finds the solution. The architecture of Magento 2 has been improved with the implementation of MSI.

    That’s all about Magento MSI. Drop us a line to help you with the Magento 2.3 Multi-source implementation.

    WHAT ARE THE PROS, CONS & RISKS OF MIGRATING TO MAGENTO 2?

    We all know, support for Magento 1.x will soon come to an end. Though it has been pushed off to June 2019 so sooner or later thousands of business owners have to migrate to Magento 2. But migrating to the latest version will not be that easy it has its own security threats and risks.
    Today, in this article we will put some light on within and around Migration and also whether or not you should consider doing it.

    Who All Are Likely to Suffer Due to End of M1?

    Today more than 420,000 websites run on Magento and only 4% out of these (less than 20,000) are on Magento 2 so it means approx. 95% of the business owner has to make up their mind whether to opt for Magento migration services or not. The entire migration takes at least 3 to 6 months hence Magento will provide support for Magento 1 for some more months to come.

    Should You Consider Upgrading to Magento 2?

    Magento 1 comes with a limited number of functionalities and on the other hand, Magneto 2 has better enhancements such as:

    • New B2C and B2B features
    • Better security rendered through different payment gateways
    • Higher responsiveness to devices
    • 50% faster loading time
    • User-friendly and intuitive admin panel
    • Easy extension updates
    • Enhanced flexibility for personalized features

    Although Magento 2 has its own benefits but to move your entire store to a new platform is difficult. Let’s take a look at some of the drawbacks you might face.

    Invest in Migration

    Migrating your store from Magento 1 to Magento 2 will demand you to get in touch with an eCommerce web development company. Experts will help you make necessary changes and required adjustments.

    New Themes

    Magento 1 themes are not portable with Magento 2, therefore, you need to build new themes from scratch.

    Mismatch Extension

    You cannot integrate Magento 1 extensions with Magento 2.

    What will happen if I don’t migrate to Magento 2?

    Well, if you don’t migrate to the latest version then be ready to face the consequences.
    When the support for Magento 1 will come to an end; then the websites which are running on Magento 1 might become vulnerable to spam attacks, server attacks, and also leaking of payments information.

    Your Website performance will get affected which will harm your site traffic ultimately resulting in low sales. So what we conclude is sooner or later you have to migrate your store.

    Steps to keep in mind before you approach a company for Magento Migration service:

      • Consider Time

    Migrating from Magento 1 to Magento 2 will take time so you have to set aside other tasks until the migration gets completed.

      • Be Ready with your Have Migration Plan

    Check all the themes and extensions on your current version. Pen down everything you want to see on your upgraded site. Think about all the changes and what all you need and the ones you want to get rid of.

      • Consider Features & Functionalities

    You should have a checklist mentioning all the new features you want to have and also old features you want to fix.

      • Installation of Magento 2 Hardware System

    Set up a Magento 2 hardware system that is compatible with your current system. For this, you can use the Data Migration tool.

      • Testing is must

    Once everything is up and working then it time to run and test the website thoroughly before you go live.

    Thoughts Before Migrating…

    You might be thinking about the right time for migration. Well, it totally depends on the kind of considerations you want to make and even other merchants wouldn’t be able to help you.

    For example:

    If your current Magento store has a number of issues and needs support then you should go for migrating at the earliest. Or if it’s working fine without any glitches then it would be better to wait until Magento 2 receives further updates. Nevertheless, you can start planning for migration. Make a note of general considerations such as features, business objective, and time required as all this will make your migration smooth and easy.

    What to do?

    You need to contact an eCommerce web development company and have a meeting with them and also with marketing teams. Discuss your migration plan in detail; let them know all your requirements first. You also need to consider aspects like business disruption, downtime, and sales loss while the migration is in process.

    We Make Magento Migrations Seamless…

    The Professionals at Magemonkeys understand that migrations can be perplexing. If you want to migrate to Magento 2 then sit back and relax as we would make your Magento migrations as smooth as silk. All you have to do is to contact us with your wish list and we will make sure that the rest is taken care of.

    How to add custom category attribute in Magento?

    Hello folks,

    If you want to add custom category attribute to Magento then you are at right place.

    Today, I am going to show you how to create a custom attribute.

    To create a custom attribute the first step is to create a module.

    Step 1: Create a file app/code/local/Magemonkeys/Customattribute/etc/config.xml and paste the below code in that file.

    <?xml version="1.0"?>
    <config>
      <modules>
        <Magemonkeys_Customattribute>
          <version>0.0.1</version>
        </Magemonkeys_Customattribute>
      </modules>
        <global>
          <resources>
              <customattribute_setup>
                <setup>
                  <module>Magemonkeys_Customattribute</module>
                  <class>Mage_Eav_Model_Entity_Setup</class>
                </setup>
                <connection>
                  <use>default_setup</use>
                </connection>
              </customattribute_setup>
          </resources>
        </global>
    </config>

    Step 2: Create a file app/etc/modules/Magemonkeys_Customattribute.xml and paste the below code in the file

    <?xml version="1.0"?>
    <config>
      <modules>
        <Magemonkeys_Customattribute>
          <active>true</active>
          <codePool>local</codePool>
        </Magemonkeys_Customattribute>
      </modules>
    </config>

    Step 3: Create a file app/code/local/Magemonkeys/Customattribute/sql/customattribute_setup/mysql4-install-0.0.1.php and paste the below code in it.

    <?php
    $installer = $this;
    $installer->startSetup();
    $attribute  = array(
        'type' => 'text',
        'label'=> 'Another Descrtiption',
        'input' => 'textarea',
        'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible' => true,
        'required' => false,
        'user_defined' => true,
        'default' => "",
        'group' => "General Information"
    );
    $installer->addAttribute('catalog_category', 'another_description', $attribute);
    $installer->endSetup();
    ?>

    After this you have to clear the cache and go to Catalog -> Manage Categories, you will see your new attribute in the “General Information” tab.

    Let us know by making a comment if this article helped you in your Magento development journey.

    Is Headless Magento the Future of Ecommerce?

    Since a year community is talking about headless Magento. But, many of newcomers are not aware of this term and why it is needed? So let’s understand what Headless Magento is all about.

    What do we mean by Headless Magento?

    When your original Magento application is running but it does not give any output to the browser instead a static webpage will fetch the content it needs through JavaScript AJAX calls from the Magento API and for this you only need is a vanilla HTML page, some JaveScript tools and remote calls to the Magneto API.

    In simple words With Headless Magento, you can separate your web frontend from your eCommerce system. You are no longer bound to the usual Homepage then onto category page then product page, basket and checkout. With this, you provide a true experience to your customer that is custom to how you run your business.

    Why Headless Magento?

    A headless Magento would make swapping of the framework (Angular, Vue – whichever you pick) easier as JaveScript would be coupled to the Magento backend. Magento offers a flexible framework where you can create your own logic like logins, pricing and checkout. Though this comes with additional stuff which you don’t need but creating your own pricing rules will make things easier than trying to extend an modify the Magento pricing rule system. It does require a lot of time and effort but in favour of code will simply work the way you want it to work.

    Magento 2 is already headless, isn’t it?

    When we say “Headless” it means using the same JS framework to data a static HTML document. You can state that Magento 2 is already headless on major portion but a JavaScript developer needs to know more about KnockoutJS ViewModels so that he can make use of Magento logic then only he can add backend logic to JavaScript layer. Magento is not completely headless because the HTML document not only has the templating part but also static content which changes less.

    If you have worked a lot of Angular then you will prefer Angular than KnockoutJS. But on the other hand, developers prefer Knockout over Angular as with Knockout you can build whatever stuff you want to build while with Angular some restrictions do come along.

    What are the Benefits of Headless Magento?

    Modular System: Maintenance and updating have become easier as there is multiple application for different functionalities of frontend and backend.

    Performance: You can make use of most preferred technology for the different micro application. Thus, this will enhance your site performance.

    Flexibility: Developers do not have to worry about updating the complete application as the frontend and backend systems are separate so that gives them the flexibility to update a particular application.

    Productivity: Productivity increases as different teams can work at the same on different applications. Hence they do not have to wait for one another to finish the work.

    Magemonkeys and Headless Magento

    Headless Magento can make your store different as it’s all about separating the functions of the application to provide better customer experience. We understand your requirements and help you deliver a unique and exceptional experience to your customer by utilizing decoupled platforms.

    Headless Magento is well suited for enterprise who have CMS website and you are willing to add B2B or B2C storefront. It works best for websites having a high amount of images or video and need constant updates.

    Want to know the 7 Easy Steps to a Winning Magento-2 Specific strategy?

    Magento 2 is not just an upgrade but a completely new platform. Before you migrate to a new version you need a full-scale re-platforming exercise. It requires detailed planning and efficient execution else it can harm the functionality of the site.

    In this article, we will tell 7 easy steps to keep in mind for Magento 2 strategy.

    1. Record Stock of what you have:

    the very first step towards the transition to a better version of the Magento is to check your current installation. It means it should have the functional definition of all the operations and identify the areas where Magento can be improved to meet the business’s needs and add functionality to it. You will also need to identify any new business requirements that will be influenced by the transition to Magento 2. It also is a good opportunity to restructure your product catalog setup. Remove the things you don’t need and add new attributes for merchandising and even use them to support more specific products.

    2. Make a project team

    In any transitional or development project, it is important to obtain a commitment from all major stakeholders, from the management who will be assigning and approving the budgets all the way to the operations staff who will have to work on the new interface and be able to use it in order for the change to work. Depending on the size and expertise needed for the project, you might even need an expert or a solutions architect on your side to manage the project. When a project team is created, the staff will feel more involved and will be committed to the venture being a success.

    3. Inspect every third-party extension installed

    The next step should be identifying all third-party extensions or custom nodules that might be installed in your existing Magento store. If you do not have any internal records that are up to date, you can get an idea of the extensions you are using by going to system>config>admin>advanced>disable module in the administration. Programming experts have said that in Magento 2’s core there is not much possibility for improvement in the core code. But the extensions that you use can slow down the site. In order to find the troubling extensions, you will need to perform a 3rd party extension audit.

    Turn every module on and off and check the changes in the site’s speed. This could help you in finding the defaulters. Once you have removed the defaulters and know which ones you will keep, you will have to check their compatibility with Magento 2 as all extensions do now work in the newer version. You might have to bear extra licensing costs in order to make them work in the new interface. Magento 2 is a new platform, you cannot ‘upgrade’ your existing Magento store to it automatically.

    4. Start using the system early

    Magento 2’s technical architecture is very different from Magento 1 and it will take time for all relevant members to get a hold of and completely understand the new Magento Framework. That is why it will be best to start working on the new processes early. This will help in reducing overhead costs once it’s launched.

    5. Choose the fastest host possible

    You can’t go cheap on hosting. Your hosting plan will play a significant role in the website’s performance. Choose either Servebolt Magento 2 plan or if that is not possible buy as much as RAM, CPU, and SSD you can afford on other hosts.

    6. Do not use JS bundling

    JS bundling is a special feature of Magento 2 and its main purpose is to cut down the number of HTTP requests to load a page. It meant to enhance performance, but it does not. It creates a huge 5-10MB file with JavaScript code that negatively impacts the loading time of the page.

    7. Production mode should be on

    Magento 2 consists of three modes of operation. The first one is Default, the second one is Developer and the third one is Production. The fastest one among them is Production. Default and developer are basically used for debugging purposes and will not be able to work on a live site. Uses SSH from your host provider to find the more you are working in now.

    Final Thoughts:

    Having said all of the above, the adoption and deployment of a new platform would require the help of experts and professionals. Building a proper process would help simplify the execution process.
    Get in touch with us to know whether there is a need to migrate your online store from Magento 1 platform to Magento 2?

    HOW TO FIX MOST COMMON ISSUES IN MAGENTO 2?

    Magento 2 is the most powerful eCommerce platform for building your online store. It takes months to set up and prepare with the help of someone who specializes in Magento or eCommerce.

    Though, there are number of problems that everyone faces while working with an eCommerce platform, sometime these problems are complex. It does not mean that if you have not worked with big system like Magento 2 then you cannot solve your issues without an expert.

    1) Installing FTP is Bad

    Do not opt for File Transfer Protocol (FTP) as there is no encryption to make it secure.

    2) Resetting the Magento 2 Admin Password

    Another common problem is forgetting an admin password. You can fix this problem by simply resetting your admin password by using phpMy Admin. Use the below step to reset your password:

    Open Magento 2 database  go to admin_user  Change current password to new Password  Save

    3) Don’t Forget to Create a Contact Page

    It’s really important to have a contact page because this how your customers can reach you anytime they want to. It happens that one can face issue while setting up or customizing their pages so contact page is must.

    4) Choose your Backend Language

    Your backend language plays an important part as it determines the functionality of your backend systems. You need to create the database where you store all your website information and for that you can use backend languages such as Python, PHP and Java.

    5) Compatibility of Magento Versions

    Before you decide an extension for your Magento version, you need to know its compatibility with it. Magento 1 and Magento 2 has separate set of extensions and both the versions are updated frequently.

    6) Clear Cache Memory

    We all want a speedy website and sometimes Magento 2 users come across a situation when they want to perform an update but the front-end pages do not show any update. This is because of the cache to make a point to clear your cache to make the website run faster.

    7) Indexing HTTP and https Versions of Your Website

    When you get the error “One or more indexes are fully invalid” then it means that both indexes are analyzed and the content is being flagged as duplicate content. So have index only for the preferred versions.

    8) Admin Sessions Issues

    Even when you are logged in to Magento 2, you may face an issue regarding session time out. The solution to this problem is to completely log out of Magento 2 and then waits for some time and again log back into the admin panel. This acts like a reset button for the current session.

    9) Magento 2 Running Slow

    Magento 2 is speedy by default but you find it running slow then there are ways to increase the speed like your server and system requirements should be updated and you use the most recent versions. To make your website run faster you need to enable cache, use optimized images and use free extensions.

    10) Enable Search Engine Friendly URLs

    SEO is one of the major components for your website to be seen by search engines.

    You need to enable SEO for URLs by using below steps.

    Go to your admin panel  click on configure click on the web (on the left side of the panel) on SEO tab press yes  save the settings.

    11) Setting Up a Blog in Magento 2

    Magento 2 does not come with the functionality of creating a blog. But, a well written and designed blog can attract more customers to your website. Integrate an extension for the blog so that you can create a blog for your site.

    12) Choosing Bad Extensions

    As an admin, you have to be fully aware of choosing right extensions for your Magento 2 website. A bad extension will increase your cost and can be a real headache as it will lead to configuration and compatibility issues.

    Wrapping up

    We have covered the most common problems as well as how to overcome those issues. If you want your site to run smoothly and speedily then our below tips can help you in avoiding these issues. We at Mage monkeys develop high-quality eCommerce development services to provide you with the best in the industry.

    WHY TO OPT FOR MAGENTO 2 IN 2019?

    Magento 2 provides a shopping cart solution for medium to large-scale business requirements. It offers an attractive design and a better user experience which makes it more disparate from the preceding version. Magento 2 is fully loaded with rich features and it also offers flexibility to the users to easily manage their content, layout, and functionality of the eCommerce store.

    Rich Features of Magento 2

    • It is search friendly and responsive
    • The admin navigation is cleaner and clutter-free.
    • It provides a split database solution.
    • Its three databases (product data, checkout, and order) protect your store from unwanted bugs.
    • More than one administrator can simultaneously work on any given product data as it has data safeguards for product data.
    • The menus are very well organized which makes finding a page much easier and simple.

    Merchants can choose any version from its three versions based on their business needs.

      • 1. MAGENTO ENTERPRISE EDITION

    Magento Enterprise Edition comes as a paid version. One can choose from the various feature sets depending on the requirement of the company.

      • 2. MAGENTO COMMUNITY EDITION

    Magento Community Edition is a fully open-source platform and it has the most active community of users.

      • 3. MAGENTO GO

    Magento go is a paid version and it is hosted on Magento’s servers.

    But, why you need Magento 2 for an eCommerce store?

    1. ENHANCED PERFORMANCE PARAMETERS

    Magento 2 diminishes the load on the server and increases user interaction. It is fast and you will see cart abandonment is also reduced. The main parameters on which Magento 2 has improved are

    PHP 7

    Upgraded Performance
    Better loading
    Optimized for PHP 7

    Ajax Cart

    Add items without reloading the entire page
    Less load on the hardware
    More responsive for the shoppers

    Cache

    HTTP accelerator easily cache the requests
    Edit product information without data conflicts
    More responsive for the shoppers

    Hosting Environment

    Use multiple servers
    Easy handling traffic spikes

    2. SMOOTH AND WELL-ORGANIZED CHECKOUT PROCESS

    As compared to Magento 1, Magento 2 is more flexible and improved in terms of check out. Magento 1 has six steps (checkout method, billing details, shipping information, payment information, and last order review) checkout process whereas Magento 2 has two different pages for its two-step checkout processes; shipping, review, and payment.

    The guest checkout does not have any login or registration thus it increases the process for the customer. Magento 2 provides a powerful shipping rate that is displayed as per your geographical location. Overall, it reduces friction and boosts the conversion rate.

    3. BETTER INDEXING AND TOOLKIT

    Magento 2 provides enhanced indexing to increase the query performance speed.

    The enhanced toolkit and improved widgets of Magento 2 help you set up your eCommerce store.

    • Effective backend operation
    • Web page optimization for faster delivery
    • Better response time for all website activities
    • Improved database flexibility to handle peak loads
    • Performance widgets that create test scripts for your store

    4. GREATLY SUITABLE

    Magento 2 lets you easily integrate and manage data. It also provides third-party extensions, and Web and cloud services. It is strongly compatible with PHP frameworks such as Zend and others. It works best with major databases like Oracle, MySQL, and Hadoop. Its default JavaScript library is jQuery library due to which it becomes easy for developers to work with Magento 2.

    CONCLUSION

    Being an open-source platform, it has rich templates, extensions, modules, and widgets to build a unique eCommerce store. It has many dynamic and powerful tools such as the Catalog Management tool and Marketing tool. It supports any device and also offers cross-browser support as well.

    So, these are some of the reasons why Magento 2 is going to stay in 2019 and make your online store stand different from the others. It provides a safe platform to build your business and boost your conversion rate. Though Migrating from Magento 1 to Magento 2 is requires detailed planning. One has to hire an eCommerce developer for easy and smooth migration.