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
  #51  
Old 12-15-2004, 01:14 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

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

Default

There is probably a way BUT it will affect how your webpages get crawled by the search engines. Surely there is a nice way to organise them rather than bogging down the navigation with multiple pages...
Reply With Quote
  #52  
Old 12-16-2004, 04:27 AM
 
QVS QVS is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 136
 

Default

nice one, cheers for the mod.....exactly what i was looking for.
__________________
xcart version 4.1.6
UK - Brighton

QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com

We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more.
Reply With Quote
  #53  
Old 12-17-2004, 04:18 AM
 
QVS QVS is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 136
 

Default

anyone know why the catagorys in columns 2,3,4 shift to the right?

any help would be great.

example: http://www.qvsdiscountelectrical.co.uk/qvsshop/home.php?cat=249

subcatagories.tpl

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"> <script language="JavaScript"> <!-- Hide script from older browsers document.write('<P ALIGN="CENTER">') document.write("<FORM>") document.write('<INPUT TYPE = "BUTTON" VALUE = "<-- Go Back" onClick="window.history.go(-1);">') document.write("</FORM>") document.write("</P>") //--> </script> {/if} { if %cat_num.index% is div by 4} <tr> {/if} <td align="center" valign="top"> { $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} <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="1">{ $subcategories[cat_num].category|escape }</font></a> </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" }
__________________
xcart version 4.1.6
UK - Brighton

QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com

We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more.
Reply With Quote
  #54  
Old 12-17-2004, 07:21 AM
 
Chris B Chris B is offline
 

eXpert
  
Join Date: Oct 2002
Posts: 226
 

Default

By default, the x-cart templates expand to the full size of your computer display settings. Therefore the table in which the categories are displayed expands to fit as well, leaving a lot of space between your category images.

In order to maintain consistent size viewable on most system settings, we generally set the width of the entire site to 760 pixels. This will allow you to left justify or center your cart also.

For example: http://www.uneedabirkenstock.com
This site is left justified as well as using the 3 column category layout.

To do this, modify the rectangle_top.tpl

from this:

Code:
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="100%" height="100%">

to this:

Code:
<TABLE align=center border=0 bgcolor="#FFFFFF" cellPadding=0 cellSpacing=0 width="760" bordercolor="#000000">

Depending on which version you are using there may be 2 instances of this table. (One for the customer end, and one for the administration section.)

I hope this helps...
Reply With Quote
  #55  
Old 12-26-2004, 04:41 AM
 
pcdoktorn pcdoktorn is offline
 

Member
  
Join Date: Dec 2004
Posts: 22
 

Default

Tried this in 4.0.9 and did paste in the code that was made for 4.0.8 and nothing changed at all on the page.Was there updates in categories.tpl that prevents this mod from working in 4.0.9 ?
__________________
Version 4.0.9
Reply With Quote
  #56  
Old 12-26-2004, 04:46 AM
 
pcdoktorn pcdoktorn is offline
 

Member
  
Join Date: Dec 2004
Posts: 22
 

Default

Please ignore my stupidity.
Did not know I had to change the welcome.tpl file.Works fine now
__________________
Version 4.0.9
Reply With Quote
  #57  
Old 12-31-2004, 07:37 AM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

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

Default

Hello guy,

I amd kind of confused now! amd her eis ther reason why.

I implemented this mod and is working properly displaying the Icon when the cart is in the dynamic part. whent the HTML catalog is created is displaying a broken link to the images.

I my case I move all the images and icons out of the DB and place the proper code on the .htaccess file so images and Icons will display properly.

I guess I am sure where the images should be place for the HTML to display it. below is the code

Code:
<td align="center" valign="top"> <a href="LADS_Competition_Latin-p-1-c-278.html"> [img]../icon.php?categoryid=278[/img]

if you like to see what is doing here is the link

http://www.ballroomdancingshoe.com/LADS_Competition-p-1-c-276.html

thank you in advance.

HAPPY NEW YEAR!!!!

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
  #58  
Old 12-31-2004, 10:04 AM
  adpboss's Avatar 
adpboss adpboss is offline
 

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

Default

RJC, I cannot understand your last post at all...
Reply With Quote
  #59  
Old 12-31-2004, 10:47 AM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

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

Default

What I am trying to say is the HTML catalog is not displaying the icons at all for the subcategories. The Dynamic cart show the Icons for the subcategories.

Look at the links and see.

http://www.ballroomdancingshoe.com/LADS_Competition-p-1-c-276.html

The above show the broken links.

http://www.ballroomdancingshoe.com/store/customer/home.php?cat=276

The above link shoes the Icons.

is that better?

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
  #60  
Old 12-31-2004, 11:06 AM
  adpboss's Avatar 
adpboss adpboss is offline
 

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

Default

Yup, got it now. LOL. The spelling and grammar was a little rough in the other post, I was getting confused.

Something is definitely wrong as I have this working on a 3.5 development no problem. The html cat pages should not be outputting icon.php but creating the actual http location of the images stored on your server.

These are just a couple of shot-in-the-dark ideas to check.

html_catalog.php, check the script array against the latest distribution (note i have included my code from an older version it could be different in the latest distro)
Code:
$php_scripts = array("search.php","giftcert.php","help.php", "cart.php", "product.php","register.php", "home.php", "pages.php", "pconf.php", "giftregs.php");

Check that your images location is set correctly in the database. Image-path in xcart-icons table. I have had a lot of troubles setting this properly.

Nice 404 page btw.

Good luck.
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 08:19 AM.

   

 
X-Cart forums © 2001-2020