Add / edit cross-sell texts

Use the addCrossSellCampaignText method to customize the texts that are shown in the shopping cart when a cross-sell campaign is displayed.

Editing a text can be done via the updateCrossSellCampaignText method with the same payload. If during a call to updateCrossSellCampaignText method, a text is not found in the database, it will be added automatically.

Request parameters

Parameter
Type / Description

language

Required (string) The ISO 639-1 two-letter code of the language; Can be Arabic, Bulgarian, Chinese, Chinese (traditional), Czech, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Korean, Norwegian, Persian, Polish, Portuguese, Portuguese (Brazil), Slovak, Slovenian, Spanish, Swedish, Thai, Romanian, Russian

title

Required (string) The title of the cross sell campaign as it is displayed in the cart

description

Required (string) The description of the cross sell campaign as it is displayed in the cart

Request sample

example.php
<?php

require ('PATH_TO_AUTH');

$csCampaignText = [];

$textObj = new stdClass();
$textObj->Language = "ro";
$textObj->Title = "Numele campaniei mele";
$textObj->Description = "Descrierea campaniei mele";

$csCampaignText[] = $textObj;

$textObj = new stdClass();
$textObj->Language = "en";
$textObj->Title = "My campaign name";
$textObj->Description = "My campaign description";

$csCampaignText[] = $textObj;
try {

    $csCampaignTextResponse = $client->addCrossSellCampaignText($sessionID, $csCampaignText);

} catch (SoapFault $e) {

    echo  $e->getMessage();

}

Response

Both the addCrossSellCampaignText and updateCrossSellCampaignText methods will return the full list of texts available in the platform.

Last updated

Was this helpful?