Jump to:

2082 Posts in 1002 Topics by 452 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Original and resampled image in ecommerce

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, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1510 Views
  • Webdoc
    Avatar
    Community Member
    332 Posts

    Original and resampled image in ecommerce Link to this post

    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

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: Original and resampled image in ecommerce Link to this post

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

  • ccburns
    Avatar
    Community Member
    74 Posts

    Re: Original and resampled image in ecommerce Link to this post

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

    Thanks again.

    Cheers,
    Colin

    1510 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.