Move Category Description (Relocate)?

Where or what file would I go to move my category description down below my items instead of being up on top… ?? Thanks in advance for everyones help…

You'd want to do skins/your-skin/customer/views/categories/view.tpl



The description is at the top. Just move the whole div to the bottom.



Thanks,



Brandon

Thanks Brandon, I tried that yet I get this error… Basically just wanting to move the description down to the bottom and remove the category images on the category pages…



Fatal error: Smarty error: [in views/categories/view.tpl line 50]: syntax error: mismatched tag {/if}. expected {/hook} (opened line 1). (Smarty_Compiler.class.php, line 2299) in /lib/templater/Smarty.class.php on line 1095

In 2.2.4, you should be able to change view.tpl to:


```php {hook name=“categories:view”}

{if $subcategories or $category_data.description || $category_data.main_pair}

{math equation=“ceil(n/c)” assign=“rows” n=$subcategories|count c=$columns|default:“2”}

{split data=$subcategories size=$rows assign=“splitted_subcategories”}






{if $subcategories}

{if $subcategories|@count < 6}

    {/if}
    {foreach from=$splitted_subcategories item="ssubcateg"}
    {if $subcategories|count >= 6}


      {/if}
      {foreach from=$ssubcateg item=category name="ssubcateg"}
      {if $category.category_id}
    • {$category.category}
    • {/if}

      {/foreach}
      {if $subcategories|count >= 6}


    {/if}
    {/foreach}
    {if $subcategories|count < 6}

{/if}

{/if}

{/if}
{if $smarty.request.advanced_filter}
{include file="views/products/components/product_filters_advanced_form.tpl" separate_form=true}
{/if}
{if $products}
{assign var="layouts" value=""|fn_get_products_views:false:0}
{if $category_data.product_columns}
{assign var="product_columns" value=$category_data.product_columns}
{else}
{assign var="product_columns" value=$settings.Appearance.columns_in_products_list}
{/if}

{if $layouts.$selected_layout.template}
{include file="`$layouts.$selected_layout.template`" columns=`$product_columns`}
{/if}
{if $category_data.description && $category_data.description != ""}
{$category_data.description|unescape}

{/if}
{elseif !$subcategories}

{$lang.text_no_products}


{/if}

{capture name="mainbox_title"}{$category_data.category}{/capture}
{/hook} ```

And for 3.0.x, you should be able to change view.tpl to:

```php {hook name="categories:view"}

{if $subcategories or $category_data.description || $category_data.main_pair}
{math equation="ceil(n/c)" assign="rows" n=$subcategories|count c=$columns|default:"2"}
{split data=$subcategories size=$rows assign="splitted_subcategories"}




{if $subcategories}

{if $subcategories|@count < 6}

    {/if}
    {foreach from=$splitted_subcategories item="ssubcateg"}
    {if $subcategories|count >= 6}


      {/if}
      {foreach from=$ssubcateg item=category name="ssubcateg"}
      {if $category.category_id}
    • {$category.category}
    • {/if}

      {/foreach}
      {if $subcategories|count >= 6}


    {/if}
    {/foreach}
    {if $subcategories|count < 6}

{/if}

{/if}

{/if}

{if $smarty.request.advanced_filter}
{include file="views/products/components/product_filters_advanced_form.tpl" separate_form=true}
{/if}

{if $products}
{assign var="layouts" value=""|fn_get_products_views:false:0}
{if $category_data.product_columns}
{assign var="product_columns" value=$category_data.product_columns}
{else}
{assign var="product_columns" value=$settings.Appearance.columns_in_products_list}
{/if}

{if $layouts.$selected_layout.template}
{include file="`$layouts.$selected_layout.template`" columns=`$product_columns`}
{/if}
{if $category_data.description && $category_data.description != ""}
{$category_data.description|unescape}

{/if}
{elseif !$subcategories}

{$lang.text_no_products}


{/if}


{capture name="mainbox_title"}{$category_data.category}{/capture}
{/hook} ```

Or, you could create a hook.

Does that help?

Thanks,

Brandon

Ok changed my files exactly how you have it for 2.2.4 and I don't get any errors… Yet it didn't change anything… And yes I cleared the cache… Templeate and browser… lol… Still shows the description at the top… So confused…



Tried changing it in /skins/basic/customer/views/categories… Also… Nothing… I'm not a total newbe… This shouldn't be this difficult…

If I were to take a guess, I'd say that you are using a hook somewhere since you are using images as your subcategories. You are either using the subcategory thumbnail addon or you are using what CS-Cart recommended.



