Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to make 2 different product listings


steefking

Recommended Posts

Posted

Hello,

 

I'm searhing for a way to have an other product_listing.php for a specific category. The reason why i want this, is because i want 1 group to be different from the rest of the site.

 

But i haven't found any thing yet. But i found one thing below:

 

if ( $select_str['categories_name'] == "3232"){
require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING2);
} else {
require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
}

 

This should work on index.php. But i can't get it working. Maybe it must not point to categories_name and to something else.

 

So basiclly i'm looking for a way to have 1 main group to be different from the other groups.

 

Thanks,

 

Steven

Posted

Any solution yet?

 

Maybe i have to change categories_name to categories_id. But that didn't work yet

 

Other thing is maybe to make something out of the contrubition thema_boxes. But i don't know how.

 

Greetings,

 

Steven

Posted

*maybe*

 

if ($current_category_id == 3232){

require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING2);

} else {

require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);

}

Matt

Posted

Yes, great and thanks.

 

That did do what i want.

 

Now a other problem. I want online this main categorie and all it's sub-categories to be this listing style. So what i have done is:

 

if ($current_category_id >= 3232){

require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING2);

} else {

require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);

}

 

But when i make a new main-group, this one will also use this product_listing because it is higer than this number.

 

Second thing is that i also want a different product_info.php for only this group.

 

Maybe a difficult thing to do, to make the group totally different from the rest of the site. But customers must also be able to order from here and from the other "normal" groups. The reason why i want this, is because this group has products with other delivery time, cost and stock. It are products which we have in stock for a short time, and it takes long before we have stock agian. It must also be a order list without images so the site is quicker in the search of this group.

 

So i want a lot, but i appreciate any help with it

 

Greeting,

 

Steven

Posted

Try this so that you can specify which categories you want it to show on-

 

if (($current_category_id == 24) || ($current_category_id == 27) || ($current_category_id == 29)) {

 

instead of-

 

if ($current_category_id >= 3232){

 

Make sure you replace the numbers so they match your category ids.

 

If you want a separate product_info for them as well you should copy and save product_info.php to be product_info2.php and make whatever alterations you need to that file. Then in FILENAME_PRODUCT_LISTING2 change every reference of FILENAME_PRODUCT_INFO to FILENAME_PRODUCT_INFO2. THEN in includes/filenames.php add this right before the last ?>

 

define('FILENAME_PRODUCT_INFO2', 'product_info2.php');

 

Let me know how it works!

 

Matt

Matt

Posted

Thanks again

 

The groupnumber problem have been solved by this.

 

The product_info works, but not perfectly. Problem is that it points no longer to the group product. So what you get is a product_info.php2 with all the details of the product, but out of the group. So you get: Home > product_info2.php, instead of Home > Main group > Subgroup > product.

 

Other problem is when you search the product, the customer comes out by product_info.php. And that is not what you want. And ofcourse bestsellers and other modules will point to product_info.php instead of product_info2.php

 

But we are getting closer to a solution.

 

Greeting,

 

Steven

Posted

I think that what i want is only possible for the whole site. But a managed to have a different product listing. So we stuck to that for now.

 

But when you have a suggestion, i have all ear to it.

 

Greeting,

 

Steven

Posted

the best way to modify the database and store the information about the style of listing, using this information you can get for every category different listing style.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted

the best way to modify the database and store the information about the style of listing, using this information you can get for every category different listing style.

 

That sounds good. But do you know how, or were i can find more about it.

 

Greetings,

 

Steven

Archived

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

×
×
  • Create New...