Magento 1.9 – Mass Update Meta Titles for Multi Store

magento-1.9meta-tagsmultistore

I want to mass update the meta titles for all products, and I have been able to update the the default/global for the products with MAGMI with the column title meta_title

But I want to have different meta titles for different store views.Its seems that the store view meta titles are stored in the catalog_product_entity_varchar table but I can't see how this is linked back to the product sku.

Is there a easy way to do this?

Best Answer

Here is a simple script that updates the meta title for one product in one store view based on the SKU. You can create a CSV file or any other parsable format and use this script in a loop to update your meta titles

$sku = '12345';
$storeId = 2;
$metaTitle = 'Updated meta title';
$id = Mage::getSingleton('catalog/product')->getIdBySku($sku);
if ($id) {
     Mage::getSingleton('catalog/product_action')->updateAttributes(
         array($id),
         array('meta_title' => $metaTitle),
         $storeId
     );
}

Setting 0 (zero) for $storeId means that the default values will be updated.

Related Topic