Zen Cart Logo
Forums / General Questions / New Products Side Bar - How Do I Hate Thee...

New Products Side Bar - How Do I Hate Thee...

Locked

Views: 893

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
7 Jan 2008, 3:24 AM
#1
jammin320 avatar

jammin320

Zen Follower

Join Date:
Mar 2007
Location:
Seattle, WA
Posts:
158
Plugin Contributions:
0

New Products Side Bar - How Do I Hate Thee...

I am working on a site where a custom tool has the ability to add and disable products in ZenCart from outside the cart's admin page. Everything is working well except for the New Products Side Bar will show new products that have been disabled. Clicking on the link comes up with a product can't be found message.

When I disable the product (and the category incedentially), I am setting categories.categories_status = 0 and products.products_Status=0. I am apparently missing another spot, anyone have any idea where that elusive field might be?

Thanks!

7 Jan 2008, 4:03 AM
#2
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: New Products Side Bar - How Do I Hate Thee...

*** Please make questions about the business via PM ***

7 Jan 2008, 5:59 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: New Products Side Bar - How Do I Hate Thee...

Jammin, what version of Zen Cart?
Any addons/contributions installed?
What version of PHP/MySQL?

7 Jan 2008, 7:22 AM
#4
jammin320 avatar

jammin320

Zen Follower

Join Date:
Mar 2007
Location:
Seattle, WA
Posts:
158
Plugin Contributions:
0

Re: New Products Side Bar - How Do I Hate Thee...

Good Evening Dr. Byte! Thanks for the quick response, you keep some pretty dedicated hours! My server stats are as follows:

PHP Version: 4.4.6 (Zend: 1.3.0)
Database: MySQL 4.1.22-standard
ZenCart: v1.3.8 [2007-12-11 23:50:53] (Fresh Installation)

Cart Location: 72.52.169.15/store/

7 Jan 2008, 7:30 PM
#5
jammin320 avatar

jammin320

Zen Follower

Join Date:
Mar 2007
Location:
Seattle, WA
Posts:
158
Plugin Contributions:
0

Re: New Products Side Bar - How Do I Hate Thee...

It looks like I have confused and confuddled everyone with my questions. Let me see if I can rephrase what I am looking for...

Does anyone know what DB fields the New Products Side Bar looks at to determine what it should show? I know that it checks the date created field in the products table, but I expected it to look at the product active field as well. It does not appear to, however - does anyone know for sure? The php in there is complicated enough that I am not sure what I am seeing.

7 Jan 2008, 7:42 PM
#6
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,607
Plugin Contributions:
0

Re: New Products Side Bar - How Do I Hate Thee...

I believe the fix for that is posted on the forum - look for a post from Ajeh.

7 Jan 2008, 7:49 PM
#7
jammin320 avatar

jammin320

Zen Follower

Join Date:
Mar 2007
Location:
Seattle, WA
Posts:
158
Plugin Contributions:
0

Re: New Products Side Bar - How Do I Hate Thee...

Hi Kim,

Thanks for the tip, however, it appears that if it is there, I am not searching right. Any key words come to mind for me to search for? I have tried variations of 'new product disable' and am not able to find anything close.

7 Jan 2008, 8:11 PM
#8
jammin320 avatar

jammin320

Zen Follower

Join Date:
Mar 2007
Location:
Seattle, WA
Posts:
158
Plugin Contributions:
0

Re: New Products Side Bar - How Do I Hate Thee...

Another thing that I cannot find is where the SQL is that actually populates the new prodcuts box. The includes/new_products.php is amazingly simple, and I have yet to figure out the inner workings of ZenCarts file structure...can anyone point me in the right direction there?

7 Jan 2008, 8:38 PM
#9
jammin320 avatar

jammin320

Zen Follower

Join Date:
Mar 2007
Location:
Seattle, WA
Posts:
158
Plugin Contributions:
0

Re: New Products Side Bar - How Do I Hate Thee...

Its an amazing phenomonon - get me thinking out loud, and I tend to solve my own problems...:blush: - I got the solution...I just want to post it for others incase it may help.

In the file includes/new_products.php is the SQL query

   $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                 p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                          from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                          where p.products_id = pd.products_id
                          and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                          and p.products_id in (" . $list_of_products . ")";

I inserted the following right after the 'where' and before the 'p.products_id=pd.products_id

p.products_status = '1' and 
```.
 
That did it. I am curious why that wasn't there already, it doesn't make sense in any area I can think of to have a link to a product that is deactivated. The link will fail.