Zend Anwar

Full stack web developer

Category: Magento


Magento Error: Item (Mage_Core_Model_Store) with the same id “0” already exist

There can be multiple rows inserted with the same value in tables core_store, core_website and core_store_group. You have to delete such duplicate rows from core_store, core_website and core_store_group table. That is, if you have three rows with same value then remove the two duplicate rows. Refresh Cache from System -> Cache Management.

Read More

Magento 1.9.2 puts url in search field

This is problem occurred due to server miss-configuration. vhost.conf file location / { try_files $uri $uri/ /index.php?q=$uri&$args; } Removed ‘$uri’ and it looks like location / { try_files $uri $uri/ /index.php?$args; }

Read More

dbModel read resource does not implement Zend_Db_Adapter_Abstract

It is very simple just clear the cache /var/cache/folder

Read More

Magento search result with full breadcumb

It is very simple. Just alter with following code, file location /your_theme/template/page/html/breadcrumbs.phtml <?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE_AFL.txt. * It is also available through the world-wide-web at […]

Read More

Magento Dirty COW Linux OS Vulnerability

Dirty COW (CVE-2016-5195) is a privilege escalation vulnerability in the Linux Kernel that can allow a local user (like a web hosting account) to gain root access to the server. This can also be a huge problem if your Magento store is compromised and the attacker has the ability to upload files to your server or […]

Read More

Magento product delete from CSV

<?php ini_set(‘memory_limit’, ‘2048M’); ini_set(‘max_execution_time’, 180000); require_once ‘../app/Mage.php’; Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); Mage::init(); //echo “TTT”; $app = Mage::app(‘default’); Mage::register(‘isSecureArea’, 1); $row = 0; if (($handle = fopen(“delete.csv”, “r”)) !== FALSE) { while (($data = fgetcsv($handle, 1000, “,”)) !== FALSE) { echo ‘Importing product: ‘.$data[0].'<br />’; foreach($data as $d) { echo $d.'<br />’; } $row++; if($row == 1) continue; // […]

Read More

Can’t retrieve entity config: zeon_manufacturer/eav_attribute_option_value

It has a very simple solution app/code/community/Zeon/Manufacturer/Model/Mysql4/Manufacturer/Collection.php need to replace the code array(‘manufacturer_name_table’ => $this->getTable(‘eav_attribute_option_value’)), replace with array(‘manufacturer_name_table’ => $this->getTable(‘eav/eav_attribute_option_value’)), Hope it will work. CAIDA Directory

Read More

Disable compilation from command line

Magento Compilation – Compile, Clear, Enable and Disable from Command Line If you have shell access running just got to shell folder $ php shell/compiler.php Usage:  php -f compiler.php — [options] state         Show Compilation State compile      Run Compilation Process clear          Disable Compiler include path and Remove compiled files enable       Enable Compiler include path disable      Disable […]

Read More

How To Export product with Category Names in Magento

<?php ini_set(‘memory_limit’, ‘2048M’); ini_set(‘max_execution_time’, 180000); require_once ‘../app/Mage.php’; umask(0); // output headers so that the file is downloaded rather than displayed header(‘Content-Type: text/csv; charset=utf-8’); header(‘Content-Disposition: attachment; filename=products.csv’); // create a file pointer connected to the output stream $output = fopen(‘php://output’, ‘w’); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $userModel = Mage::getModel(‘admin/user’); $userModel->setUserId(0); $collection = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSelect(‘*’); $attributeSetModel = Mage::getModel(“eav/entity_attribute_set”); // $product->getModel(),$product->getProductcode(), […]

Read More

Magento dashboard charts not working

It’s very simple just follow the below code Locate this file: app/design/adminhtml/default/default/template/dashboard/graph.phtml And change: “getChartUrl()” to “getChartUrl(true)”

Read More