Skip to content
Rick Lambrechts edited this page May 1, 2021 · 1 revision

Remove sales prices of article:

To remove sales prices of an article you need to set the "salesPriceList" to null.

$mplusClient->updateProduct([
    'productNumber' => 'productNumber',
    'articleList' => [
        [
            'articleNumber' => 'articleNumber',
            'salesPriceList' => null,
        ],
    ],
]);

Set sales prices of article:

To set sales prices of an article you need to set the "salesPriceList" to array containing sales prices.

$mplusClient->updateProduct([
    'productNumber' => 'productNumber',
    'priceIncl' => 200
    'articleList' => [
        [
            'articleNumber' => 'articleNumber'
            'salesPriceList' => [
                [
                    'salesPriceNumber' => 1,
                    'description' => 'Korting',
                    'startDate' => [
                        'day' => date('j', 1619827200),
                        'mon' => date('n', 1619827200),
                        'year' => date('Y', 1619827200), 
                    ],
                    "endDate" => [
                        'day' => date('j', 1619913599),
                        'mon' => date('n', 1619913599),
                        'year' => date('Y', 1619913599), 
                    ],
                    "priceIncl" => 100
		]
            ],
        ],
    ],
]);
Clone this wiki locally