Portfolio
My Blog
Scroll down to discover
Search
Categories

Magento import produdct – fix product not show

September 1, 2016Category : Code/Web

SQL

<?php
/**
 * @author      Linhdh
 * @website     http://linholiver.com
 * @project    	update price and specialPrice
 */
error_reporting(E_ALL | E_STRICT);
define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
Mage::app();
$ids = Mage::getModel('catalog/product')->getCollection()->getAllIds();
Mage::getSingleton('catalog/product_action')->updateAttributes(
    $ids,
    array('status'=>1, 'visibility'=>4),
    0
);

 

01.
© Oliver / All rights reserved.
To top