Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Original and resampled image in ecommerce


Go to End


3 Posts   2278 Views

Avatar
Webdoc

Community Member, 349 Posts

3 June 2009 at 3:34am

If the resampled image is in code - $Image.ContentImage.URL . then what is the original image code???
i have made ajax popup for it but it shows the same resapled image in ajax.
how i can use the original image from what was the resampled made.

the code is like so:

<% if Image.ContentImage %>
<a href="$Image.ContentImage.URL" title="<% sprintf(_t("IMAGE","%s pilt"),$Title) %>" rel="lightbox" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','$Image.ContentImage.URL',1)"><img src="$Image.ContentImage.URL" title="<% sprintf(_t("IMAGE","%s pilt"),$Title) %>" alt="<% sprintf(_t("IMAGE","%s pilt"),$Title) %>" name="Image1" border="0" id="Image1" /></a>
		<% else %>
			<img src="ecommerce/images/productPlaceHolderNormal.gif" alt="<% sprintf(_t("NOIMAGE","pilt puudub &quot;%s&quot;"),$Title) %>" />
		<% end_if %>

Thanks

Avatar
Webdoc

Community Member, 349 Posts

3 June 2009 at 7:59am

Solution is

<% if Image.ContentImage %>
<a href="$Image.URL" title="<% sprintf(_t("IMAGE","%s pilt"),$Title) %>" rel="lightbox" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','$Image.ContentImage.URL',1)"><img src="$Image.ContentImage.URL" title="<% sprintf(_t("IMAGE","%s pilt"),$Title) %>" alt="<% sprintf(_t("IMAGE","%s pilt"),$Title) %>" name="Image1" border="0" id="Image1" /></a>
      <% else %>
         <img src="ecommerce/images/productPlaceHolderNormal.gif" alt="<% sprintf(_t("NOIMAGE","pilt puudub &quot;%s&quot;"),$Title) %>" />
      <% end_if %>

Avatar
ccburns

Community Member, 79 Posts

1 October 2009 at 11:25am

Thanks for posting the solution, especially given in the end it was so simple ;)

Thanks again.

Cheers,
Colin