Monday 10 July 2017

Magento get All search terms using programatically

<?php
//echo "hiii";die("here");
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once(__DIR__ . '/app/Mage.php');
Mage::app();
umask(0);
$searchCollection=Mage::getModel('catalogsearch/query')->getCollection();
//echo "<pre>";print_r($searchCollection->getData());die("here");
$searchData = $searchCollection->getData();
foreach($searchData as $terms){
echo $terms['query_text'];
echo "<br />";
}
die("here");
?>

Friday 7 July 2017

Magento2 Upgrade from 2.0.x-2.1.x

In composer.json change this line
"magento/product-community-edition": "2.0.0",
Also you should change the line 5 as well "version": "2.0.0", to keep it in sync.
to whatever version you want, and then run:
composer update
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
if any Authenication required give the public keys and private keys 
as a username and password of Your magento.com account login

Magento 9767 patch issue in checkout page customer registration

Product Collection with out of stock and In Stock in Magento 2

Product collection with out of stock and In stock. use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; $collection = $th...