I'd look for the hook and then make the change. DO NOT use the code I gave you above to change your hook. That would totally screw up your thumbnails. Just move the code where it needs to go, clear your cache, refresh and you will be good to go.



Thanks,



Brandon

Your good… I forgot I was using this …[url=“CS-Cart Documentation — CS-Cart 4.15.x documentation”] CS-Cart Documentation — CS-Cart 4.15.x documentation

Now lets see if I can get it to work… Thanks for your help…

OK… I think I'm almost there… I got the description showing at the bottom but when I delete the code from up top I get the errors…

Here is my code… What am I doing wrong… ?? Shouldn't I just be able to delete lines 4 and 5 ?



{if $subcategories or $category_data.description || $category_data.main_pair}
{split data=$subcategories size=$columns|default:"4" assign="splitted_subcategories"}
{math equation="floor(100/x)" x=$columns|default:"4" assign="cell_width"}
{if $category_data.description && $category_data.description != ""}

{$category_data.description|unescape}

{/if}

{foreach from=$splitted_subcategories item="scats"}

{foreach from=$scats item="category"}
{if $category}

{else}

{/if}
{/foreach}


{foreach from=$scats item="category"}
{if $category}

{else}

{/if}
{/foreach}

{/foreach}

{include file="common_templates/image.tpl" show_detailed_link=false object_type="subcategory" images=$category.main_pair no_ids=true class="cm-thumbnails" show_thumbnail="Y" image_width=$settings.Thumbnails.category_lists_thumbnail_width image_height=$settings.Thumbnails.category_lists_thumbnail_height}
 



 

{/if}
{if $smarty.request.advanced_filter}
{include file="views/products/components/product_filters_advanced_form.tpl" separate_form=true}
{/if}
{if $products}
{assign var="layouts" value=""|fn_get_products_views:false:0}
{if $category_data.product_columns}
{assign var="product_columns" value=$category_data.product_columns}
{else}
{assign var="product_columns" value=$settings.Appearance.columns_in_products_list}
{/if}
{if $layouts.$selected_layout.template}
{include file="`$layouts.$selected_layout.template`" columns=`$product_columns`}
{/if}
{if $category_data.description && $category_data.description != ""}
{$category_data.description|unescape}

{/if}
{elseif !$subcategories}

{$lang.text_no_products}


{/if}
{capture name="mainbox_title"}{$category_data.category}{/capture}

So if you remove:


```php {if $category_data.description && $category_data.description != “”}

{$category_data.description|unescape}

{/if} ```

From the top, you get an error? Hmm, strange.

Just try removing:

```php
{$category_data.description|unescape}
``` and leave the if statement and see if that does it.

Thanks,

Brandon

Or, try:


{if $subcategories or $category_data.description || $category_data.main_pair}
{split data=$subcategories size=$columns|default:"4" assign="splitted_subcategories"}
{math equation="floor(100/x)" x=$columns|default:"4" assign="cell_width"}


{foreach from=$splitted_subcategories item="scats"}

{foreach from=$scats item="category"}
{if $category}

{else}

{/if}
{/foreach}


{foreach from=$scats item="category"}
{if $category}

{else}

{/if}
{/foreach}

{/foreach}

{include file="common_templates/image.tpl" show_detailed_link=false object_type="subcategory" images=$category.main_pair no_ids=true class="cm-thumbnails" show_thumbnail="Y" image_width=$settings.Thumbnails.category_lists_thumbnail_width image_height=$settings.Thumbnails.category_lists_thumbnail_height}
 



 

{/if}
{if $smarty.request.advanced_filter}
{include file="views/products/components/product_filters_advanced_form.tpl" separate_form=true}
{/if}
{if $products}
{assign var="layouts" value=""|fn_get_products_views:false:0}
{if $category_data.product_columns}
{assign var="product_columns" value=$category_data.product_columns}
{else}
{assign var="product_columns" value=$settings.Appearance.columns_in_products_list}
{/if}
{if $layouts.$selected_layout.template}
{include file="`$layouts.$selected_layout.template`" columns=`$product_columns`}
{/if}
{elseif !$subcategories}

{$lang.text_no_products}


{/if}
{if $category_data.description && $category_data.description != ""}
{$category_data.description|unescape}

{/if}
{capture name="mainbox_title"}{$category_data.category}{/capture}




Thanks,



Brandon

Removing that

worked… Thanks again for all your help… Its nice to see that the forum is starting to get good support from other users…