:::: MENU ::::
Posts tagged with: magento

Magento introduction

Since this blog mainly focuses on Magento. Lets get you familiar with magento introduction in this tutorial. i.e introduction to magento.Lets discuss What is Magento? Magento is the most powerful online e-commerce platform and is changing the face of e-commerce forever. 🙂
Introduction:
Magento is a feature-rich, professional open source e-commerce web application that was launched on March 31, 2008. Magento offers merchants complete flexibility and control over the look, content and functionality of their online store. Magento’s intuitive administration interface contains content management, powerful marketing and merchandising tools to give merchants the ability to create sites that are fully fit their unique business needs, putting no constraints on business processes and flow.
Of course, you already know that. What you may not realize is Magento’s also an object-oriented PHP Framework that can be used to develop modern, dynamic web applications that tap into Magento’s powerful e-commerce features.
This is more of an introductory tutorial however I will try to briefly explain all the important features and aspects of magento.

Why to Use Magento?

  • Magento is an open source E-commerce software.
  • Magento is scalable and offers small organizations to build business.
  • Magento enables searching and sorting of products in several ways.
  • Magento easily integrates with many of the third-party sites which are needed to run effective E-commerce website.

Features

  • Magento provides different payment methods such as credit cards, PayPal, cheques, money order, Google checkouts, etc.
  • Magento enables shipping of products in one order to multiple addresses.
  • Magento helps to manage the orders easily by using the admin panel.
  • Magento provides order of product status and history of product. It also supports e-mail and RSS feeds.
  • Magento supports multiple languages, different currencies and tax rates.
  • Magento filters the products and displays in grid or list format.
  • Magento makes it easy to browse the products. It has features such as image zoom-in and checking of stock availability.
  • Magento has built-in SEO (Search Engine Optimization.

Advantages

  • Magento is user friendly E-commerce software.
  • Magento is compatible with smartphones, tablets and other mobile devices.
  • Magento provides multiple payment options, so every visitor can make payment based on their preferred payment gateway.
  • Magento has many extensions which support the development of an online store.

Disadvantages

  • Magento uses larger disk space and memory.
  • Magento takes longer time to build the customized functionality.
  • Magento is very slow compared to other E-commerce sites.
  • Magento needs proper hosting environment. If the hosting environment is improper, the user can face many problems.

Furthermore lets discuss step-by-step procedure for Magento installation. Before installing Magento, you require the following system requirements.

system requirements

    Database − MySQL 5.1 +
    Web Server −
    Apache 2.x
    Nginx 1.7.x
    Operating System − Cross-platform
    Browser Support − IE (Internet Explorer 7), Firefox, Google chrome
    SSL (Secure Socket Layer) − A valid security certificate is required for HTTPS
    PHP Compatibility − PHP 5.4+

Architecture

Likewise we are going to discuss the architectural style of Magento, for implementing user interfaces.

The Magento architecture comes with Models, Views and Controllers.
User Request − The user sends a request to a server in the form of request message where web browsers, search engines, etc. act like clients.
View − View represents the data in particular format. It is the user interface which is responsible for displaying the response for user request. It specifies an idea behind the presentation of the model’s data to the user. Views are used to reflect “how your data should look like”.
Controller − The controller is responsible for responding to user input and perform interactions on the data model objects. It uses models to process the data and send responses back to the view.
Model − The model is responsible for managing the data of the application. It contains logic of the data and represents basic data object in the framework. It responds to request from the view and to the instructions from the controller to update itself.
Database − Database contains the information which is requested from the user. When the user requests data, view sends requests to the controller, the controller requests from the model and the model fetches the required information from the database and responds to the user.
WSDL − WSDL stands for Web Services Description Language. It is used for describing web services and how to access them.

Now magento 2 is the core e-commercep latofrm for development. So, i am not discussing here the versions of magento(magento 1). Futhermore, in other tutorials i will discuss the latest versions.

That’s it from this tutorial. I hope it serves the purpose.Furthermore please feel free to drop any suggestions or queries in comments section. That will definitely be highly appreciated.

Author: Qaisar Satti
Category: Magento
Last Modified: January 1, 2019


Magento free payment extensions

This article is about Magento free payment extensions . Many people often look for payment methods of magento and find it difficult to find a suitable extension.In this tutorial i will try to list available free magento payment extensions.This tutorial just have information of free extensions that are available on magento marketplace or any other extension provider.I will try to list few here with brief descriptions as well.

Below are the free magento payment method extensions.

Magento payment extensions

Magento provides its own payment methods.But here we will discuss free magento shipping extensions.Because these are available for free so anyone can use them.First,lets have a look at the default magento payment methods.

Default magento payment methods:

  • Saved CC
  • Check / Money Order
  • Zero Subtotal Checkout
  • Bank Transfer Payment
  • Cash On Delivery Payment
  • Purchase Order
  • Authorize.net Direct Post
  • Authorize.net

Above are the default payment methods provided by magento.You can use them by going to configuration settings and then modifying payment methods.

Now lets have a look at the free available payment extensions.

Bank Payment

Bank payment is a popular payment method in E-Commerce throughout the globe. This extension provides full control of the payment process to the customer and avoids the transmission of sensitive payment data during or after the payment process.It allows you to define additional rules and displays options within the payment configuration settings.

Key Features

  • Multiple bank accounts (SEPA ready)
  • Ability to show/hide bank accounts in PDF-printouts
  • Ability to show/hide a custom text in PDF-printouts
  • Show a link to a CMS page instead of displaying the bank accounts
  • Set a “pay within X days” value
  • Allow partial capturing
  • Language packages included: EN, DE, DK, ES, FR, GR, IT, JP, NO, NL, PL, BR, TR

Extension Link

Cash On Delivery

COD or Cash on delivery implies ordered goods being paid for when handed over to the customer in person.Naturally, this payment method is safe and convenient for those who tend to be skeptical of electronic payment methods, especially when ordering online.

Key features

  • Apply a fee for using cash on delivery as a payment method
  • Fees can be fixed or a percentage based on the shopping cart’s subtotal
  • Fees as a percentage of the subtotal may require a configurable minimum fee
  • Differ fees between national and international orders
  • Restrict payment method to certain countries
  • Flexibly link cash on delivery to your shipping methods

Extension Link

Payment Extra Charge

Most payment services charge an additional fee for processing payments. Since this fee is different for every payment method, it is difficult to include it in the product price.Using Payment extra charge you can add payment fees for such payment methods, you won’t have to make such calculations — the fee will be added automatically.

Key features

  • Different fees for every payment method
  • Different methods for fee calculation
  • Fee rounding
  • Separate row with fee amount in Total blocks
  • Different percentage fees for different countries
  • Editable fee description
  • Maximum compatibility with 3rd party payment extensions

Extension Link

paydirekt

paydirekt is the online payment procedure of your private and savings banks. paydirekt makes Internet payments secure, simple and direct. This makes it a real alternative to the usual online payment methods and offers merchants many advantages.

Key features

  • Secure: Maximum data security and optimum protection against payment defaults
  • Simple: easy operation, integration and simple process
  • Direct: increasing business and better customer relationship

Extension Link

Pay Bright

PayBright provides friendly, transparent financing to consumers at the point-of-sale, both online and in-store. Our instant payment plans are offered by over 2,700 merchants,including leading domestic and international e-commerce retailers.

Key features

  • e-commerce installment payment solution
  • Full integration with Magento 1.x
  • Instant approval and rapid process: within seconds, PayBright verifies the customer’s identity and payment information, and grants instant credit
  • Next-day payment to merchants with no customer credit risk
  • Sales increase of up to 30%
  • Net Promoter Score of 72 among merchants and A+ rating with the Better Business Bureau
  • Virtual credit accounts can be used for multiple transactions, helping drive repeat purchases
  • Both merchants and customers receive access to their own online portals to monitor loan activity
  • No retroactive or compounding interest, hidden charges, or prepayment penalties

Extension Link

Spryng Payments

Spryng Payments includes the most comprehensive list of (dynamic) payment methods, pro-active fraud protection, one-click payment experiences, dynamic check-outs per customer, insights in cost components per transaction, as well as many other features.

Key features

  • Spryng Payments employs the most competitive and sharpest rates per transaction
  • We help merchants increasing conversion on all payment methods
  • Merchants have immediate access to their money
  • Our team has many years of experience in the payments industry
  • Spryng Payments originated from the wishes and needs of merchants
  • We have a global focus
  • We have developed plug-ins for the most important e-commerce platforms
  • Easy to connect

Extension Link

Similarly there are many other extensions available. I tried to list a few. I hope this tutorial help you in any way.

Please feel free to drop any suggestions or queries in comments section. It will be highly appreciated.

Author: Qaisar Satti
Category: Magento 1
Last Modified: November 9, 2018


Magento shipping extensions

Today we will discuss about Free magento shipping extensions.In this tutorial we will discuss available free magento shipping extensions.This tutorial just have information of free extensions that are available on magento marketplace or any other extension provider.I have tried to list a few.So let’s start with our list.

Free magento Shipping extensions

Magento provides its own shipping methods.Yet here we will discuss free magento shipping extensions.Because these are available for free so anyone can use them.Lets have a look.

ShipperHQ

ShipperHQ provides you the options to fully control and customize your shipping rates like never before. You define the carriers to use, the shipping methods that apply, and the unique rules of your own rate structure.

Key features:

  • Multi Carrier Support
  • Fully Customizable Rate Management
  • Dimensional Shipping
  • Multi-Origin Shipping
  • Date & Time

Extension Link

R+L Carriers Freight Shipping

R+L Carriers is an American private freight shipping company who provides freight services such as LTL, Truckload, Logistics, and more.Freight shipping is used when large and heavy items need to be shipped.This extension provides the integration of R+L Carriers Freight to show freight shipping quotes and delivery tracking on your Magento® store.This extension fetch live freight rates from R+L Carriers using their available Rate Quote API.

Key features:

  • Retrieve live rates from the R+L Carriers freight
  • Supports accessorial services and can be manage from the admin
  • Set Min/Max package weight to show freight rates from R+L Carriers
  • Support all product types
  • Support Magento® multi store functionality
  • Assign a store freight class or assign freight classes per product basis

Extension Link

ShipStation

ShipStation is a powerful, yet easy to use web-based, multi-channel, multi-carrier shipping solution designed to facilitate the order fulfillment process for your Magento store. ShipStation downloads your orders in real-time, allows you to create USPS, UPS, FedEx, DHL, Royal Mail, Canada Post, Australia Post, and more shipping labels and packing slips in batch, and communicates tracking information to your customers.

Key features:

  • Print Shipping Labels and Packing Slips in Batch
  • Consolidate Orders from Multiple Channels
  • Unlimited Selling Channels
  • No Software to Install
  • Free USPS Provider Account

Extension Link

Shipwire Fulfillment Platform

This extension provides Magento Enterprise and Community edition merchants with e-commerce order fulfillment, shipping software, and cloud-based logistics services from fulfillment centers around the world.Also the Shipwire Platform helps brands grow sales, expand into new markets, and delight their customers by eliminating shipping and storage hassles.

Key features:

  • Order entry sync
  • Order tracking
  • Inventory status
  • Shipping rates

Extension Link

Shipping Tracker

This versatile extension lets you customize the shipment tracking links provided to your customers. Shipping Tracker is easy to set up and supports up to five carriers as long as they provide a tracking URL and reference number. Shipping Tracker uses the Magento mechanism to add a tracking ID to a shipment. When you create a shipment, select a tracking carrier you have configured and add the tracking ID.

Key features:

  • Embeds shipment tracking links in shipping confirmation emails
  • Completely generic – not tied to any carrier
  • Supports up to five carriers at any one time
  • Features a dropdown menu with known tracking URLs from major shipping carriers
Extension Link

Similarly there are many other extensions available. I tried to list a few. I hope this tutorial help you in any way.

Please feel free to drop any suggestions or queries in comments section. It will be highly appreciated.

Author: Qaisar Satti
Category: Magento 1
Last Modified: October 22, 2018


Magento 2 current customer group

Today we talk about how in Magento 2 current customer group. This tutorial includes example of get current customer group id, get current customer group name and other group information. Magento 2 use the model session for storing the current session data. You have to inject \Magento\Customer\Model\Session to get current customer session data and inject \Magento\Customer\Model\Group to get customer group data. So let start with our example.

Dependency Injection

protected $_customerSession;
protected $_customerGroupCollection;

public function __construct(
           
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Customer\Model\Group $customerGroupCollection,

    ) {


        $this->_customerSession = $customerSession;
        $this->_customerGroupCollection = $customerGroupCollection;

    }

public function getGroupId(){
 if($this->_customerSession->isLoggedIn()):
   //Get current group
        echo $customerGroupId = $this->_customerSession->getCustomer()->getGroupId();
                $groupCollection = $this->_customerGroupCollection->load($customerGroupId);
        echo $groupCollection>getCustomerGroupCode();//Get current customer group name
    endif;

}

Object Manager

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->create('Magento\Customer\Model\Session');

if ($customerSession->isLoggedIn()) {

//Get current group
        echo $customerGroupId = $customerSession->getCustomer()->getGroupId();
                $groupCollection = $objectManager->create('\Magento\Customer\Model\Group')->load($customerGroupId);
        echo $groupCollection>getCustomerGroupCode();//Get current customer group name
   }
Author: Qaisar Satti
Category: Magento 2
Last Modified: July 12, 2018


Magento 2 check if customer logged in or not

Today we talk about how in Magento 2 check if customer logged in or not. This tutorial includes check if customer logged in or not.Magento 2 use the model session for storing the current customer session data like customer id, customer email, customer name and other customer information. You have to inject \Magento\Customer\Model\Session to get current customer session data. So let start with our example.

Dependency Injection

protected $_customerSession;



public function __construct(
           
        \Magento\Customer\Model\Session $customerSession,

    ) {


        $this->_customerSession = $customerSession;

    }

public function getGroupId(){
 if($this->_customerSession->isLoggedIn()):
   //Get current group
         echo $this->_customerSession->getCustomer()->getId();  // get customer id
         echo $this->_customerSession->getCustomer()->getName();  // get  customer Full Name
         echo $this->_customerSession->getCustomer()->getEmail(); // get customer Email
else:

   echo “no logged in”;            


endif;

}

Object Manager

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->create('Magento\Customer\Model\Session');

if ($customerSession->isLoggedIn()):
   //Get current group
         echo $this->_customerSession->getCustomer()->getId();  // get customer id
         echo $customerSession->getCustomer()->getName();  // get  customer Full Name
         echo $customerSession->getCustomer()->getEmail(); // get customer Email
else:

   echo “no logged in”;            


endif;
Author: Qaisar Satti
Category: Magento 2
Last Modified: July 12, 2018


Magento 2 add custom link topmenu

Today, we’ll talk about Magento 2 add custom link topmenu. This tutorial include how to add custom link in top navigation or topmenu in Magento 2.It is very create For any suggestions & question, please feel free to drop a comment.

If you are adding in your theme create default.xml in following path.

Layout Method

app/design/frontend/QaisarSatti/theme/Magento_Theme/layout/default.xml

Or you want it to add from module layout then create default.xml in following path.

app/code/QaisarSatti/view/HelloWorld/frontend/layout/default.xml

Now add the following code, you can label and url ask you required.

<referenceBlock name="catalog.topnav">        
    <block class="Magento\Framework\View\Element\Html\Link\Current" name="cart" before="account">
               <arguments>
                       <argument name="label" xsi:type="string">Cart</argument>
                      <argument name="path" xsi:type="string">checkout/cart</argument>          
               </arguments>            
    </block>
</referenceBlock>

Observer Method

Create file events.xml if not exists. QaisarSatti/HelloWorld/etc/frontend/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="page_block_html_topmenu_gethtml_before">
        <observer name="QaisarSatti_HelloWorld_Topmenu" instance="QaisarSatti\HelloWorld\Observer\Topmenu" />
    </event>
</config>

Now Create file Topmenu.php in following directory QaisarSatti/HelloWorld/Observer/Topmenu.php

namespace QaisarSatti\HelloWorld\Observer;
use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Data\Tree\Node;
use Magento\Framework\Event\ObserverInterface;
class Topmenu implements ObserverInterface
{
    public function __construct(
        ...//add dependencies here if needed
    )
    {
    ...
    }
    /**
     * @param EventObserver $observer
     * @return $this
     */

    public function execute(EventObserver $observer)
    {
        /** @var \Magento\Framework\Data\Tree\Node $menu */
        $menu = $observer->getMenu();
        $tree = $menu->getTree();
        $data = [
            'name'      => __('Menu label'),
            'id'        => 'some-unique-id-here',
            'url'       => 'url goes here',
            'is_active' => (expression to determine if menu item is selected or not)
        ];
        $node = new Node($data, 'id', $tree, $menu);
        $menu->addChild($node);
        return $this;
    }
}

Plugin Method

Create file di.xml if not exists. QaisarSatti/HelloWorld/etc/frontend/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- Add Plugin for add custom link in navigation -->
    <type name="Magento\Theme\Block\Html\Topmenu">
        <plugin name="add_menu_item" type="QaisarSatti\HelloWorld\Plugin\Topmenu" sortOrder="10" disabled="false"/>
    </type>
</config>

Now Create file Topmenu.php in following directory QaisarSatti/HelloWorld/Plugin/Topmenu.php

namespace QaisarSatti\HelloWorld\Plugin;
use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Data\Tree\Node;
use Magento\Framework\Event\ObserverInterface;
class Topmenu implements ObserverInterface
{
    public function afterGetHtml(\Magento\Theme\Block\Html\Topmenu $topmenu, $html)
    {
        $itemUrl = $topmenu->getUrl('helloworld');//add link here
        $currentUrl = $topmenu->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true]);
        if (strpos($currentUrl,'helloworld') !== false) {
            $html .= "<li class="level0 nav-5 active level-top parent ui-menu-item">";
        } else {
            $html .= "<li class="level0 nav-4 level-top parent ui-menu-item">";
        }
        $html .= "<a href="" . $itemUrl . "" class="level-top ui-corner-all"><span class="ui-menu-icon ui-icon ui-icon-carat-1-e"></span><span>" . __("Hello World") . "</span></a>";
        $html .= "</li>";
        return $html;
    }
}
Author: Qaisar Satti
Category: Magento 2
Last Modified: November 13, 2018


