17 02, 2016

Magento 2: Flush the cache using Command Line

February 17th, 2016|MAGENTO, MAGENTO 2|0 Comments

If there is no any access of admin. Without login at admin side we can clear che cache.
Now, here we are describing the command:

Enable the cache use this:

php bin/magento cache:enable

Disable the cache use this:

php bin/magento cache:disable

Flush the cache use this:

4 02, 2016

Magento 2: Apply the schedule for theme

February 4th, 2016|MAGENTO, MAGENTO 2|0 Comments

In the magento 2 we can set the schedule for different theme.

1) Login to Admin panel
2) Go to Content > Design > Schedule
3) Click on “Add new Design” theme
4) Select the theme,start date, from date and save the design theme

design_create

Now check […]

3 02, 2016

Magento 2: Reindex using Command line

February 3rd, 2016|MAGENTO, MAGENTO 2|0 Comments

We are thinking how we will run the indexing using command line and which command we will use to run this.

Now here we are describing the command:

If we need to do whole index management in the site we will run the following command in project

In root magento directory

1 02, 2016

Magento 2: Create Custom Query

February 1st, 2016|MAGENTO, MAGENTO 2|3 Comments

Now You are thinking How we will get write the core Query in Magento.

Let’s Start. Here We give the example of insert, update, delete, select.

1. Insert

$themeId=3;
$this->_resources = \Magento\Framework\App\ObjectManager::getInstance()
->get('Magento\Framework\App\ResourceConnection');
$connection= $this->_resources->getConnection();

$themeTable = $this->_resources->getTableName('theme');
$sql = "Insert into " . $themeTable . "(theme_id,theme_path) Values (" . $themeId . ",'webmull/christmastheme' )";
$connection->query($sql);

 2. […]

29 01, 2016

Magento 2: PHP extension error at the time of Installation

January 29th, 2016|MAGENTO, MAGENTO 2|0 Comments

When we try to install Magento 2 in our wamp server we got the error

error1

Solution:

1) Go to the path D:/wamp/bin/php/php5.5.12 select all file and select and copy the file which start with “icu”

solution1

2) Paste […]

27 01, 2016

Magento 2: Add New Massaction in the Admin Grid

January 27th, 2016|MAGENTO, MAGENTO 2|0 Comments

Now, You are thinking how we will overwrite the grid.php in Magento 2. Because some module has grid.php and some has not.
Now We are adding the one massaction in Sales_order Grid at admin side which has no grid.php for order.

1. Create the file sales_order_grid.xml in the path app\code\[Vendor Name]\[Module Name]\view\adminhtml\ui_component

2. […]

20 11, 2015

Magento 2: Remove Add new button from admin grid

November 20th, 2015|MAGENTO, MAGENTO 2|0 Comments

In magento when we create grid, magento automatically create the “Add New” button. But now we are thinking how we will delete this same as Magento 1.

Don’t Worry. Write the below code in your block file

protected function _construct()
{

parent::_construct();

$this->removeButton('add'); // Add this code to remove the [...]

3 11, 2015

Magento 2: Add customer logout link in My Account navigation

November 3rd, 2015|MAGENTO, MAGENTO 2|0 Comments

In Magento 1, To add the logout link we can directly write in customer.xml file.

But now we are thinking how to add logout link

Now,Let’s Start

1. Create the customer_account.xml in the path app/design/frontend/<vendor>/<theme>/Magento_Customer/layout

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer_account_navigation"><!--ifconfig="wishlist/general/active"-->
<block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-logout-link">
<arguments>
<argument name="path" xsi:type="string">customer/account/logout</argument>
<argument name="label" xsi:type="string">Logout</argument>
</arguments>
</block>
</referenceBlock>
</body>
</page>

Now then refresh the page […]

30 10, 2015

Magento 2: Add new Custom Breadcrumb in checkout page

October 30th, 2015|MAGENTO, MAGENTO 2|3 Comments

In Magento 1, we can directly add the breadcrumb in checkout page using XML.

But in Magento 2 there are some changes to add the breadcrumb

1. Copy the checkout_cart_index.xml file in your theme. And then write code in body tag

<referenceBlock name="breadcrumbs">
<action method="addCrumb">
<argument name="crumbName" xsi:type="string">Home</argument>
<argument name="crumbInfo" xsi:type="array">
<item name="title" [...]

27 10, 2015

Magento 2: Send the email

October 27th, 2015|MAGENTO, MAGENTO 2|0 Comments

In Magento 2 we can send the mail using their function but there are some changes in Magento 2.

Now Let’s start how to send the email.

1. create email_templates.xml in the path app/code/Webmull/Email/etc

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Email/etc/email_templates.xsd">
<template id="send_email_email_template" label="Email Form" file="send_form.html" type="text" module="Webmull_Email" area="frontend"/>
</config>

 

2. create send_form.html in the […]