Jump to content

Change picture on click (product.tpl)


Cosmi

Recommended Posts

Dear Presta users and developers,

I'm trying to modify a little the thickbox display mode and I have 2 challenges. We are in the product.tpl now.

So,
1) All I need is that when a user click on the thumbnail of a picture, it shows the big picture (not the zoomed one). I don't want to see the big picture when the mouse is over, but when the thumbnail is clicked. In this case, we don't need to see the thickbox picture with black-transparent overlay.

2) When I click the thumbnail, a variable should take a certain value. For example, I have these thumbnails:
[ A ] [ B ] [ C ]
if I click [A],
$value = 'a'; // and shows the big picture, as mentioned in 1)
else if I click ,
$value = 'b'; // and shows the big picture, as mentioned in 1)
else
$value = 'c'; // and shows the big picture, as mentioned in 1)

I think this should be done both with PHP (or smarty) and JavaScript.

I'm still trying to figure it out. Can you show me a way to fulfill my objectives?

Thank you,
Your help is very appreciated!

Cosmi

Link to comment
Share on other sites

All right. I solved the first step.


getImageLink($product->link_rewrite, $imageIds)}'" title="{$image.legend|htmlspecialchars}">
getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" />




I'll try to figure the next step.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...