. -, admin. , " ", , " " "". - , " -" "".
, , - PHP script Magento:
<?php
require_once('app/Mage.php');
umask(0);
Mage::app('admin');
$website_ids = array(1, 2);
$product_collection = Mage::getModel('catalog/product')->getCollection();
foreach($product_collection as $product) {
$product->setWebsiteIds($website_ids);
$product->save();
}
, , - programatically:
function getWebsitesArray() {
$ret = array();
$website_collection = Mage::app()->getWebsites(true);
foreach($website_collection as $website) {
$ret = array_push($website->getId());
}
return $ret;
}