Reputation: 23
We are working on to move our current e-commerce system to Hybris e-commerce.
In current system, external image server is used to feed for all product images used on product list/details pages. So I am looking for ways to configure these product images path (located for external server) in Hybris. I searched Hybris wiki but couldn't find much helpful info.
So i want to know where and how to configure external image server path so that all modules which uses product images can pick the correct path and display images accordingly. If some has done this sort of things before or has an idea, kindly help me.
Upvotes: 2
Views: 2317
Reputation: 20065
In PCM cockpit, if you need to display product image that is on remote server you can follow these steps (i don't know if it's the best solution but at least it works) :
Product
definition (items.xml)<persistence type="dynamic" attributeHandler="pcmUrlAttribute" />
<bean id="pcmUrlAttribute" class="mypackage.PcmUrlAttributeHandler"/>
PcmUrlAttributeHandler
class that will contains the logic to retrieve the URL of the image on your remote server. The class has to implements DynamicAttributeHandler<String, ProductModel>
Now you have to customize the Product Cockpit. It's not so easy (my opinion) so I won't explain all steps here but basically you have to find out the view you want to customize and set:
<imageslot>
<property qualifier="Product.pcmUrl" />
</imageslot>
Upvotes: 1
Reputation: 2989
Look at example media's URL for default apparel store they are configured with :
media.apparel-de.http=http://apparel-de.local:9001
media.apparel-de.https=https://apparel-de.local:9001
Upvotes: 0