Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can oscommerce show a specific category products in the homepage?


johnduo0007

Recommended Posts

I know you can show the whats_new.php, but I was wondering if you can show products from only a specific category were the products are random from that category.

I've got the same question up today, so let each other know if we get an answer... :)

Good luck

Link to comment
Share on other sites

I've got the same question up today, so let each other know if we get an answer... :)

Good luck

 

No help yet. I think we are going to have to create the code ourselfs, I will try, but I doubt I will be able too :blink:

 

What I wanted to do is have 2 products from each of my category show up in my hompage

Link to comment
Share on other sites

And have you searched the addon section already? Say using the keyword Featured?

 

I have installed Featured products, but my client wants to feature products like this website: http://www.impresion-directa.com/b2c/index.php

 

2 or 3 products from each category with the category title on top. I don't think this is an oscommerce website but this is what Im looking for.

 

http://www.impresion-directa.com/b2c/index.php

Link to comment
Share on other sites

I have installed Featured products, but my client wants to feature products like this website: http://www.impresion-directa.com/b2c/index.php

 

2 or 3 products from each category with the category title on top. I don't think this is an oscommerce website but this is what Im looking for.

 

http://www.impresion-directa.com/b2c/index.php

 

 

I've search to see if there are any contributions like this, but I didn't see any. Anyway will the coding me very difficul to feature different products from each category on the hompage like in the website http://www.impresion-directa.com/b2c/index.php

Link to comment
Share on other sites

  • 2 weeks later...

Found help to open home page with a category finally.

Jim suggested the below, and it worked great for me...

 

MAKE A BACKUP OF THIS FILE BEFORE MAKING ANY EDITS.

 

At the top of your /catalog/index.php find this code:

 

CODE
// the following cPath references come from application_top.php
 $category_depth = 'top';
 if (isset($cPath) && tep_not_null($cPath)) {

Change it to something like this:

CODE
// the following cPath references come from application_top.php
 $category_depth = 'top';

//
// beginning of added code:
//

 if ( ! isset($cPath) || ($cPath=='') ) {
$cPath_array[0] = 21;
$cPath = 21;
$current_category_id = 21;
 }

//
// end of added code
//

 if (isset($cPath) && tep_not_null($cPath)) {

I used the number 21 as an example.

 

You'd need to replace that number with the number of the category it is that you wish to open.

 

BE SURE TO USE THE SAME NUMBER ON ALL THREE LINES!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...