View Single Post
  #2  
Old 09-10-2014, 12:55 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Different image for Thumbnail and Product page

In my templates I use things like:
Code:
{if:!product.countImages()gt1} Some code {end:}

Flexy, doesn't allow for the same "flexibility" (pun intended) as Smarty. There is good reason for this, it forces you to put the logic where it belongs, in PHP rather than the templates. There is no cool "array_reverse" that I know of.

You will have to determine the class that displays the thumbnail. Extend the class, assigning your own value for thumbnail. Then {getMyThumbSrc()}.

It's a pain for someone with a design oriented background. But hardcore devs will appreciate that this a better way. XC5 has truly separated design from logic, but in doing so made the two camps depend on each other more than ever before. I think as a whole this is a very good thing. For your individual one-man (or woman) project it can be a real hassle.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote