Jump to content

View Sub-Category Products on Category Page


Guest holney

Recommended Posts

Guest holney

Hi All

On a parent category page, I'd like to show all products in that category organised into sub-categories, e.g.

CLOTHING

Jumpers

Jumper 1

Jumper 2

Shirts

Shirt 1

Shirt 2

I found a mod that does exactly what I want but unfortunately only for version 3:

http://bloke.org/php/cubecart-mod-show-sub...-category-page/

In viewCat.tpl I'm using this to list my categories:

<!-- BEGIN: sub_cats -->

	<div id="SubCategories">

		<!-- BEGIN: sub_cats_loop -->

		<div class="subCat">

			<a href="index.php?_a=viewCat&amp;catId={TXT_LINK_CATID}" title="{TXT_CATEGORY}">{TXT_CATEGORY}</a> ({NO_PRODUCTS})

		</div>

		<!-- END: sub_cats_loop -->

	</div>

	<br clear="all" />

	<!-- END: sub_cats -->




And I'm using this to show thumbnails of all my products:




	<!-- BEGIN: productTable -->

		<!-- BEGIN: products -->

		<a href="index.php?_a=viewProd&amp;productId={PRODUCT_ID}" title="{TXT_TITLE}" target="_self"><img src="{SRC_PROD_THUMB}" alt="{TXT_TITLE}" border="0" class="catimage" /></a>

		<!-- END: products -->

	<!-- END: productTable -->

I basically want to nest the products loop in the sub-categories loop. I tried this but nothing displayed.

Is this possible?

Many thanks in advance

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...