Skip to main content
knowledgecenter.2checkout.com

Set cross-selling settings

Overview

Use the setCrossSellSettings method to customize the way your cross-sell campaigns are displayed in the shopping cart.  

Request parameters

Parameters 

Type 

Required

Description 

displayShortDescription 

Boolean 

Optional 

Determines if the product short description is displayed next to the thumbnail or not.

displayProductsMax 

Int 

Optional 

The maximum number of recommended products; We recommend adding a maximum of 3 products as cross-selling options. 

maxThumbSize 

Int 

Optional 

Maximum product thumbnail size. Must be any of [60, 80, 100, 150].

Response

The response of the setCrossSellSettings method is the input object with the settings updated. 

 

Request sample

<?php 
require ('PATH_TO_AUTH'); 
 
try { 
    $sessionID = $client->login($merchantCode, $date, $hash); 
    $setCrossSellSettingResponse = $client->setCrossSellSettings($sessionID, (object)[ 
        'maxThumbSize' => 60, 
        'displayProductsMax' => 5, 
        'displayShortDescription' => false, 
    ]); 
} catch (SoapFault $e) { 
    echo  $e->getMessage(); 
} 
  • Was this article helpful?