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
  #101  
Old 09-12-2005, 10:22 AM
 
waxtrax waxtrax is offline
 

Member
  
Join Date: Jan 2005
Posts: 19
 

Default

NM Got it to work!!

I'm an idiot.. total user error on my part. I got things up and running now.

Thanks for your help!
__________________
chris.
x-cart ver 4.0.12
unix
Reply With Quote
  #102  
Old 10-13-2005, 04:13 PM
 
Wambli Wambli is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 52
 

Default Description text

Great Mod!! Well done just one thing I put my text in the Description: field and it doesn't show on my website any one know why?
__________________
Christmas
x-cart 4.1.6
Reply With Quote
  #103  
Old 10-19-2005, 06:33 AM
 
Arton Arton is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: UK
Posts: 36
 

Default

Hi Guys,

I just got the Dynamic SEO-Friendly URLs from SafetyNet Web thanks Hooter and I 'm using the Fashion Mosaic on a new shop 4.0.16

So the question is, has anyone got an example with subcategories in a 3 column layout with an image for each sub-cat with name and product count below the image, using the above mod?

Thanks

Arton
__________________
X-Cart gold 4.5.4
Reply With Quote
  #104  
Old 10-26-2005, 08:05 AM
 
tabarsoft tabarsoft is offline
 

Advanced Member
  
Join Date: Sep 2005
Location: Montrц╘al, Canada
Posts: 31
 

Default

Thanks for your mod Anton

It didn't work for me until I used Jason mod.
Quote:
Originally Posted by jdiehl
If you look at the file /*xcart_dir*/include/categories.php you will find on lines 74-78 (in version 4.0.12 at least) the code that looks like this:

Code:
if ($short_list) { $to_search = "$sql_tbl[categories].categoryid,$sql_tbl[categories].parentid, $sql_tbl[categories].categoryid_path,$sql_tbl[categories].category, $sql_tbl[categories].product_count,$sql_tbl[categories].avail,$sql_tbl[categories].description,$sql_tbl[categories].order_by"; } else { $to_search = "$sql_tbl[categories].*"; }
... for the first "$to_search =" statement above just add ,$sql_tbl[categories].description between the quotes at the end....

On my version, instead of
Code:
{section name=cat_num loop=$subcategories}
I had
Code:
{foreach from=$subcategories item=subcat}.
My subcategories listing is single column.
So I put
Code:
{$subcat.description|escape}
instead of
Code:
{ $categories[cat_num].description|escape }
and its working fine now.
__________________
x-cart gold 4.0.15
Reply With Quote
  #105  
Old 10-28-2005, 09:59 AM
  Terrybraley's Avatar 
Terrybraley Terrybraley is offline
 

Senior Member
  
Join Date: Oct 2005
Location: Atlanta Georgia
Posts: 142
 

Default Work great but,,,

I love how this works, but for some reason it is displaying the catagory and subcatagory words twice.

Company Name : T-Shirts
Comapny Name : T-Shirts

up top.
__________________
Road Rash Apparel LLC
www.roadrashapparel.com

X-Cart Gold Ver.4.1.8
DSEFU Mod
PHP 4.3.11
MySQL server 4.1.22-max-log
MySQL client 5.0.18
Web server Apache
Operation system Linux
Perl 5.008
XML parser (expat) 1.95.6
Reply With Quote
  #106  
Old 11-04-2005, 07:20 AM
 
tabarsoft tabarsoft is offline
 

Advanced Member
  
Join Date: Sep 2005
Location: Montrц╘al, Canada
Posts: 31
 

Default Language issues

I've finaly been able to get my description to show.
Except that it will only show the default language.

