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.
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) :
Add an attribute "pcmUrl" in the Product definition (items.xml)
Add to this attribute and attribute handler : <persistence type="dynamic" attributeHandler="pcmUrlAttribute" />
Declare the bean : <bean id="pcmUrlAttribute" class="mypackage.PcmUrlAttributeHandler"/>
Define the 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>
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
Related
I have setup TomCat and THREDDS server (loaded war file) and attempted to serve up some *.nc files using via WMS protocol.
I can request the file but all I seem to get back is a black image.
I had something similar in geoserver but I was able to update the styles layer and setup ranges so that various colours were applied.
I have tried editing the 'wmsConfig.xml'and alter options such as the 'defaultColorScaleRange' but it doesn't seem to have the desired effect.
I have read the documentation a few times but I may be missing something , has anyone overcome this problem ? Any help would be great.
Cheers
Update 1
So as suggest below using the built in viewer I can see the image and this is what I would like to get by requesting via WMS.
Using built in viewer
address : http://10.19.38.63:8080/thredds/godiva2/godiva2.html?server=http://10.19.38.63:8080/thredds/wms/testAll/testData.nc#
Requesting initial attempt
http://10.19.38.63:8080/thredds/wms/testAll/testData.nc?service=WMS&version=1.3.0&request=GetMap&CRS=EPSG:4326&width=150&height=150&bbox=-10097025.688358642,-12875664.540581377,20037508.342789244,313086.06785608194&LAYERS=precipitation&format=image/png&STYLES=boxfill/red
Which returns just the black square :(
I will carry on and look at the WMS url used by th eopenlayers example, maybe thats the key... ill continue to update my questions as my journey begins :).
Update 2
Managed to work out that the SRS being passed in was incorrect and needed altering.
now next stage is to work out how to request a time series over a batch of NCDF files.....
Update 3
Managed to work out a way to automate requesting WMS services and with the aid of this great plugin for leaflet maps I have the desired output.
https://github.com/socib/Leaflet.TimeDimension
Basically call the WMS endpoint with getmap that I require building up the url relevant for the file I need to request.
The next step for me is looking at styled for the returned raster at this point seems like some Java code modification, but at least my initial problems have gone. phew!
Update 4
Gone away and tried to rebuild the Java on a project ncWMS which I found was standalone but now incorporated into THREDDS. Still having no joy with transparency raster created from NETCDF.
Looking at THREDDS code a bit more after I also tried changing palletes that didnt seem to work , issue raised
https://github.com/Unidata/thredds/issues/631
You haven't shared the full url of your THREDDS request, but 10.19.38.63/thredds/wms/.... is the service url for the WMS GetCapabilities file. Which is an XML file describing the WMS service. That is not the THREDDS url for viewing the WMS via ncWMS. You need to scroll down the page to the Viewers: section and choose the Godiva2 (browser-based) link.
Friends I want to show an image like
http://xxx.xxx.xx.xx:8085/images/c4.jpg
But don't understand how to do it from my server cane any one helpme i am using jboss-as-7.1.1.Final all the helps are available foe Jboss 6.
Actually my requirement is in server i want to keep a directory where all the image will be store and I can access any image will url
I am using Linux environment .
You can create a images directory under jboss-as-7.1.1.Final/welcome-content, as long as you haven't disabled that in your configuration. Your config file (e.g. standalone.xml) should have:
<virtual-server name="default-host" enable-welcome-root="true">
Alternatively you can deploy static content. See a example in http://java.dzone.com/articles/deploying-static-content-jboss
I'm trying to get the current IIS application name in my ColdFusion scripts but I have no idea where to get this information. I want to use the app name to communicate with IIS using cfexecute by running appcmd.exe.
<cfexecute name="c:\windows\system32\inetsrv\APPCMD" arguments="add site /name:#arguments.sitename# /bindings:""http/*:80:#arguments.binding#"" /physicalPath:""#arguments.physicalPath#""" timeout="60"></cfexecute>
The problem is that I can't be sure what the app name is. I could save it somewhere in a db but i'd really like to get it dynamically so the script can run without configuring the appname. If I could be able to fetch it from somewhere (or maybe based on the current hostheader) I could dynamically fill
/name:#arguments.sitename#
I've tried to search how to do this by using PHP and JSP examples, but so far, i haven't been able to find any method on getting the app name.
Following on from #Miguel-F's link (http://www.iis.net/learn/get-started/planning-your-iis-architecture/iis-7-and-iis-8-configuration-reference) in the comments above, there's a file in %windir%\system32\inetsrv\config\ called applicationHost.config that you could read in - this file contains the collection of sites that's configured in IIS. Is that the sort of thing you're after?
I would like to expose some Strings to the a velocity theme in the liferay framework in order to write some HTTP headers used for social network sharing. What is important is that my Controller has to put these Strings to the velocity theme during the render phase.
How can this be done please?
You can always create a custom hook and add custom variable that will be available in theme. Check this link http://www.opensourceforlife.com/2012/06/custom-velocity-variable-in-liferay-61.html
I think the utility class VelocityVariablesUtil should help you insert some variables or custom helper utilities to be accessed from the template (*.vm) file of theme.
You can use the insertVariables() method of this class in your controller to achieve what you need.
Let me know if this works.
I would like to download images with a certain tag from Instagram with their likes. With this post I hope to get some advice or tips on how to do this. I have no experience with web scraping related stuff or web API usages. One of my questions is: can you create a program like this in python code or can you only do this using a webpage?
So far I have understood the following. To get images with a certain tag you have to:
need a valid access_token to even gain access to images by tag, which can be done like this. However, when I sign in you need to give a website. Does this indicate that you can only use the API's on websites rather than a python program for instance?
you use a media Tag Endpoint to search for tags by name.
I have no idea what the latest step will return exactly, but I expect that it will give me a specific image id that contains the tag. Correct? Now I will also need to get the likes belonging to these images. Just like latest step from before:
you use a likes Tag Endpoint to get a list of users that liked the image of which of course you can get the length.
If I can accomplish all of these steps it seems like I can achieve my original goal. I googled if there was something out there already. The only thing I could find was InstaRaider, but this did not seem to fit my description because it web scraped only the images from a specific user and not by tag or its likes. Any suggestions or ideas would be very helpful, I have only programmed in python and Java before..
I can only tell you that for URL you can use the localhost as this:
http://127.0.0.1
OR
http://localhost
I have also tried to do exactly the same before, but I could not, so I used a website to search for tags and images:
http://iconosquare.com/search/[HASHTAG]