External image on ODS – Salesforce Commerce Cloud

Use external images on ODS
Use external images on ODS

Bài viết này chúng ta cùng tìm hiểu về sử dụng external image trong Salesforce Commerce Cloud.

Đặt vấn đề

Ở sandbox 001 của ông khách hàng nào đó, ông ấy muốn hiển thị toàn bộ thông tin sản phẩm giống môi trường development trên môi trường sandbox ODS.

Nhưng, để export toàn bộ 100GB hình ảnh từ môi trường development mất 4h và import vào sandbox mất 4h nữa.

Phiền quá, mất thời gian quá, mà trên sandbox chắc gì đủ storage để chứa 100GB hình.

Mục tiêu

Cấu hình sử dụng hình ảnh sản phẩm (catalog) từ một môi trường khác, mà không cần phải import hình ảnh vào sandbox (external image).

Giải pháp external image Salesforce Commerce Cloud

  • Chỉ export/import catalogs, không export/import Catalog Static Resources.
  • Cấu hình External url cho Image Location trong catalog chứa Products Owned (Master Catalog).

Hướng dẫn cấu hình

Kiểm tra xem Base Path trên môi trường mình muốn lấy là gì.

Kiểm tra xem Base Path
Kiểm tra xem Base Path

Như hình trên ta thấy Base Path: /images

Tiếp theo đi lấy catalog Base URL:

Copy full image address
Copy full image address
https://development-ap01-organization.demandware.net/dw/image/v2/BJFC_DEV/on/demandware.static/-/Sites-tomorrowland-master-catalog/default/dw9f438a07/images/medium/55032503001/55032503001_detail_01.jpg?sw=412&sh=412&sfrm=jpg

Từ link trên, bỏ phần phía sau /images/ (Chính là Base Path ở trên) ta có được directory chứa hình ảnh sản phẩm trên môi trường development

https://development-ap01-organization.demandware.net/dw/image/v2/BJFC_DEV/on/demandware.static/-/Sites-tomorrowland-master-catalog/default/dw9f438a07/images/

Cách setting external image cho catalog

Merchant Tools > Products and Catalogs > Catalogs > Tomorrow land master catalog > Image Settings
Merchant Tools > Products and Catalogs > Catalogs > Tomorrow land master catalog > Image Settings

Mở Image Setting của master catalog (Catalog chứa sản phẩm)

Image Location: External (Mặc định là Internal)

HTTP URL: Từ link ở trên, thay htttps → http và paste link vào

http://development-ap01-organization.demandware.net/dw/image/v2/BJFC_DEV/on/demandware.static/-/Sites-tomorrowland-master-catalog/default/dw9f438a07/images/

HTTPS URL: Bỏ nguyên link chứa https vào

https://development-ap01-organization.demandware.net/dw/image/v2/BJFC_DEV/on/demandware.static/-/Sites-tomorrowland-master-catalog/default/dw9f438a07/images/

Kết quả

Before & After

Hết,
Thấy hay thì like, share và comment cho chủ phím, chủ phím xin cảm ơn.

Tham khảo

  1. Image Management: https://documentation.b2c.commercecloud.salesforce.com/DOC1/topic/com.demandware.dochelp/content/b2c_commerce/topics/image_management/b2c_image_management.html?cp=0_5_2
  2. Salesforce Commerce Cloud: https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp

Bình luận

Email của bạn sẽ không được hiển thị công khai.

seventeen + twenty =