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

Detailed Product Images Popup on Thumbnail click.

 
Closed Thread
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #71  
Old 04-14-2004, 12:47 AM
  enge919's Avatar 
enge919 enge919 is offline
 

Senior Member
  
Join Date: May 2003
Posts: 141
 

Default

Seems no matter what I do, in 3.5.4 wether or not there is a detailed image avaliable the link is always active to "click here for detailed image" and will just popup a blank if no image. I have gone through this post but cant figure out how to have the link disabled if there are no detailed images avaliable. maybe it's just tooooooo late but any suggestions will help.
__________________
Web site design - Custom Programming - Upgrades - Marketing
www.netvisionwebdesign.com

Follow on twitter: http://twitter.com/netvisionweb
Become a fan on Facebook: http://www.facebook.com/pages/NetVision-Web-Design/89463493419
  #72  
Old 04-14-2004, 05:16 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default


Use this code instead, I've added an additiona condition && $images.

This should do the trick.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
  #73  
Old 04-14-2004, 09:04 AM
  enge919's Avatar 
enge919 enge919 is offline
 

Senior Member
  
Join Date: May 2003
Posts: 141
 

Default

Thanks Boomer, works perfectly!
__________________
Web site design - Custom Programming - Upgrades - Marketing
www.netvisionwebdesign.com

Follow on twitter: http://twitter.com/netvisionweb
Become a fan on Facebook: http://www.facebook.com/pages/NetVision-Web-Design/89463493419
  #74  
Old 04-24-2004, 09:51 AM
 
qualidog qualidog is offline
 

Newbie
  
Join Date: Feb 2004
Location: Germany
Posts: 8
 

Default Does This still work?

Hi boomer,

Does this still work? I am using Version 3.4.14

Thanks,

Brian
  #75  
Old 04-24-2004, 09:59 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Yup, I suppose I should put this up on cart-lab.com under freebies.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
  #76  
Old 04-24-2004, 11:14 AM
 
qualidog qualidog is offline
 

Newbie
  
Join Date: Feb 2004
Location: Germany
Posts: 8
 

Default 404 File Not Found

Hi Boomer,


I have read all the comments but I still can't get the picture to show up. I get the window but a 404 message.

I have detailed images in modules activated. File is under xcart/customer/

Is this ok? Thanks for the help.
Code:
{* $Id: product.tpl,v 1.70.2.6 2003/11/03 14:38:06 mclap Exp $ *} {literal} <SCRIPT language=JavaScript1.2> <!-- function productimagedetail(product_id) { var w = "420"; //width var h = "420"; //height window.open('customer/product_detailed_images.php?productid='+product_id,"detailedproduct","width="+w+",height="+h+",resizable,scrollbars=yes"); } --> </SCRIPT> {/literal} {literal} <SCRIPT language=JavaScript1.2> <!-- var store_language='{/literal}{$store_language}{literal}'; function product_option(name_of_option) { {/literal} for(i=0; i<{$product_options_count|default:"0"}; i++) if (document.orderform[i].name.search(name_of_option) != -1) return document.orderform[i]; return -1; {literal} } function FormValidation() { {/literal} {if $javascript_code} {$javascript_code} return false; {else} return true; {/if} {literal} } --> </SCRIPT> {/literal} { include file="location.tpl" } {capture name=dialog} <table border=0 width=100%> <form name=orderform method=post action="cart.php?mode=add"> <tr> <td valign=top align=left rowspan=2 width=100> {if $active_modules.Detailed_Product_Images ne "" && $images}{/if}{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product}{if $active_modules.Detailed_Product_Images ne "" && $images}{/if} </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>{if $product.avail gt 0}{$product.avail}{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>{$product.weight} {$config.General.weight_symbol}</td></tr>{/if} {if $active_modules.Extra_Fields ne ""} {include file="modules/Extra_Fields/product.tpl"} {/if} {if $active_modules.Subscriptions ne "" and $subscription} {include file="modules/Subscriptions/subscription_info.tpl"} {else} <tr><td class=ProductPriceConverting>{$lng.lbl_price}:</td> <td> {if $product.price ne 0} <font class=ProductDetailsTitle>{include file="currency.tpl" value=$product.price}</font><font class=MarketPrice> {include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.price}</font>{if $config.Taxes.use_vat eq "Y" and $product.vat gt "0"}, {$lng.lbl_including_vat} {$product.vat}%{/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)} {$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=0} {/if} {math equation="min(maxquantity+minamount, productquantity)+1" assign="mq" maxquantity=$config.Appearance.max_select_quantity minamount=$product.min_amount productquantity=$product.avail} {/if} {if $product.distribution eq ""} <select name=amount> {if $product.min_amount le 1} {assign var="start_quantity" value=1} {else} {assign var="start_quantity" value=$product.min_amount} {/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} <font class=ProductDetailsTitle>1</font><input type=hidden name=amount value=1> {$lng.txt_product_downloadable} {/if} {/if} </td></tr> <tr><td colspan=2> <input type=hidden name=mode value=add> {include file="customer/main/product_prices.tpl"} {if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)} {if $js_enabled} {include file="buttons/add_to_cart.tpl"} {if $login ne "" and $active_modules.Wishlist ne ""} {include file="customer/add2wl.tpl"} {/if} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_add_to_cart} {/if} {/if} <input type=image src="{$ImagesDir}/null.gif" width=10 height=10 border=0 align=top> </td> </tr></table> </td> <td align=right valign=top width=60> {if $product.list_price gt 0 and $product.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.price lprice=$product.list_price format="%d" assign=discount} { $discount }% </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 $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}
  #77  
Old 04-24-2004, 11:47 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Code:
window.open('../customer/product_detailed_images.php?productid='+product_id,"detailedproduct","width="+w+",height="+h+",resizable,scrollbars=yes");

Update this part of the code, I've added ../ to the path to product_detailed_images.php so it will also work on HTML catalog generations. If not try hard setting the absolute path of the php file.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
  #78  
Old 04-25-2004, 06:10 AM
 
qualidog qualidog is offline
 

Newbie
  
Join Date: Feb 2004
Location: Germany
Posts: 8
 

Default Super!!!

Excellent worked like a charm.

Thank you very much!
  #79  
Old 05-02-2004, 10:11 PM
 
Donne Giovani Donne Giovani is offline
 

Member
  
Join Date: Nov 2002
Posts: 27
 

Default Very Cool Popup Mod - Take a Look!!!!

Hey guys -

Take a look at the following URL -

http://www.angelacarol.com/customer/product.php?productid=547

I have tried to get this to work and I got the images to show up, but I can not get them to link to the specific image.

Can someone help me with this?

Thanks so much,

David Young
  #80  
Old 05-03-2004, 07:29 AM
 
Donne Giovani Donne Giovani is offline
 

Member
  
Join Date: Nov 2002
Posts: 27
 

Default Nevermind, I got it...

Guys -

Nevermind.

I got it to work.

Thanks,

David Young
Closed Thread
   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 09:25 PM.

   

 
X-Cart forums © 2001-2020