Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Additonal Product Images in Right Sidebox

Additonal Product Images in Right Sidebox

Views: 699

Results 1 to 6 of 6
2 Jul 2012, 7:49 PM
#1
techextreme avatar

techextreme

New Zenner

Join Date:
May 2012
Posts:
23
Plugin Contributions:
0

Additonal Product Images in Right Sidebox

I'm looking for a sidebox that will only show on product pages that have additional images.

I do not want the sidebox to show up other than on the product pages. I've looked in tpl_product_info_display.php and have moved the additional images all over the place on the page and still don't like it.

So, what I'd like to use is the "dead space" under the search sidebox on the right to display additional images "IFand only IF" they exist.

I had thoughts of using the code from tpl_product_info_display.php and put it in the "blank sidebox" and use that and an "IF" statement in the module to only show when on a product page.

I'm no PHP coder so you can just bet how well that went.

If anyone can give me some clues or pointers or even help me create what I'm trying to come up with, I'd greatly appreciate it.

Thanks,

techextreme

2 Jul 2012, 9:55 PM
#2
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Additonal Product Images in Right Sidebox

Well, I see what you're after, but I think putting them in a sidebox would be a big mistake, as while people have their attention focused on an individual product, they're really not going to pay attention to sideboxes, which they THINK they've already looked at while looking at other pages of your site, particularly your Home page, which is the first page they see and look at. Make sense?

You might try using the TPP module (Tabbed Products Pro), which will put your additional images in an individual tab below the main image, but will ONLY display that particular Tab when there's additional images.

P.M. me if this sounds like something you'd be interested in, and I can show you a site that I done using this module, so you can see it in action.

Hope this helps,
Robert

3 Jul 2012, 2:22 PM
#3
techextreme avatar

techextreme

New Zenner

Join Date:
May 2012
Posts:
23
Plugin Contributions:
0

Re: Additonal Product Images in Right Sidebox

Thanks but that's not what we're looking for.

On the right side of the page we have a lot of "white space" that if we could utilize it for the addtional images would alow us to "not" have so much white space. We were thinking that a sidebox with the additional photos would be advantageous as the user would now see a normal page for the product and the sidebox would have a title of "addtional product images". That way they know for sure that they're looking at the image for the product that they are currently viewing.

thanks,
techextreme

3 Jul 2012, 2:25 PM
#4
stevesh avatar

stevesh

Black Belt

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

Re: Additonal Product Images in Right Sidebox

I'm not coder enough to tell you exactly what to place inside it, but I would guess you could do that with the Blank Sidebox mod, which can contain PHP.

3 Jul 2012, 2:35 PM
#5
techextreme avatar

techextreme

New Zenner

Join Date:
May 2012
Posts:
23
Plugin Contributions:
0

Re: Additonal Product Images in Right Sidebox

I thought that also and used the "additional product images" code from within the tpl_product_info_display and placed it in the blank sidebox. Inserted the 2 files that are needed including the module and the tpl file for the blank sidebox and didn't come up with much.

My thoughts were to use something similar to what is shown here by only having it show on the products page itself and not any other pages.

Unfortunately, I'm not having much luck with finding the code similar to " if ($this_is_home_page)" that states this is a "product page retrieve the additional images to the sidebox for that particular item.

I'm hoping that someone can point me in the direction of this and maybe I can accomplish what I'm looking for.

Thanks,

techextreme

3 Jul 2012, 8:16 PM
#6
techextreme avatar

techextreme

New Zenner

Join Date:
May 2012
Posts:
23
Plugin Contributions:
0

Re: Additonal Product Images in Right Sidebox

Just thought I'd let everyone know that I was able to accomplish what I was trying to do with a little "code wrangling".

I took this piece of code from tpl_product_info_display.php:

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

I removed that portion of code from the "tpl_product_info_display.php" file so I didn't have additional images showing in multiple places.

I then took the "module" portion of the blank sidebox and replaced the existing code with the above.

In the admin section of Zencart I then instructed the product additional images to only have 1 per row.

I inserted the module, enabled it in the admin panel and viola! it works.

To see exactly what we were trying to do, click each link below.

This one shows what the page looks like with a single additional image: Here

This next link shows the page with two additional images: Here

And this is what is looks like with three additional image: Here

Now, there is still some additional work being done to the site but you'll get a better understanding of what we were looking for.