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

First detailed image instead of thumbnail

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 01-10-2006, 10:19 AM
 
autolab autolab is offline
 

Newbie
  
Join Date: Dec 2005
Posts: 2
 

Default

Quote:
Originally Posted by airman
This is a great mod, but ? is there a way to also have the first detailed image show up as the thumbnail image in the catagory section also? Basically wanting to use the detailed image as the product image. Just curious if this can be also done?

Thanks

I am very interested in this as well. I use the code from Lightspeed and Shan, and it works well, but it would be nice to integrate this into the thumbnail view in the category display.
__________________
Version 4.0.17
Reply With Quote
  #22  
Old 05-02-2006, 04:36 PM
 
Audiolines Audiolines is offline
 

Senior Member
  
Join Date: Mar 2006
Posts: 102
 

Default

love the code, but looking to do this...
we want the 2nd detailed image to popup in a seperate window when detailed images are clicked. some of our detailed images will be rather wide and will throw off the format of our xcart window.

thanks
__________________
version 4.0.17
Reply With Quote
  #23  
Old 05-02-2006, 07:05 PM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default

Quote:
Originally Posted by airman
This is a great mod, but ? is there a way to also have the first detailed image show up as the thumbnail image in the catagory section also? Basically wanting to use the detailed image as the product image. Just curious if this can be also done?

Thanks
Then you would have oversized images being reduced in size by the browser. The thumbnail pages would load slowly. Not a good browsing experience for your customers.
Reply With Quote
  #24  
Old 05-02-2006, 07:06 PM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default

Quote:
Originally Posted by Audiolines
love the code, but looking to do this...
we want the 2nd detailed image to popup in a seperate window when detailed images are clicked. some of our detailed images will be rather wide and will throw off the format of our xcart window.

thanks

There are pop up mods here. Just do a search and then look at my code and put it in the pop up mod.
Reply With Quote
  #25  
Old 07-06-2006, 06:55 PM
 
lannyg lannyg is offline
 

Member
  
Join Date: Jun 2006
Posts: 23
 

Default Question on mod

Hi,

I'm trying to apply this mod:
Quote:
<TD valign="top" align="left" rowspan="2" width="100">
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"}
</TD>

