Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Templates, Stylesheets, Page Layout / Prevent Doc-Gen from 'New Products'

Prevent Doc-Gen from 'New Products'

Locked

Started by robinstl on 1 Dec 2007, 5:15 PM · Views: 1,224

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
1 Dec 2007, 5:15 PM
#1
robinstl avatar

robinstl

Zen Follower

Join Date:
Aug 2007
Location:
St. Louis
Posts:
111
Plugin Contributions:
0

Prevent Doc-Gen from 'New Products'

I am attempting to create a simple gallery of items that are NOT for sale by specifying them as 'documents - general', but they show up in 'New Products' and 'New Products for December', etc and I'd like to prevent this.

I posted this before and I got this response...

Make them OLD and not NEW ... 

Change the field in the database for the products_date_added to an older date than your definition of New Products that you have Naturally set in the Maximum Values ...

Quote:
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  

I can figure out the Maximum Values part but am a little unclear on 'Change the field in the database for the products_date_added to an older date'

Could someone clarify how to go about this or have any ideas that may help? I appreciate all input.

Thanks :)

1 Dec 2007, 5:51 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Prevent Doc-Gen from 'New Products'

If you browse your database products table in phpMyAdmin you will find there is a field called products_date_added ...

This is the physical date that you added the Product to the database ...

If all Products that are products_type 3 had a products_date_added of:
2003-02-21 06:08:17

Then those Products are outside the range of the New Product definition that you set and will not show in the New Product sidebox, centerbox nor New Product Listing ... :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!

1 Dec 2007, 7:04 PM
#3
robinstl avatar

robinstl

Zen Follower

Join Date:
Aug 2007
Location:
St. Louis
Posts:
111
Plugin Contributions:
0

Re: Prevent Doc-Gen from 'New Products'

Ajeh:

If you browse your database products table in phpMyAdmin you will find there is a field called products_date_added ...

This is the physical date that you added the Product to the database ...

If all Products that are products_type 3 had a products_date_added of:
2003-02-21 06:08:17

Then those Products are outside the range of the New Product definition that you set and will not show in the New Product sidebox, centerbox nor New Product Listing ... :smile:

Okay... I'm there. Do I have to manually edit the date for each 'type 3' product or is there a way to automatically do this via PHP?

Thank you

2 Dec 2007, 5:52 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Prevent Doc-Gen from 'New Products'

Backup database first ...

Next, backup the database ...

Followed by repeat step 1 and 2 ... :smartalec:

Next, you can run this either in phpMyAdmin or in your Zen Cart Admin in the Tools ... Install SQL Patches ...

UPDATE products SET products_date_added = '2003-02-21 06:08:17' WHERE products_type = 3;

Voila! :cool:

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!

3 Dec 2007, 1:50 PM
#5
robinstl avatar

robinstl

Zen Follower

Join Date:
Aug 2007
Location:
St. Louis
Posts:
111
Plugin Contributions:
0

Re: Prevent Doc-Gen from 'New Products'

Thanks for responding back Ajeh. I am correct in assuming that I'm going to have to update the DB everytime something is added as a 'document-general'?

Thanks :)

3 Dec 2007, 2:35 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Prevent Doc-Gen from 'New Products'

Only if you don't want then to show under New Products ...

Or, you could customize the code to skip products_type 3 on the SELECT statements ...

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!

3 Dec 2007, 4:03 PM
#7
robinstl avatar

robinstl

Zen Follower

Join Date:
Aug 2007
Location:
St. Louis
Posts:
111
Plugin Contributions:
0

Re: Prevent Doc-Gen from 'New Products'

Ajeh:

Or, you could customize the code to skip products_type 3 on the SELECT statements ...

Man... you are a TEASE!