catalog.productImage.add
Scope: catalog Permissions to execute: for all
catalog.productImage.add(fields, fileContent)
Method adds image to product or SKU.
Parameters
Parameter | Type | Description |
---|---|---|
fields | object | Array, containing the following fields:
|
fileContent | product_file , structure is similar to Files processing. Required parameter. |
Examples
BX24.callMethod( 'catalog.productImage.add', { 'fields': { 'productId': 1, 'type': 'PREVIEW_PICTURE' }, 'fileContent': [ 'test.jpeg', 'iVBORw0KGgoAAAANSUhEUgAAALIAAAA/CAYAAABEpJJuAAAKrUlEQVR4nO3Se4xU9RUH8N/sujK4BQGB8vCJrlJxYAGH5wgSVymOWrU+R+wf1oROfW6ocazajoloW6mzCE5FYVBsKYpLtY01WozGZ+qjJJNatOCDqi3TCCzLsrC77Nx+Lz13c3Lmd2dmy53cjvmRfMK953XP/PanLMtShlHtfF/AMLzg+wKG4QXfFzAML/i+gGF4wfcFDMMLvi9gGF7wfQHD8ILvCxiGF3xfwDC84PsChuEF3xcwDC/4voBheMH3BQzDC74vYBhe8H0Bw/CC7wsYhhd8X8AwvOD7AobhBd8XMAwv+L6AYXjB9wUMwwu+L2AYXlDWmo3KmnNtfwRhHiyC2+EuuBGiMLqfswr9HxyKUX2Uldmo8mctLGUwfIOew2AVkYUEjChjbgG/D8SoTiqfacUFuqaUjyFEz7jI11hl6IAlUF/G/D5+H4hRnVR+davqjcR0Auw5ByF6DoPVD1thiss3Cvh9IEZ1Ur2rn1EHZ18tzYZF7D0HIXoOg9VPnXCh5jsF/D4Qozqp3lXPqJ5ZV3FnQjskWCwHIXoOg8UcFO9uuuE88a0Cfh+IUZ3UwVUbVPeMKx0j4AuwIMHiOQjRc5jyjigcA/NhJXSIPLcHGtjcAn4fiFGd1MHHnlZd069wbACLJFg8ByF6DrMaW5TV2UbBelHDvQEB0dPH7wMxqpPqefRpdWDaZbZ5YDEJittyEKLnsKh7GOZDPau3LYa8qHUsFLV9/D4QozrhIj+lOs/8ru1FsJgExW05CNFzWNS9DR9AOyyBIOtLilrHFgiwuj5TJzX+r2qh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RX540xzYXLBcPQIDqbHVwDtwEt8JFMJjlbTdC3mXeQlHbJxgMSm1gkbTI1cIKltdp1cx0kyoxy9YNN7OemMj3wBQxNypq4iIfFPmsZreMqImU+C1Noj4P54qasKhJUjwi4vzc59Esnl9MucHwYonzq8xF3pPKqC9OPMvxFFguXoATWa2b4bC2yJw3IeDWX1dXJ62HP5C4Jm+bA62wGyzSDs/ARJcenevZt7jfwxOwGI4XPXNFbbNmbljUnC/ydSK/XDPjZlFzeonfMknUJzU1DaLmaoqfLuLy3BMivxFGUi4AV8LL0Mn+HjsgDWMrdJFXq8+PjziGw+dgueiCx+F8GMb6BsE8WA57i/TvgVNZX4Ha2trDNYQEPJhlHJ4aGAaDeLwiF7ntwdXqH8fN4qbAHrDK0AF7IV9GbTfMF98qkEwmja+5ylzkX65S24+dKc2CnWB5pBMu1nynQCV+pPH1p3bjIn82doZOA7wP1mHaBlNdvlHA7wMxqpPavfQx9emY6W7q4DbYBVY/7YP7oL7I/AJ+H4hRnQ5d5E9GTytlMNwK70AerCKykIARZcwt4PeBGNVJ7X/zfbVr6aP9MRzmww/hLrgbboILYHQ/ZxXw+0CM6uT7AobhBd8XMAwv+L6AYXjB9wUMwwu+L2AYXvB9AcPwgu8LGIYXfF/AMLzg+wKG4YX/AJHOmqIwgbcKAAAAAElFTkSuQmCC' ] }, function(result) { if (result.error()) console.error(result.error().ex); else console.log(result.data()); } );
© «Bitrix24», 2001-2024