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

Images won't show up after moving them...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-05-2007, 09:57 AM
 
laxelrod laxelrod is offline
 

Member
  
Join Date: Jan 2007
Posts: 24
 

Post Images won't show up after moving them...

So today I have tried to both put my subcategories into a multiple column layout and I have also tried to put my products detailed images into the product details section. When I make these changes the image no longer shows up and I get code like this:

Code:
[img]../product_image.php?imageid=997[/img]

Does anyone know why this is happening? I tried searching the forums and I couldn't find much, but maybe I didn't search hard enough. Could this have to do with my images being stored in the database? If so is there any easy way to transfer my images to the file server, I have hundreds of products on my website so far.

Thanks
__________________
Leah Axelrod
Speedway Distributors, Inc.
www.395caps.com
4.0.19
Reply With Quote
  #2  
Old 06-05-2007, 10:13 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Images won't show up after moving them...

You copied some code that has been corrupted. The forum was upgraded a while back and some of the image tags broke. Post the original image code that you used and I'll give you the correct code for the images.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 06-05-2007, 10:49 AM
 
laxelrod laxelrod is offline
 

Member
  
Join Date: Jan 2007
Posts: 24
 

Default Re: Images won't show up after moving them...

I tried to move the detailed image into the product description using the code from the following thread: http://forum.x-cart.com/viewtopic.php?t=2006.

I'm trying to find the code for the multiple columns of subcategories that I used and I will post that as soon as I find it.

Lesson learned: bookmark pages.
__________________
Leah Axelrod
Speedway Distributors, Inc.
www.395caps.com
4.0.19
Reply With Quote
  #4  
Old 06-05-2007, 10:59 AM
 
laxelrod laxelrod is offline
 

Member
  
Join Date: Jan 2007
Posts: 24
 

Default Re: Images won't show up after moving them...

For putting subcategories in multpile columns I found the following code:

Code:
{* $Id: subcategories.tpl,v 1.43.2.9 2006/06/27 08:22:01 svowl Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {if $active_modules.Special_Offers and $category_offers} <BR><BR> {include file="modules/Special_Offers/customer/category_offers_short_list.tpl"} {/if} {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}<BR><BR>{/if} {capture name=dialog} {assign var="tmp" value="0"} {section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {if $subcategories} <table cellspacing="5" width="100%" border="0"> <tr> {foreach from=$subcategories item=subcat} {if $tmp is div by 3} </tr><tr><td colspan="3"></td></tr><tr valign="top"> {/if} { if $tmp and $first_subcat ne "Y" } {assign var="tmp" value=0} {assign var="first_subcat" value="Y"} {/if} <td class="ColumnTitles" valign="top"><a title="{$subcat.description}" href="home.php?cat={ $subcat.categoryid }"><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_web_dir}/default_image.gif{/if}" alt="" align="middle" <br><left> <font class="ItemsList">{ $subcat.category|escape }</font></a> {if $config.Appearance.count_products eq "Y"} {/if} {assign var="tmp" value=$tmp+1} {/foreach} </table> {/if} {if $tmp and $products ne "" } <BR clear="left"> <HR size="1" noshade> {/if} {if $products} {if $sort_fields} <DIV align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="home.php?cat=`$cat`&"}</DIV> {/if} {if $total_pages gt 2} <BR> { include file="customer/main/navigation.tpl" } {/if} <BR> {include file="customer/main/products.tpl" products=$products} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"} {if $products eq ""} {if $f_products ne ""} <P> {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }

I no longer get the same code showing up I was getting before, I just get the "No Image Available" image instead of the subcategory images, so I'm assuming it is just pulling my images from the wrong place. If you could correct that, that would be great.

Thanks for your help.
__________________
Leah Axelrod
Speedway Distributors, Inc.
www.395caps.com
4.0.19
Reply With Quote
  #5  
Old 06-05-2007, 11:10 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Images won't show up after moving them...

Which thread did you pull that category column code from? That looks like the one for version 4.1...you want the one for 4.0:

http://forum.x-cart.com/showthread.php?t=3848&highlight=subcategories+icon s
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 06-05-2007, 11:36 AM
 
laxelrod laxelrod is offline
 

Member
  
