Media library images in checkout process.

Kentico Support Engineer asked on December 23, 2013 15:48

Media library images in checkout process.

Correct Answer

Kentico Support Engineer answered on December 23, 2013 15:48

Shopping Cart Checkout Process images are loaded from the App_Theme directory belonging to your website. While it is not possible to define an alternative location for these files directly in E-commerce settings, a simple customization will allow use of any location for image storage, such as Media library directory.

To achieve this, simply assign custom path to the ImageFolderPath variable at the very beginning of the Page_Load method in Shopping Cart web part control file:


For example like this:

ImageFolderPath = "/CorporateSite/media/UIGallery/ShoppingCart/";

Or like this:

ImageFolderPath = "/<ProjectDirectory>/CorporateSite/media/UIGallery/ShoppingCart/";

Afterwards, the CMS will start loading images specified for each checkout step from this directory. As you can see, in this example the path was set up to load images from an example Media Library called UIGallery.

Please note that this override is shared across all sites hosted in a single Kentico web project. It may be necessary to include custom logic that changes the assigned URL based on active site code name.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.