Forums / Templates, Stylesheets, Page Layout / How to align product images to left?

How to align product images to left?

Locked

Started by kevinmc3 on 1 Nov 2009, 7:24 PM · Views: 2,568

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
1 Nov 2009, 7:24 PM
#1
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

How to align product images to left?

Ver 1.3.8a

Currently my product 'secondary" images are under the ADD TO CART button. I looked throught image handler setting, Config/Images but did not notice a setting to change this. I would like to have the secondary images rifht inder the main image, left aligned under main image.

1 Nov 2009, 8:08 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How to align product images to left?

You are going to have to edit tpl_product_info_display.php to achieve this.

Nick
iszent.com

15 Nov 2009, 3:01 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to align product images to left?

First, don't let all that weird PHP stuff in the file intimidate you :laugh:. Most Zencart PHP files, including that one, are well commented and each section is bracketed by bof [name of section] and eof [name of section]. b=beginning, e=end.

You'll need to find the section containing the code you want to move, and using your good text editor (I like Notepad++), cut that section and paste it where you want it. Save the file to your custom folder, and if it isn't right delete it and try again.

I'm intentionally not pointing out the exact sections you're looking for, since I think this is the kind of thing best learned by experience.

After you get the images where you want them, the alignment, etc. will be done in the stylesheet.

19 Nov 2009, 1:14 AM
#5
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Re: How to align product images to left?

stevesh:

First, don't let all that weird PHP stuff in the file intimidate you :laugh:. Most Zencart PHP files, including that one, are well commented and each section is bracketed by bof [name of section] and eof [name of section]. b=beginning, e=end.

You'll need to find the section containing the code you want to move, and using your good text editor (I like Notepad++), cut that section and paste it where you want it. Save the file to your custom folder, and if it isn't right delete it and try again.

I'm intentionally not pointing out the exact sections you're looking for, since I think this is the kind of thing best learned by experience.

After you get the images where you want them, the alignment, etc. will be done in the stylesheet.

I said I was NOT a programmer, didn;t say I was totally illiterate.
Yes, edit PHP files all the time, but I have a 60 hr week job so was looking for help identifiying exact section code to change. But, I've emailed my developer so will wait for his response when he gets back to his country.

19 Nov 2009, 3:21 AM
#6
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: How to align product images to left?

My, no need to bite the hand that feed you.

You were given the correct file and the sections to move is clearly marked. All you need to do is cut and paste where you need it.

<!--bof Additional Product Images -->

The code that follows and place it anywhere you like!


Play with it long enough and you will break it.
19 Nov 2009, 8:33 AM
#7
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How to align product images to left?

In tpl_product_info_display.php find all this code:

<!--bof Additional Product Images -->
<?php
/**
 * display the products additional images
 */
require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
<!--eof Additional Product Images -->

And cut and paste it below this line:

<!--eof Main Product Image-->

Then, as Stevesh said you will have to do some work on the css file to get the page to look the way you want. As we do not know how you want it to look it is not possible to give you more advice about this without more information but, as always, if you give the information we need, then the forum will provide the answers.

I apologise for my original answer which obviously did not give you enough information. I am sure Stevesh might apologise for his answer which gave you too much information. We will brush up our psychic powers so that, in future, we are able to pitch our answers to your exact level of knowledge and not inconvenience you by trying to help.

Nick
iszent.com

19 Nov 2009, 11:03 AM
#8
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to align product images to left?

You're very welcome. Best of luck with your site.

20 Nov 2009, 3:30 AM
#9
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Re: How to align product images to left?

niccol:

In tpl_product_info_display.php find all this code:

<!--bof Additional Product Images --> <?php /** * display the products additional images */ require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?> <!--eof Additional Product Images -->
> 
> And cut and paste it below this line:
> 
> ```
<!--eof Main Product Image-->

Then, as Stevesh said you will have to do some work on the css file to get the page to look the way you want. As we do not know how you want it to look it is not possible to give you more advice about this without more information but, as always, if you give the information we need, then the forum will provide the answers.

I apologise for my original answer which obviously did not give you enough information. I am sure Stevesh might apologise for his answer which gave you too much information. We will brush up our psychic powers so that, in future, we are able to pitch our answers to your exact level of knowledge and not inconvenience you by trying to help.

Thanks a million Niccol ! (and my apologies to all for being abrasive, two sick kids at once my nerves are shot).. . ..;}

24 Nov 2009, 6:38 AM
#10
rufusclc avatar

rufusclc

Zen Follower

Join Date:
Sep 2008
Location:
San Diego
Posts:
159
Plugin Contributions:
0

Re: How to align product images to left?

Can I chip in and ask where and how on the stylesheet would I align the additional product images to right?
Rufusclc

24 Nov 2009, 8:25 AM
#11
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: How to align product images to left?

Not sure exactly what you are trying to do but you could try:

.additionalImages{text-align:right;}

To find where to replace the existing rule search stylesheet.css for additionalImages

Come back if that isn't what you need.

Nick
iszent.com