Magento 2 add pagination custom collection

Today we talk about Magento 2 add pagination custom collection. we’ll talk about how to get custom collection with magento 2 default pagination or use pager with custom collection.For any suggestions & question, please feel free to drop a comment.

First Step:

Get collection for pagination.

public function getNews() {
 //get values of current page
$page=($this->getRequest()->getParam('p'))? $this->getRequest()->getParam('p') : 1;
 //get values of current limit
$pageSize=($this->getRequest()->getParam('limit'))? $this->getRequest()->getParam('limit') : 1;
$newsCollection = $this->newscollectionFactory->create(); $newsCollection->addFieldToFilter('is_active',1); $newsCollection->setOrder('title','ASC'); $newsCollection->setPageSize($pageSize); $newsCollection->setCurPage($page);
return $newsCollection;
}

Second Step:
Now simply add the pagination to you collection

protected function _prepareLayout() {
parent::_prepareLayout();
$this->pageConfig->getTitle()->set(__('News'));
 if ($this->getNews()) {
$pager = $this->getLayout()->createBlock( 'Magento\Theme\Block\Html\Pager', 'qaisarsatti.news' )->setAvailableLimit(array(5=>5,10=>10,15=>15))->setShowPerPage(true)->setCollection( $this->getNews() );
$this->setChild('pager', $pager);
$this->getNews()->load();
}
return $this;
}

Third Step:
Now create a function to get the child block of pager.

public function getPagerHtml() {
return $this->getChildHtml('pager');
 }

Fourth Step:
in your phtml file add this code then pagination will be showing with limits.

<?php if ($block->getPagerHtml()): ?>
<div class="order-products-toolbar toolbar bottom">
<?php echo $block->getPagerHtml(); ?>
</div>
<?php endif ?>
Author: Qaisar Satti
Category: Magento 2
Last Modified: July 12, 2018


Pages:123