Join Date: Jan 2007
Posts: 24
 

Default Re: Images won't show up after moving them...

Alright I found the original code I was using where I get the image coding instead of the image

Code:
{* $Id: subcategories.tpl,v 1.29 2002/11/26 14:55:13 alfiya Exp $ *} { include file="location.tpl" } {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} { include file="customer/main/navigation.tpl" } {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace:"/[\n]/":" "} {/if} {capture name=dialog} {assign var="tmp" value="0"} {section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {section name=cat_num loop=$subcategories} { if %cat_num.first% } <table border=0 cellspacing=5 width=100%> {/if} {if $smarty.section.cat_num.index is div by 2} </tr><tr valign="top"> {/if} <td valign="top" width="70" align="center"> <a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }"> [img]../icon.php?categoryid={$subcategories[cat_num].categoryid}[/img] </a> </td> <td align=left><a class="alt" href="home.php?cat={ $subcategories[cat_num].categoryid }"> {$subcategories[cat_num].category|escape}</a> { $categories[cat_num].description|escape } </td> { if %cat_num.last% } </tr></table> {/if} {/section} {if $tmp and $products ne "" } <br clear=_all>{*<hr size=1 noshade>*} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category|regex_replace:"/.*\//":"" content=$smarty.capture.dialog extra="width=100%"} {include file="customer/main/products.tpl" products=$products} {if $products eq ""} {if $f_products ne ""} {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }
__________________
Leah Axelrod
Speedway Distributors, Inc.
www.395caps.com
4.0.19
Reply With Quote
  #7  
Old 06-05-2007, 11:46 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Images won't show up after moving them...

I don't recommend that code for subcategories.tpl. Use this instead (make a backup of your current subcategories.tpl first):

Code:
{capture name=dialog} {if $current_category.description ne ""} {$current_category.description}<br>{/if} {assign var="tmp" value="0"} {section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {section name=cat_num loop=$subcategories} { if %cat_num.first% } <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> {/if} { if %cat_num.index% is div by 3} <tr> {/if} <td align="center" valign="top"> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> {if $subcategories[cat_num].icon_url}<img src="{$subcategories[cat_num].icon_url}" border="0" style="padding-bottom: 5px;">{else}<img src="{$xcart_web_dir}/default_icon.gif" border="0" style="padding-bottom: 5px;">{/if} </a><br> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> <span class="SubcategoryName">{$subcategories[cat_num].category|escape }</span></a><br> </td> { if %cat_num.last% } </tr> </table> {/if} {/section} {if $tmp and $products ne "" } {/if} {if $products} <br><hr size="1" noshade><br> {if $sort_fields} <DIV align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="home.php?cat=`$cat`&"}</DIV> {/if} {if $total_pages gt 2} <br> { include file="customer/main/navigation.tpl" } {/if} {include file="customer/main/products.tpl" products=$products} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"} {if $f_products ne ""} <br> {include file="customer/main/featured.tpl"} {/if} { include file="customer/main/navigation.tpl" }
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 06-05-2007, 11:53 AM
 
laxelrod laxelrod is offline
 

Member
  
Join Date: Jan 2007
Posts: 24
 

Default Re: Images won't show up after moving them...

I tried it...still no images. now nothing shows above the category names though, not even the image code.
__________________
Leah Axelrod
Speedway Distributors, Inc.
www.395caps.com
4.0.19
Reply With Quote
  #9  
Old 06-05-2007, 12:16 PM
 
laxelrod laxelrod is offline
 

Member
  
Join Date: Jan 2007
Posts: 24
 

Default Re: Images won't show up after moving them...

And of course I was stupid and way earlier I had saved my subcategory.tpl but I must have saved something over it so...I'm pretty sure my original one is gone. So I lost my subcategory images totally.
__________________
Leah Axelrod
Speedway Distributors, Inc.
www.395caps.com
4.0.19
Reply With Quote
  #10  
Old 06-05-2007, 12:17 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Images won't show up after moving them...

Ok, a few questions:

1. Are your images in the filesystem?

2. Do you have images assigned to all sub-cats?

3. Have you made any modifications to any php files trying to get this to work?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
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 04:55 AM.

   

 
X-Cart forums © 2001-2020