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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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   1974 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