Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Product images are not displayed on Product Description Page in Online Store

Posted on by 285

Hello,

I would appreciate your help on the following issue.

We have successfully published Online store to Sharepoint. Although we published not Contoso demo online store, but created our own products and categories in Axapta.

Each product was assigned with picture. We see categories and products in web-browser, but  when you click on the product, the image is not displayed. Instead of image we have URL to that image in a format: "

RetImage

{"Items":[{"AltText":"supraurl","Url":"http:\/\/mdata.yandex.net\/i?path=b0409194410_img_id139937546937758671.jpg"}]}

"

RetImage2

<?xml version="1.0" encoding="utf-8"?><RichMediaLocations><RichMediaLocation><Url>http://mdata.yandex.net/i?path=b0409194410_img_id139937546937758671.jpg</Url><AltText>supraurl</AltText></RichMediaLocation></RichMediaLocations>

To add image to the product in Axapta the following steps have been completed:

1. Open product details form

2. Click on Product Image (set up)

3. Clicked New and Add Type:File. Image is stored on a local HDD. (Media usage: External, Default image is not checked)

4. then Validated catalog

5. And sent it for approval. 

6. Changes approved.

7. then publish catalog.

I also checked whether Sharepoint has images. I mapped network drive and checked RetailProductCatalog folder (Lists>UncategorizedList_000) there are no images in any folder.

*UncategorizedList_000 - this is the name of our online store.

Demo Contoso images exist ( PublishingImages>Products) but we would like to publish our own products.

*This post is locked for comments

  • Irina Pivovarova Profile Picture
    Irina Pivovarova 285 on at
    RE: Product images are not displayed on Product Description Page in Online Store

    Sergey, thank you for comment.

    We've updated *.js files and pictures are shown now.

    Thank you

    Irina

  • Verified answer
    SergeyP Profile Picture
    SergeyP 2,928 on at
    RE: Product images are not displayed on Product Description Page in Online Store

    By looking at your screenshots it seems like you are accessing the application on port 40003 (I assume you didn't change settings/topology file in that regard and 40003 is using Windows Auth), please note that the application on this port should be used only by IT/developers who setup/customize the store front. Real users will have access only to the app on port 40002 (FBA) . Of course, if, right now you will switch from 40003 to 40002 your images will not start appearing but please take into account the information about those different web apps for future.

    So, if we ignore the port, your expectations in 2nd screenshot is correct but prerequisite for the expectations is: correct setup for the image (see my previous message and the message below).

    What you are seeing in 3rd screenshot is not expected: you are seeing there the List's item in Product Catalog (note that *in your case* when you click on the item you are redirected to another web app with different port) but instead you should still be in Publishing Portal's site collection which should display a page with the item's details (Please have a look into the VM with Contoso catalog Microsoft shipped and you will understand what I am talking about). This could happen if, for instance the connection between Product Catalog and Publishing Portal was not established, to see the status of your connection please search for

    Couple of additional things which could help us with the investigation

    in this post: https://community.dynamics.com/ax/f/33/p/103673/200222.aspx#200222

    you will find there short instructions on how to access the catalog connection UI in SP.

     

    >... what files have to be changed for external sourced images ...

    In the Publishing Portal's mapped drive you should be able to find this file Z:\Style Library\Scripts\Core.js

    Second file is C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\Storefront\js\OrderCheckout.js

    in both these files search for PublishingImages, by looking at the code you should have an idea what you will need to change if you don't want to store images in SharePoint

     

    >... if we want to store images in AX and show them in SP Portal we will need to manually copy them to specified folder, am i correct? ...

    AX doesn't store physical images' files, it stores just references (url/path), physical files should be stored in any external resource which allows anonymous access. If you want to store images in SharePoint's Publishing Portal then you can copy the images to the folder I mentioned above or, of course, if needed, you can automate this process.

     

    In general, I would recommend to have a look into the VM with Contoso Electronics catalog which was shipped by Microsoft, then you will have much better idea what the Online Store is and more ideas what to expect (at least) from your own deployment.

  • Irina Pivovarova Profile Picture
    Irina Pivovarova 285 on at
    RE: Product images are not displayed on Product Description Page in Online Store

    Sergey, could you please specify  what files have to be changed for external sourced images. Also could you please clarify if we want to store images in AX and show them in SP Portal we will need to manually copy them to specified folder, am i correct?

    Thank you.

    Irina

  • Irina Pivovarova Profile Picture
    Irina Pivovarova 285 on at
    RE: Product images are not displayed on Product Description Page in Online Store

    Sergey, here are 3 screenshots for you to review.

  • SergeyP Profile Picture
    SergeyP 2,928 on at
    RE: Product images are not displayed on Product Description Page in Online Store

    >when you click on the product, the image is not displayed. Instead of image we have URL to that image in a format

    To make sure I really understand what you are talking about, could you please provide a screenshot of what you see when you click on the product in Publishing Portal?

     

    > mapped network drive and checked RetailProductCatalog folder (Lists>UncategorizedList_000) there are no images in any folder.

    The images, which are displayed in Publishing Portal for Contoso Electronics catalog, are not supposed to be in RetailProductCatalog site collection, instead, they are deployed into the RetailPublishingPortal site collection (the only site collection which will provide public access to your products' catalog), so, if you want to see them there - you need to map a network drive to your publishing portal and then (I assume the drive name is Z) go to this folder: Z:\PublishingImages

    There you should see another folder Products which will have products' images for Contoso Electronics catalog.

    Please note that Contoso Electronics online store shows just one of possible ways (entire product is pretty well customizable) to store the images, in that case they are stored in SharePoint and in AX each product has relative path to the image's folder but you don't have to have the images in SharePoint if you don't want to (or due to any other reason), instead you can store them on any public resource which allows anonymous access (if you want not authenticated users to browser your catalog).

    If you decide to store your images in SharePoint's publishing portal then just copy your images to the folder Products (discussed above) by using WebDAV (via mapped drive) and then, in AX, while specifying image for a product use relative path (this approach is used in Contoso catalog), for instance:

    Products/YourImageForProduct1FileName.png

    (don't forget to republish your catalog once you made changes to your products)

     

    If, by any reason, you don't want to store your images in SharePoint, then first decide whether you want specify (in AX) full path to each image or relative one (that is the case for Contoso catalog), in any case (if you decided to go with this 2nd approach) you will need to modify couple of JavaScript files (let me know if you need that now - I will tell you what files should be modified) to make sure that final path to the images will be built by having knowledge about your external source for your images.

     

    In addition please note that images are not uploaded from AX to SharePoint, when you specify the image path (absolute or relative) - that is just text which is published with the product and then is supposed to be processed by a PublishingPortal while rendering the product.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans