Product Images

WATCH THE VIDEO

Microsoft Dynamics AX gives a possibility to add product images and show them in the webshop. Sana also allows to add videos to the products. You can add videos only in Sana Admin but not in ERP. Product videos are shown along with product images in the media carousel on the product pages.

The product images and product videos are shown on the product details page using the Media gallery content element.

NOTE

You can equally use the procedure which Sana provides out-of-the-box and Microsoft Dynamics AX to add product images.

Add an Image to a Product in Microsoft Dynamics AX

Step 1: In Microsoft Dynamics AX click: Organization administration > Setup > Document management > Document types.

In the Document types window, you can create a document type for images and specify the location where the images will be saved.

The following locations are available:

  • Archive directory - Images are stored in the directory specified in the Archive directory field.

  • Database - Images are stored in the Microsoft Dynamics AX database.

  • Original location - Images are stored in the location that was used when the file was originally attached to the record.

For more information, see Configure document management.

Step 2: In Microsoft Dynamics AX click: Organization administration > Setup > Document management > Document management parameters.

On the General tab, set up document handling.

The table below provides the description of the fields.

Field

Description

Archive directory

The default archive directory location. If you do not specify the archive directory path while creating a document type for product images this one will be used.

Max. file size in database

Enter the maximum file size, in megabytes, for a file that is saved to the Microsoft Dynamics AX database.

Max. file size in file system

Enter the maximum file size, in megabytes, for a file that is saved to the archive directory location.

Step 3: In Microsoft Dynamics AX click: Product information management > Common > Products > Released products. Select the necessary product and on the Product tab, click Product image.

To add an image to a product, click New. In the Type field, select the type of attachment that you created for product images and upload the image. If you add several images to the product select, the default one that should be shown on the product details page in the Sana webshop.

To make a product image visible in the webshop, select the Visible in webshop checkbox on the General tab.

NOTE

Starting from Sana Commerce Cloud 10.0.75 in Microsoft Dynamics AX, if product images are not available for the released product, Sana will use images from the main product if they are available.

Just in the same way you can add images to the product variants. When a customer selects a product variant from the dropdown list on the product details page, the corresponding product image is shown.

How Product Images in Microsoft Dynamics AX Are Linked to Products in Sana?

Step 1: When images are added to the products in Microsoft Dynamics AX, run the Product import task in Sana Admin. Open Sana Admin and click: System > Scheduled tasks.

The Product import task retrieves product information from the database to build or update the webshop index.

Step 2: When the Product import task is completed, start the Product image import task.

Before running the task, make sure that it is configured. Click Edit on the Product image import task and enable the setting Import product images from ERP. In the Separator field, enter the symbol that will be used to separate product image information in the product image filename, like item number, product variant code and order number.

For more information about product image import task, see Product Image Import.

The Product image import task will retrieve all product images from Microsoft Dynamics AX, rename them according to the image file name format supported by the Sana webshop, and save all images to the ProductImages directory of the Sana Commerce solution on the Web server.

Then, the Product image import task will automatically resize all product images from the ProductImages folder and put them according to the size to the Small, Medium and Large folders. This is done because product images of three different sizes are used in the Sana webshop.

For more information about product image import task and image sizes, see Product Images.

When the Product image import task is completed, product images from Microsoft Dynamics AX will be shown in the Sana webshop.

Microsoft Dynamics AX sends the product image modification date to Sana Commerce Cloud. This means that Sana Commerce Cloud tracks the date and time when the product image was changed and retrieves only those images that have been added or changed.