I find:
Code:
</TD></TR></TABLE> {/if} {include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"} </TD>

Is this the correct place to modify and is it customer/main/product.tpl?

Thank you.
__________________
Version 4.0.18 [unix]
Reply With Quote
  #26  
Old 07-06-2006, 10:23 PM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default Re: Question on mod

Quote:
Originally Posted by lannyg
Hi,

I'm trying to apply this mod:
Quote:
<TD valign="top" align="left" rowspan="2" width="100">
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"}
</TD>

I find:
Code:
</TD></TR></TABLE> {/if} {include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"} </TD>

Is this the correct place to modify and is it customer/main/product.tpl?

Thank you.

In 4.0.18 the raw code in customer/main/product.tpl looks like this:
Code:
<TD valign="top" align="left" rowspan="2" width="100"> {include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"} </TD>

What version are you trying to work on?
Reply With Quote
  #27  
Old 07-07-2006, 06:57 AM
 
lannyg lannyg is offline
 

Member
  
Join Date: Jun 2006
Posts: 23
 

Default Mod

I'm using 4.0.18. Shall I post the entire code here? I can not locate the part you modified. I find the product.tpl in customer/main, is this the correct tpl?
__________________
Version 4.0.18 [unix]
Reply With Quote
  #28  
Old 07-07-2006, 11:30 AM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default Re: Mod

Quote:
Originally Posted by lannyg
I'm using 4.0.18. Shall I post the entire code here? I can not locate the part you modified. I find the product.tpl in customer/main, is this the correct tpl?

Here is the complete customer/main/product.tpl file from 4.0.18 with the part separated out that needs replacing with code I provided in the instructions on page one of this thread.

Code:
{* $Id: product.tpl,v 1.96.2.25 2005/11/17 11:40:11 max Exp $ *} {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/product_offers_short_list.tpl" product=$product} {/if} {include file="form_validation_js.tpl"} {if $product.product_type eq "C" && $active_modules.Product_Configurator} {include file="modules/Product_Configurator/pconf_customer_product.tpl"} {else} {capture name=dialog} <TABLE border="0" width="100%"> <FORM name="orderform" method="post" action="cart.php?mode=add" onsubmit="javascript: return FormValidation();"> <TR> --------------------------------------------------------- <TD valign="top" align="left" rowspan="2" width="100"> {include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"} </TD> ------------------------------------------------------------ <TD valign="top"> <SPAN class=> {if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if} </SPAN> <TABLE width="100%" cellpadding="0" cellspacing="0" border="0"> <TR><TD colspan="2"><FONT class="ProductDetailsTitle">{$lng.lbl_details}</FONT></TD></TR> <TR><TD class="Line" height="1" colspan="2">[img]{$ImagesDir}/spacer.gif[/img]</TD></TR> <TR><TD colspan="2"></TD></TR> {if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""} <TR><TD width="30%">{$lng.lbl_quantity}</TD><TD nowrap><SPAN id="product_avail_txt">{if $product.avail gt 0}{$product.avail}</SPAN>{else}{$lng.txt_no}{/if} {$lng.txt_items_available}</TD></TR> {/if} {if $product.weight ne "0.00"}<TR><TD width="30%">{$lng.lbl_weight}</TD><TD nowrap><SPAN id="product_weight">{$product.weight}</SPAN> {$config.General.weight_symbol}</TD></TR>{/if} {if $active_modules.Extra_Fields ne ""} {include file="modules/Extra_Fields/product.tpl"} {/if} {if $active_modules.Feature_Comparison ne ""} {include file="modules/Feature_Comparison/product.tpl"} {/if} {if $active_modules.Subscriptions ne "" and $subscription} {include file="modules/Subscriptions/subscription_info.tpl"} {else} <TR><TD class="ProductPriceConverting" valign="top">{$lng.lbl_price}:</TD> <TD valign="top"> {if $product.taxed_price ne 0 || $variants ne ''} <FONT class="ProductDetailsTitle"><SPAN id="product_price">{include file="currency.tpl" value=$product.taxed_price}</SPAN></FONT><FONT class="MarketPrice"> <SPAN id="product_alt_price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</SPAN></FONT> {if $product.taxes} {include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if} {else} <INPUT type="text" size="7" name="price"> {/if} </TD> </TR> {/if} </TABLE> <TABLE border="0" width="100%" cellpadding="0" cellspacing="0"> <TR><TD colspan="2"> <FONT class="ProductDetailsTitle">{$lng.lbl_options}</FONT> </TD></TR> <TR><TD class="Line" height="1" colspan="2">[img]{$ImagesDir}/spacer.gif[/img]</TD></TR> <TR><TD colspan="2"></TD></TR> {if $active_modules.Product_Options ne ""} { include file="modules/Product_Options/customer_options.tpl"} {/if} <TR><TD height="25" width="30%">{$lng.lbl_quantity}{if $product.min_amount gt 1} <FONT class="ProductDetailsTitle">{$lng.txt_need_min_amount} {$product.min_amount} {$lng.lbl_items}</FONT>{/if}</TD> <TD> {if $config.General.unlimited_products eq "N" and ($product.avail le 0 or $product.avail lt $product.min_amount) and $variants eq ''} <SCRIPT type="text/javascript" language="JavaScript 1.2"> var min_avail = 1; var avail = 0; var product_avail = 0; </SCRIPT> {$lng.txt_out_of_stock} {else} {if $config.General.unlimited_products eq "Y"} {math equation="x+1" assign="mq" x=$config.Appearance.max_select_quantity} {else} {math equation="x/y" x=$config.Appearance.max_select_quantity y=$product.min_amount assign="tmp"} {if $tmp<2} {assign var="minamount" value=$product.min_amount} {else} {assign var="minamount" value=1} {/if} {math equation="min(maxquantity+minamount, productquantity+1)" assign="mq" maxquantity=$config.Appearance.max_select_quantity minamount=$minamount productquantity=$product.avail} {/if} {if $product.distribution eq "" and !($active_modules.Subscriptions ne "" and $subscription)} {if $product.min_amount le 1} {assign var="start_quantity" value=1} {else} {assign var="start_quantity" value=$product.min_amount} {/if} <SCRIPT type="text/javascript" language="JavaScript 1.2"> var min_avail = {$start_quantity|default:1}; var avail = {$mq|default:1}-1; var product_avail = {$product.avail|default:"0"}; </SCRIPT> <SELECT id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_options();"{/if}> {section name=quantity loop=$mq start=$start_quantity} <OPTION value="{%quantity.index%}" {if $smarty.get.quantity eq %quantity.index%}selected{/if}>{%quantity.index%}</OPTION> {/section} </SELECT> {else} <SCRIPT type="text/javascript" language="JavaScript 1.2"> var min_avail = 1; var avail = 1; var product_avail = 1; </SCRIPT> <FONT class="ProductDetailsTitle">1</FONT><INPUT type="hidden" name="amount" value="1"> {if $product.distribution ne ""}{$lng.txt_product_downloadable}{/if} {/if} {/if} </TD></TR> <TR><TD colspan="2"> <INPUT type="hidden" name="mode" value="add"> {if $variants eq ''} {include file="customer/main/product_prices.tpl"} {/if} {if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)} {if $js_enabled} {if $smarty.get.pconf ne ""} <INPUT type="hidden" name="slot" value="{$smarty.get.slot}"> <INPUT type="hidden" name="addproductid" value="{$product.productid}"> {include file="buttons/button.tpl" button_title=$lng.lbl_pconf_add_to_configuration style="button" href="javascript:if (FormValidation()) `$ldelim`document.orderform.productid.value='`$smarty.get.pconf`';document.orderform.action='pconf.php';document.orderform.submit()`$rdelim`"} {/if} {if $product.forsale ne "B"} {include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"} {if $login ne "" and $active_modules.Wishlist ne ""} {include file="customer/add2wl.tpl"} {/if} {else} {$lng.txt_pconf_product_is_bundled} {/if} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_add_to_cart} {/if} {/if} {if $active_modules.Feature_Comparison ne ""} {include file="modules/Feature_Comparison/product_buttons.tpl"} {/if} </TD> </TR></TABLE> </TD> <TD align="right" valign="top" width="60"> {if $product.taxed_price gt 0 and $product.list_price gt 0 and $product.taxed_price lt $product.list_price}<TABLE border="0" width="60"><TR><TD width="55" height="56" class="SaveMoneyLabel" background="{$ImagesDir}/save_money.gif" align="center" valign="middle"> {math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount} <SPAN id="save_percent">{ $discount }</SPAN>% </TD></TR></TABLE>{/if} </TD> </TR> <INPUT type="hidden" name="productid" value="{$product.productid}"> <INPUT type="hidden" name="cat" value="{$smarty.get.cat|escape:"html"}"> <INPUT type="hidden" name="page" value="{$smarty.get.page|escape:"html"}"> </FORM> </TABLE> {/capture} {include file="dialog.tpl" title=$product.producttitle content=$smarty.capture.dialog extra="width=100%"} {/if} {include file="customer/main/send_to_friend.tpl" } {if $active_modules.Detailed_Product_Images ne ""} {include file="modules/Detailed_Product_Images/product_images.tpl" } {/if} {if $active_modules.Upselling_Products ne ""} {include file="modules/Upselling_Products/related_products.tpl" } {/if} {if $active_modules.Recommended_Products ne ""} {include file="modules/Recommended_Products/recommends.tpl" } {/if} {if $active_modules.Customer_Reviews ne ""} {include file="modules/Customer_Reviews/vote_reviews.tpl" } {/if} {if $active_modules.Product_Options ne '' && $product_options ne ''} <SCRIPT type="text/javascript" language="JavaScript 1.2"> check_options(); </SCRIPT> {/if}
Reply With Quote
  #29  
Old 07-07-2006, 07:28 PM
 
lannyg lannyg is offline
 

Member
  
Join Date: Jun 2006
Posts: 23
 

Default Hello

I think I have another mod against this file is why it's not the same. I'll do some back tracking. Thank you for your help
__________________
Version 4.0.18 [unix]
Reply With Quote
  #30  
Old 07-07-2006, 07:57 PM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default Re: Hello

Quote:
Originally Posted by lannyg
I think I have another mod against this file is why it's not the same. I'll do some back tracking. Thank you for your help

No problem

Good luck getting what you need accomplished!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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:18 AM.

   

 
X-Cart forums © 2001-2020