Here's my working code with the default language
Code:
{foreach from=$subcategories item=subcat} <tr> <TD width="70" align="center" valign="top" bgcolor="#FFFFFF" style="padding:3px 3px 5px 3px">[img]{$xcart_web_dir}/icon.php?categoryid={ $subcat.categoryid }[/img] </td> <td valign="top" style="padding:10px 3px 5px 3px" bgcolor="#E6E7DB"><A href="home.php?cat={ $subcat.categoryid }"><FONT class="ProductTitle"> {$subcat.category|escape } </FONT></A> <div class="Productlist"> /******* description here******/ {$subcat.description|regex_replace:"/[\n]/":" "} {if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products|lower} {elseif $subcat.subcategory_count > 1} {$subcat.subcategory_count } {$lng.lbl_categories|lower} {else} { $subcat.subcategory_count } {$lng.lbl_categorie|lower} {/if} {/if} </div></TD> </TR> <tr> <td bgcolor="#ffffff"></td> <td bgcolor="#B8BC97">[img]{$ImagesDir}/spacer.gif[/img]</td> </tr> <tr> <td bgcolor="#ffffff" ></td> <td align="right" bgcolor="#E6E7DB"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td>[img]{$ImagesDir}/plus_details.gif[/img]</td> <td background="{$ImagesDir}/pix_plus.gif">{$lng.lbl_see_details}</td> <td>[img]{$ImagesDir}/right_plus.gif[/img]</td> </tr> </table></td> </tr> <tr> <td bgcolor="#B8BC97" colspan="2">[img]{$ImagesDir}/spacer.gif[/img]</td> </tr> {/foreach}

What do I have to change to get the description to show in all the language?

I've tried with no success
Code:
{$subcat.lng.description|regex_replace:"/[\n]/":" "}
Code:
{$lng.subcat.description|regex_replace:"/[\n]/":" "}

Is there something else I have to modify in categories.php?

Martin
__________________
x-cart gold 4.0.15
Reply With Quote
  #107  
Old 11-09-2005, 10:58 AM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default Re: Language issues

Quote:
Originally Posted by tabarsoft
I've finaly been able to get my description to show.
Except that it will only show the default language.

Hey Martin,

Try this for include/categories.php (backup your existing file, I did not have a chance to test it):

Code:
did not work, will update


Let me know if this one did not help.
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
Reply With Quote
  #108  
Old 11-09-2005, 11:16 AM
 
tabarsoft tabarsoft is offline
 

Advanced Member
  
Join Date: Sep 2005
Location: Montrц╘al, Canada
Posts: 31
 

Default

Still no luck!!!!

What part did you change maybe i'll see somethings.

It doesnt make any sense! Every othe part of you mod shows in the wright language.
__________________
x-cart gold 4.0.15
Reply With Quote
  #109  
Old 11-10-2005, 12:45 PM
 
Sonia Sonia is offline
 

Advanced Member
  
Join Date: Feb 2005
Posts: 72
 

Default

Quote:
Originally Posted by Arton
has anyone got an example with subcategories in a 3 column layout with an image for each sub-cat with name and product count below the image, using the above mod?

I didn't see an answer for this, and I just figured it out, so I thought I would share in case others want it too. I used WECKS change to the subcategories.tpl file posted here: http://forum.x-cart.com/viewtopic.php?p=78344#78344. To change the format to 3 columns I did the following:

on line 21 I changed this bit from:
Code:
{ if %cat_num.index% is div by 2}
to
Code:
{ if %cat_num.index% is div by 3}

Just so it looked better, on line 24, within the <TD> tags, I added width="33%".

I couldn't believe it was so simple. :P
__________________
Sonia

www.vidaville.com
Xcart Gold 4.0.16
platform - Windows
Reply With Quote
  #110  
Old 01-11-2006, 08:29 AM
 
Arton Arton is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: UK
Posts: 36
 

Default

Hi Guys,

Sorry for asking again but I'm still looking for this mod.

I have got the Dynamic SEO-Friendly URLs from SafetyNet Web thanks Hooter and I 'm using the Fashion Mosaic on a new shop 4.0.16

So the question is, has anyone got an example with subcategories in a 3 column layout with an image for each sub-cat with name and product count below the image, using Dynamic SEO-Friendly URLs from SafetyNet Webs mod?

Thanks

Arton
__________________
X-Cart gold 4.5.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:44 AM.

   

 
X-Cart forums © 2001-2020