Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Category Product Result Pages


MerchantMilan

Recommended Posts

Posted

I tried searching both the forums and the contributions, but haven't found any solution to what I want to accomplish.

 

This is a little hard to describe, so please bear with me.

 

I have the main category "Crib Bedding" separated into four sub categories: All, Girl, Boy and Neutral. Each of those have many products in them. When a user clicks on any of the categories, it displays all of the sets on one page (each set then has it's own sub category with all of the individual items in the set that you can add to your cart).

 

My question is, is there a way to only display 10 or so products at once and have multiple results pages like the Product listings have? Again, if this is confusing, please ask questions and have me clarify. Thanks!

Posted

you should be able to do this in a similar manner to product listing using the split page result which uses this code

  $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');

 if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 </tr>
</table>
<?php
 }

 

This is for products but a similar one could be done for categories.

 

This is for categories and not products or have I gotten it wrong

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

Thanks for your reply, Steve. This is for the categories, you are correct about that. Where would I put this code at and would I need to modify this code at all to work with the categories instead of the products? Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...