Documentation of the shops data exchange protocol - baselinker.com
Function list
Tests
ChangeLog
Remap Builder


ProductsPriceUpdate
The method allows mass edit the price


Input parameters
Incoming as $_POST fields.
productsArray (Sent as string in JSON format)The array of products (in JSON format). Each product is listed as a separate element, also presented as an array in the following format:
| - product_id - product identifier
| - variant_id - variant identifier (set 0 when changing the main product)
| - price - price gross



Outgoing data
Array fields that the method should return.
counterintNumber of processed products.



Example:
Input data:
Array
(
    [products] => Array
        (
            [0] => Array
                (
                    [product_id] => 123
                    [price] => 2.99
                )

            [1] => Array
                (
                    [product_id] => 456
                    [variant_id] => 789
                    [price] => 15
                )

        )

)

POST request:
products%5B0%5D%5Bproduct_id%5D=123&products%5B0%5D%5Bprice%5D=2.99&products%5B1%5D%5Bproduct_id%5D=456&products%5B1%5D%5Bvariant_id%5D=789&products%5B1%5D%5Bprice%5D=15


returned data JSON:
{"counter":2}

Dane wyjściowe:
Array
(
    [counter] => 2
)