2.2.0

Table of contents

Bilateral exchange with MoySklad

The exchange module between MoySklad and CS-Cart provides fast two-way exchange of orders, products, payment and delivery methods via API

Installation

After downloading the module, it can be installed using the standard CS-Cart tools on the page Admin panel → Add-ons → Manage add-ons → Upload and install add-on (+).

Configuration

After installing with the standard tools, it is necessary to perform initial module configuration:

Image

Specify the login and password for the MySklad account.

Set at least two checkboxes "Enable exchange between systems" and "Enable exchange from CS-Cart to MySklad" (by default they are set). Click Save.

To exchange data, it is necessary to install hooks and receive a message that the hooks are installed (they are automatically installed during connection).

Image

Description of settings

Image

Create order statuses - If the order status name is not in the MySklad system, it will be created when the order is imported with the parameters 'name' => STATUS_NAME, 'color' => 69446, 'stateType' => 'Regular'.

Create new product - When the hook is triggered in CS-Cart "update_product_post" with the parameter $create = true, the procedure for creating a product in MySklad "create_product" will be called with the following field mapping (left fields from MySklad, right fields from CS-Cart):

Name = Name

Product description = Detailed description

Product code = Product code

Product article = Product code

externalCode = will be assigned from the CommerceML module or if not set then product_id

Sales price = Price

Update product - Update product in MySklad if it has been updated in CS-Cart.

Field mapping is similar to Create new product.

Enable logging to files - enables logging to the module root folder (/app/addons/ms_moysklad/logs) and module classes (/app/addons/ms_moysklad/Tygh/Addons/MsMoySklad/logs). It writes a lot and in detail. Different files are written for different entities.

Enable exchange only for the current day - exchange only for the current day (time according to Greenwich Mean Time).

Do not update orders - orders will not be updated in MySklad when updated on the website. This setting does not affect the "Create order when updated" setting.

Create order when updated - the module will attempt to create an order when it is updated if it is not in MySklad.

Do not update custom fields - when updating an order, no additional/custom fields will be updated.

Export product images to MySklad - Export occurs when creating or editing a product. All images for this product are exported. If an image is already present in MySklad, it will not be exported again. If there are images in MySklad that are not in CS-Cart, they will be deleted, the check is performed by the image file name.

Delay in seconds for API request to MySklad after hooks - causes a delay in seconds before executing API requests related to orders.

Default warehouse - after synchronizing with MySklad, all its warehouses will be loaded here. You can choose only one warehouse for exchange. It will appear in the corresponding field of the MySklad order.

Default organization - MySklad organization that will be assigned by default when creating an order.

Important points:

  1. When creating additional fields for orders in MySklad, the fields will automatically appear in the module settings and you will need to assign values from the CS-Cart order table to them.
  2. In MySklad there should be a service 'Delivery' with external code: ORDER_DELIVERY. If it is not saved when saving the order, it will be created automatically.
  3. For correct transmission of additional delivery and payment fields, their names in MySklad must be identical: Delivery typeDelivery addressPayment method4. After point 3, in the module settings in the section "Additional fields in orders" these fields will appear and you will need to select the following values for them from the list: **Delivery type -> 'shipping ids'Delivery address -> 's_address'Payment method -> 'payment_id'**5. When using CommerceML, it is necessary to prevent the triggering of the ms_moysklad module, otherwise duplication of products may occur. There are 2 ways to do this: Method 1. Apply fix No. 41 in the 'ms_addon_fixer' module. It will do everything automatically. Method 2. Manually add the following lines to "app/addons/rus_exim_1c/controllers/frontend/exim_1c.php" at the beginning of the php code, i.e. after
Image