Zen Cart Logo
Forums / General Questions / How to Seperate New General Documents from New Products ?

How to Seperate New General Documents from New Products ?

Views: 897

Results 1 to 5 of 5
25 Jul 2011, 5:54 AM
#1
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

How to Seperate New General Documents from New Products ?

Is it possible to Separate New Documents from New Products in the New Products listing option ? When I list new products, it's also listing new Document General items, that I don't want listed along with new products, as they clutter up the actual new products list.

26 Jul 2011, 5:03 PM
#2
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

Re: How to Seperate New General Documents from New Products ?

V 1.39h

I gather it might be a limitation of the ZenCart search function, unless it can be switched off to ignore Document General.

26 Jul 2011, 5:21 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to Seperate New General Documents from New Products ?

You could customize the SELECT statements to exclude the products_type that you do not want included on New Products ...

For example, in the:
/includes/modules/pages/products_new/header_php.php

  $products_new_query_raw = "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price,
                                    p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model,
                                    p.products_quantity, p.products_weight, p.product_is_call,
                                    p.product_is_always_free_shipping, p.products_qty_box_status,
                                    p.master_categories_id
                             FROM " . TABLE_PRODUCTS . " p
                             LEFT JOIN " . TABLE_MANUFACTURERS . " m
                             ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd
                             WHERE p.products_status = 1
AND p.products_type != 3
                             AND p.products_id = pd.products_id
                             AND pd.language_id = :languageID " . $display_limit . $order_by;

Add the code in RED to exclude the General Document Products from the New Products page ...

Then, work you way through the code for the New Products Centerbox and Sidebox ...

29 Jul 2011, 4:22 PM
#4
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

Re: How to Seperate New General Documents from New Products ?

Ahh ok thanks. I will give it a try. Can I apply this as an override ? rather than editing the original code ?

29 Jul 2011, 5:04 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to Seperate New General Documents from New Products ?

Not on that particular file ... but you could on the New Products module and New Products sidebox ...