About Ankita Pancholi

This author has not yet filled in any details.
So far Ankita Pancholi has created 26 blog entries.
3 06, 2016

Magento 2: How to add 404 page in any module

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

There are two ways to display 404 page in Magento.
1. We can call default CMS page of 404 which is already created in back-end.
2. We can call the noroute.phtml file for 404

Sometimes, the module is disabled or  it does not display any content in the site as per below screen shot. […]

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

php: Setting to run the php file using command line

February 3rd, 2016|PHP|0 Comments

We are trying to run the php file using command line but we got the error “php is not a function”. So how we resolved this error
Now Let’s Start

1) Go to My Computer > Properties
2) Click on Advance setting
3) On the popup box click on “Environment Variable”
4) Choose the “Path” […]

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 […]