Jump to content

Add categories to former sitemap tab on menu


Recommended Posts

sorry i am brand new to all this. let me try to be clear.

i have a menu at the top of my site like with any retail site: Home, Cart, Account, Products, contact. (products used to say sitemap until i changed it) When you click the "products" tab it directs you to a sitemap.php file. however i want the file contents of categories.tpl to appear instead when you click "products." Is there a way I can make this work?

here is the categories.tpl code:

{include file=$tpl_dir./breadcrumb.tpl}
{include file=$tpl_dir./errors.tpl}

{if $category->id AND $category->active}

{$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if}

{if $scenes}
<!-- Scenes -->
{include file=$tpl_dir./scenes.tpl scenes=$scenes}
<!-- Category image -->
{if $category->id_image}
getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" />

{if $category->description}

{if isset($subcategories)}
<!-- Subcategories -->


{if $products}
{include file=$tpl_dir./product-sort.tpl}
{include file=$tpl_dir./product-list.tpl products=$products}
{include file=$tpl_dir./pagination.tpl}
{elseif !isset($subcategories)}

{l s='There is no product in this category.'}

{elseif $category->id}

{l s='This category is currently unavailable.'}


and here is the sitemap.php




$nbProducts = intval(Product::getNewProducts(intval($cookie->id_lang), isset($p) ? intval($p) - 1 : NULL, isset($n) ? intval($n) : NULL, true));

'products' => Product::getNewProducts(intval($cookie->id_lang), intval($p) - 1, intval($n), false, $orderBy, $orderWay),
'nbProducts' => intval($nbProducts)));




[1]: http://i.imgur.com/0GCZq.jpg


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More