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

Mod for subcategories in columns with descriptions and icons

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #61  
Old 01-01-2005, 06:39 AM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

X-Adept
  
Join Date: Jun 2004
Location: Alabama,U.S.A
Posts: 503
 

Default

Adpboss

Thank you for your help. I went and look at my html_catalog.php and here is the line from my php.

Code:
$php_scripts = array("search.php","giftcert.php","help.php", "cart.php", "product.php","register.php", "home.php", "pages.php", "pconf.php", "icon.php");


I went I look at the subcategories.tpl and I think the line of code below is the one that is producing the broken links and I do not know how to fix it.

Code:
[img]../icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]

My Icons are in the File System and in that folder I have the .htaccess file with "Access from all"

THank you for the kuddos on the 404 page.

Thank you for all your help


Kind regards,
Ricky
__________________
X-CART Gold version 4.0.14 & 4.1.11
Apache Version 1.3.29 (Unix)
EWDHosting-Quality X-cart Hosting
We will always sell you the right shoe and the left one is free.
Reply With Quote
  #62  
Old 01-01-2005, 07:57 AM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

http://www.ballroomdancingshoe.com/store/icon.php?categoryid=277

on php page

http://www.ballroomdancingshoe.com/icon.php?categoryid=277

on html page

see the problem?

How did you generate this catalog in the site root?
Reply With Quote
  #63  
Old 01-01-2005, 10:43 AM
 
hooter hooter is offline
 

X-Adept
  
Join Date: Dec 2004
Posts: 519
 

Default

Quote:
Originally Posted by rjcbear
My Icons are in the File System and in that folder I have the .htaccess file with "Access from all"

Not sure if this is related but your .htaccess file should read:
Allow from All
__________________
Blog for X-Cart | Ebay Auction Manager
Reply With Quote
  #64  
Old 01-01-2005, 03:19 PM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

X-Adept
  
Join Date: Jun 2004
Location: Alabama,U.S.A
Posts: 503
 

Default

Adpboss,

I see the difference now between them. I guess I will have to find a way to put an IF stament in the tpl so It will get executed only for the html_catalog.php to correct that little problem.

Quote:
How did you generate this catalog in the site root?

Yes the catalog is generated in the root of my syte.

Thank you Adpboos for all your help.

Quote:
Not sure if this is related but your .htaccess file should read:
Allow from All

Sorry my mistake the line in my .htacess is "Allow" not "Access"


Kind regards,
Ricky
__________________
X-CART Gold version 4.0.14 & 4.1.11
Apache Version 1.3.29 (Unix)
EWDHosting-Quality X-cart Hosting
We will always sell you the right shoe and the left one is free.
Reply With Quote
  #65  
Old 01-03-2005, 09:13 AM
 
Chris B Chris B is offline
 

eXpert
  
Join Date: Oct 2002
Posts: 226
 

Default category pagination

Since we have so many sub categories, is there a method to display only 10 on a page and then have a "next" and "previous" button?

I'm still stuck with this issue using this modification... Any Ideas?
Reply With Quote
  #66  
Old 01-10-2005, 04:15 PM
 
johnwhdavies johnwhdavies is offline
 

Member
  
Join Date: Dec 2004
Posts: 20
 

Default Quick Question

Great Stuff by the way!!!

My Question is, How can I get it to display without all the images and just like this, http://www.gamehead.com.au/home.php?cat=260

Thanks

John
__________________
John Davies

X-Cart version 4.0.9
X-AOM: 4.0.9
X_RMA: 4.0.9
PHP 4.3.10
MySQL server 4.0.18
Operation system Linux

http://www.predeploy.com
Reply With Quote
  #67  
Old 01-10-2005, 07:44 PM
 
Chris B Chris B is offline
 

eXpert
  
Join Date: Oct 2002
Posts: 226
 

Default

To eliminate the image, change the following code:


Code:
<a href="home.php?cat={ $subcategories[cat_num].categoryid }"> [img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]</a>


to

Code:
[img]{$ImagesDir}/spacer.gif[/img]

This will keep a 100 pixel clear image within the <td> </td>and keep a consistant format.
Reply With Quote
  #68  
Old 01-13-2005, 03:16 PM
 
zilker zilker is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 89
 

Default

I tried using the mod that grimsot posted on page 3 but I'm not having any luck. I have 4.0.6 installed on this site.

Here is my subcategories.tpl code:

Code:
{* $Id: subcategories.tpl,v 1.43.2.2 2004/10/07 07:08:51 max Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {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} {* ==================== Sub categories mod start *} {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 2} <tr> {/if} <td align="center" valign="top"> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> [img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]</a> <a href="home.php?cat={ $subcategories[cat_num].categoryid }"> <font size="3">{ $subcategories[cat_num].category|escape }</font></a> { $subcategories[cat_num].description|escape } {if $config.Appearance.count_products eq "Y"} {if $subcategories[cat_num].product_count} ({ $subcategories[cat_num].product_count } Products) {elseif $subcategories[cat_num].subcategory_count} ({ $subcategories[cat_num].subcategory_count } Subcategories) {/if} {/if} </td> { if %cat_num.last% } </tr> </table> {/if} {/section} {* ==================== Sub categories mod end *} {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} { include file="customer/main/navigation.tpl" } {/if} <HR size="1" width="100%"> {include file="customer/main/products.tpl" products=$products} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_man} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"} {if $products eq ""} {if $f_products ne ""} {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }

Here is what it's outputting:

http://www.puttinggreensturf.com/home.php?cat=248

Does anyone know why it's not listing the description under the category name?
__________________
~zilker

uummm...perhaps you should tell me again.

http://www.designertrends.com
Version 4.0.6
Unix
Reply With Quote
  #69  
Old 01-21-2005, 09:37 AM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

Is it possible to modify the subcategories.tpl file to include a "blurb" at the top of each category page (mostly for Search Engine Optimization purposes)? And then underneath that is the subcategories displayed as has been discussed in this post.

The trick is to be able to have a different "blurb" at the top of each page...

My fingers are crossed that someone knows how to do this!

Jennifer

P.S. If you're not familiar with what a "blurb" is, all I mean is a paragraph of text.
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #70  
Old 02-08-2005, 02:46 PM
 
balinor balinor is offline
 

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

Default

You could fill in the category description on the edit categories page, and it will show up as that 'blurb'
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
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 11:29 PM.

   

 
X-Cart forums © 2001-2020