Add/edit cross-sell texts
Overview
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
Parameters |
Type |
Required |
Description |
---|---|---|---|
language |
String |
Required |
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 |
String |
Required |
The title of the cross sell campaign as it is displayed in the cart |
description |
String |
Required |
The description of the cross sell campaign as it is displayed in the cart |
Response
Both the addCrossSellCampaignText and updateCrossSellCampaignText methods will return the full list of texts available in the platform.
Request sample
<?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;
$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'addCrossSellCampaignText';
$jsonRpcRequest->params = array($sessionID, $csCampaignText);
$jsonRpcRequest->id = $i++;
$order = callRPC($jsonRpcRequest, $host, true);