Sep 1, 2016
81 Views

Magento import produdct – fix product not show

Written by

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
);

 

Article Tags:
· · · · · · ·
Article Categories:
Code/Web
    http://linholiver.com

    https://linholiver.com/diary/about/