Maybe this free extension can help.
It allows you to bulk import any kind of product relations (cross-sells, up-sells, related) via csv or manual input.
Full description on how to use can be found here.
In a few words, you need to generate a csv file or input manually the product ids or SKUs in the format described and select a method to relate the products.
- Relate all on one line to first product in line - first product in a line is the main product and all the others will be related to the main one
- Relate all products on one line - all products on one line will be related to each other
- Relate all products among themselves - all products in your csv or manual input will be related among themselves independent of the line they are on.
Try this module:
File : app\etc\modules\Rkt_CrossSell.xml
<?xml version="1.0"?>
<config>
<modules>
<Rkt_CrossSell>
<active>true</active>
<codePool>community</codePool>
<depends>
<Mage_Catalog />
</depends>
</Rkt_CrossSell>
</modules>
</config>
File : app\code\community\Rkt\CrossSell\etc\config.xml
<?xml version="1.0"?>
<config>
<modules>
<Rkt_CrossSell>
<version>1.0.0</version>
</Rkt_CrossSell>
</modules>
<global>
<helpers>
<rkt_crossell>
<class>Rkt_CrossSell_Helper</class>
</rkt_crossell>
</helpers>
<blocks>
<rkt_crossell>
<class>Rkt_CrossSell_Block</class>
</rkt_crossell>
</blocks>
</global>
<frontend>
<layout>
<updates>
<rkt_crossell>
<file>rkt_crossell.xml</file>
</rkt_crossell>
</updates>
</layout>
</frontend>
</config>
File : app\code\community\Rkt\CrossSell\Block\Catalog\Product\View\Crosssell.php
<?php
class Rkt_CrossSell_Block_Catalog_Product_View_Crosssell extends Mage_Checkout_Block_Cart_Crosssell
{
/**
* Get crosssell items
*
* @return array
*/
public function getItems()
{
$items = $this->getData('items');
if (is_null($items)) {
$items = $this->getProduct()->getCrossSellProducts();
$this->setData('items', $items);
}
return $items;
}
}
File : app\code\community\Rkt\CrossSell\Helper\Data.php
<?php
class Rkt_CrossSell_Helper_Data extends Mage_Core_Helper_Abstract
{
}
File : app\design\frontend\base\default\layout\rkt_crossell.xml
<?xml version="1.0"?>
<layout>
<catalog_product_view>
<reference name="product.info">
<block type="rkt_crossell/catalog_product_view_crosssell" name="product.view.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml" />
</reference>
</catalog_product_view>
</layout>
Now in your view.phtml
add this code in the appropriate position
<?php echo $this->getChildHtml('crosssell') ?>
Now clear your cache. Double check evey file name and file paths are correct. Then you are good to go.
Best Answer
You can use crosssell_skus column in your CSV file. You need to provide list of SKUs separated by comma for that column.