m openmage

OpenMage LTS Developer Documentation

Catalog Product Link

Edit this page on GitHub

Module: Mage_Catalog

The Mage_Catalog module allows you to manage categories and products.

Product Links

Allows you to manage links for products, including related, cross-sells, up-sells, and grouped.

Resource Name: catalog_product_link

Aliases:

Methods:

Faults

Fault Code Fault Message
100 Given invalid link type.
101 Product not exists.
102 Invalid data given. Details in error message.
104 Product link not removed.

Examples

Example 1. Working with product links
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');

// Get list of related products
var_dump($proxy->call($sessionId, 'product_link.list', array('related', 'Sku')));

// Assign related product
$proxy->call($sessionId, 'product_link.assign', array('related', 'Sku', 'Sku2', array('position'=>0, 'qty'=>56)));

var_dump($proxy->call($sessionId, 'product_link.list', array('related', 'Sku')));

// Update related product
$proxy->call($sessionId, 'product_link.update', array('related', 'Sku', 'Sku2', array('position'=>2)));

var_dump($proxy->call($sessionId, 'product_link.list', array('related', 'Sku')));

// Remove related product
$proxy->call($sessionId, 'product_link.remove', array('related', 'Sku', 'Sku2'));

var_dump($proxy->call($sessionId, 'product_link.list', array('related', 'Sku')));
Create the Magento file system owner