Forums / Templates, Stylesheets, Page Layout / Eliminating Category from New Products ... How?

Eliminating Category from New Products ... How?

Locked

Views: 2,157

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
19 May 2006, 12:09 AM
#1
raskayu avatar

raskayu

New Zenner

Join Date:
Apr 2006
Posts:
56
Plugin Contributions:
0

Eliminating Category from New Products ... How?

Hi:

I have almost finished the store and I added a category to put there downloadables freebies. I uploaded all these files as final thing to finish the store. So they appears now like new products hidding the ones that I like to show and that are really the products to sell.

I don't want to have these freebies in new products lists. So, how can I eliminate that category called Freebies from the New products of ... list?

Thanks for helping.

Greets!! :)

19 May 2006, 12:20 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Eliminating Category from New Products ... How?

Cheat ... :eek:

Browse your products table in the database and sort on products_id ...

Change the date added to older ... much much older ... now they are not new ... :smile:

Also you can configure what "New" is ... in the Maximum Values settings there is:

New Product Listing - Limited to ...
Limit the New Product Listing to
0= All Products
1= Current Month
7= 7 Days
14= 14 Days
30= 30 Days
60= 60 Days
90= 90 Days
120= 120 Days

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 May 2006, 12:53 AM
#3
raskayu avatar

raskayu

New Zenner

Join Date:
Apr 2006
Posts:
56
Plugin Contributions:
0

Re: Eliminating Category from New Products ... How?

Ajeh:

Cheat ... :eek:

Browse your products table in the database and sort on products_id ...

Change the date added to older ... much much older ... now they are not new ... :smile:

Also you can configure what "New" is ... in the Maximum Values settings there is:

Hehe, I like to cheat a lot....

Thanks for your help Ajeh!!
Btw, Have you received the PM I sent some days ago?

Regards!! :D

19 May 2006, 1:14 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Eliminating Category from New Products ... How?

I have not had time to hunt it down ... but it is on the list of fun things to do ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 May 2006, 5:05 AM
#5
raskayu avatar

raskayu

New Zenner

Join Date:
Apr 2006
Posts:
56
Plugin Contributions:
0

Re: Eliminating Category from New Products ... How?

Ajeh:

I have not had time to hunt it down ... but it is on the list of fun things to do ... :smile:

It's Ok, just wondering! ;)

19 May 2006, 3:28 PM
#6
raskayu avatar

raskayu

New Zenner

Join Date:
Apr 2006
Posts:
56
Plugin Contributions:
0

Re: Eliminating Category from New Products ... How?

The cheat is done and all Freebies go away from New Products .... page list. :lol:

Now I have another question.

Can those products be hidden in some way when the "All Products" category is selected?

They distract the attention of the buyers, I have more than 60 :D

Also, I would like they don't be showed either in the Best Seller Sidebox!!

Actually I am using the best seller module by -joemama- that shows a different image with every refresh, instead of text.

Regards!!

20 May 2006, 2:13 AM
#7
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: Eliminating Category from New Products ... How?

If they are all in the same category, you could simply do some tweaking of the sql queries for those pages to exclude that category.
Take the products_all page for example:
make an override copy of includes/templates/template_default/templates/tpl_products_all_default.php, then edit this line of code (line 38):

  $products_all_query_raw = "select p.products_id, 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 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_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . $order_by;
``` so that you put your category exculsion in there like this:

$products_all_query_raw = "select p.products_id, 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 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_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . and p.master_categories_id != 'xx' $order_by;

Neville
An assumption is what you arrive at when you get tired of thinking...

20 May 2006, 6:46 AM
#8
raskayu avatar

raskayu

New Zenner

Join Date:
Apr 2006
Posts:
56
Plugin Contributions:
0

Re: Eliminating Category from New Products ... How?

bunyip:

If they are all in the same category, you could simply do some tweaking of the sql queries for those pages to exclude that category.
Take the products_all page for example:
make an override copy of includes/templates/template_default/templates/tpl_products_all_default.php, then edit this line of code (line 38):

$products_all_query_raw = "select p.products_id, 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 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_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . $order_by;

> ```
  $products_all_query_raw = "select p.products_id, 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 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_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . and p.master_categories_id != 'xx' $order_by;
``` where xx is the category id of your freebies

WOW. that works OK, but I've had to look for that SELECT query in the whole folders. It seems that you are talking of a zencart version previous to the 1.3.
After making a search I found your suggest in includes/modules/pages/products_all/header_php.php
Here is the code (line 23): I marked your suggest addin in bold-red with the category number set to 3 (my freebies category id.) :D

$products_all_query_raw = "SELECT p.products_type, p.products_id, 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
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_id = pd.products_id
[b]AND p.master_categories_id != '3'[/b]
AND pd.language_id = :languageID " . $order_by;


Thanks a lot for the tip, now I only need to eliminate those damn freebies from the best-seller sidebox. :D

Any ideas? Maybe the same thing... ?

Regards!!