X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Mod for subcategories in columns with descriptions and icons (https://forum.x-cart.com/showthread.php?t=3848)

waxtrax 09-12-2005 10:22 AM

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!

Wambli 10-13-2005 04:13 PM

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? :roll:

Arton 10-19-2005 06:33 AM

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

tabarsoft 10-26-2005 08:05 AM

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.

Terrybraley 10-28-2005 09:59 AM

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.

tabarsoft 11-04-2005 07:20 AM

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

finestshops 11-09-2005 10:58 AM

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.

tabarsoft 11-09-2005 11:16 AM

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.

Sonia 11-10-2005 12:45 PM

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

Arton 01-11-2006 08:29 AM

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


All times are GMT -8. The time now is 02:26 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.