Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Product Variant Thumbnails - How To Display?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-20-2006, 07:16 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default Product Variant Thumbnails - How To Display?

Hi,

I am working on 4.1.3 with the Product Options/Variants and have added options and attached a thumbnail to each one.

When you view the product detail page the thumbnail image changes as you change the product option, which is fine. But, what I also want to do is display each option/variant thumbnail separately. Maybe in another table below the product details but above the Send to Friend, etc.

http://www.studio57designs.com/example.jpg

I've tried the debug and don't quite understand what variables, etc I need to use.

There may be a few thumbnails or many....isn't there a way to create a loop do display them?

Ultimately what I would like to do is have the thumbnails with qty and checkboxes and be able to order multiple items from that one screen. But, I would be happy to get the first step of displaying the thumbnails.

Any assistance would be greatly appreciated.

Thanks,

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #2  
Old 09-20-2006, 08:31 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Product Variant Thumbnails - How To Display?

I "simply" made a swatch image... and included it into the product description.

The pulldown for each color changes the variant, and there is also an enlarged view of the color palette.

This is one product that I am thinking of changing to a "multiple items and qty" type of input page -- small swatch, next to an input box... then "add to cart" so customers can buy mutliple colors all at once... but for most of my products, a customer will only buy one color.

Hope this helps...

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 09-20-2006, 09:30 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default Re: Product Variant Thumbnails - How To Display?

Jeremy,

Thanks for the reply but thats not what I'm looking for....because if additional options/variants are added then the image will have to be updated and that doesn't make it very dynamic.

I prefer to code it so that the thumbnails will change without alot of additional intervention.

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #4  
Old 09-20-2006, 06:38 PM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default Re: Product Variant Thumbnails - How To Display?

Ok, I've made some progress but I need some assistance with the code I created.

Here is the code - template name (option_images.tpl):

Quote:
<table>
<tr>
{foreach from=$variants item=var}
<td width="100" align="center">
<img src="{$var.image_url}" width="75" height="75">
<br />
{foreach from=$var.options item=o}
{$o.option_name}
{/foreach}
</td>
{/foreach}
</tr>
</table>
{/if}

This template is then inserted into the product.tpl.

Here is the result:
http://www.studio57designs.com/sample2.gif

But, I don't know how to code it so that it will flow to the next row for more than 5 images.....like the subcategories icon mod.

Also, I want to make each image a link to the product page.

Now that I've got this far can someone help me figure out these last 2 steps.

Thanks,

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #5  
Old 09-25-2006, 05:43 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default Re: Product Variant Thumbnails - How To Display?

Anyone have any help for my question? Thanks, Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #6  
Old 09-27-2006, 08:13 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default Re: Product Variant Thumbnails - How To Display?

Just in case someone has the same idea....here is the code to display variant thumbnails in rows:

Quote:
{if $variants ne ""}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
{foreach name=variants from=$variants item=var}
<td width="160">
<a href="product.php?productid={$var.productid}">
<img src="{$var.image_url}" width="150" height="150"></a>
<br />
{foreach from=$var.options item=o}
<b>{$o.option_name}</b>
{/foreach}
<br /><br />
</td>
{if $smarty.foreach.variants.iteration is div by 3}
</tr>
<tr>
{elseif not $smarty.foreach.variants.last}
<td></td>
{/if}
{/foreach}
</tr>
</table>
{/if}
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #7  
Old 10-26-2006, 09:07 PM
 
TJ Stephens TJ Stephens is offline
 

Advanced Member
  
Join Date: May 2005
Location: California
Posts: 94
 

Default Re: Product Variant Thumbnails - How To Display?

Dalmuti,
Thanks for sharing this code. It works great!
__________________
X-Cart Pro 4.1.11 (Live)
XRMA
XAFF
XAOM
DSEFU Pro
XGift Reg
Firetank Feed Manager
BCSE Shipping Calculator
XcartMod Dynamic Images
Reply With Quote
  #8  
Old 10-27-2006, 02:51 PM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default Re: Product Variant Thumbnails - How To Display?

You are welcome....hope you find it useful.

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #9  
Old 11-02-2006, 03:01 AM
 
JJD JJD is offline
 

Member
  
Join Date: Jul 2006
Posts: 11
 

Default Re: Product Variant Thumbnails - How To Display?

Hi,

If I wanted to display the variants thumbnails on the category display where would you code need to go?

Thanks,
__________________
X-Cart 4.1.2
Reply With Quote
  #10  
Old 11-14-2006, 10:54 AM
 
Brow Brow is offline
 

Advanced Member
  
Join Date: Nov 2006
Location: Indiana
Posts: 26
 

Default Re: Product Variant Thumbnails - How To Display?

Ok, this works awesome...but is there a way to code the links to reflect the image swapping as well as changing the SKU?
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:50 AM.

   

 
X-Cart forums © 2001-2020