I am trying to make every item on my site be featured, so they will randomly appear on the front page. Is there some way to do this in one step rather than adding each one to the featured list? Perhaps with EasyPopulate? thanks in advance.
I am trying to make every item on my site be featured, so they will randomly appear on the front page. Is there some way to do this in one step rather than adding each one to the featured list? Perhaps with EasyPopulate? thanks in advance.
You could export as data from your products table just the field products_id and import that into an empty featured table ...
This should set all the defaults properly on the fields to be featured products without an expiration date and the status turned on ...
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!
Thanks for responding. I managed to screw something up.. my phpmyadmin skills are not up to par and I shouldn't have ventured in... So now my next question is: how do I fix the featured table? I think I deleted fields and indexes from it. and now I get the error message "1054 Unknown column 'f.products_id' in 'where clause'" on my homepage, and "1054 Unknown column 'status' in 'where clause'" when I try to access featured from admin.
Thanks!
If you totally blew your featured table ... you can just remake it clean from scratch and start over ...
This will make a clean, empty featured table with all the correct fields
NOTE: Always backup your database before attempting changes etc. and as a regular habit ... just in case ...PHP Code:DROP TABLE IF EXISTS featured;
CREATE TABLE featured (
featured_id int(11) NOT NULL auto_increment,
products_id int(11) NOT NULL default '0',
featured_date_added datetime default NULL,
featured_last_modified datetime default NULL,
expires_date date NOT NULL default '0001-01-01',
date_status_change datetime default NULL,
status int(1) NOT NULL default '1',
featured_date_available date NOT NULL default '0001-01-01',
PRIMARY KEY (featured_id),
KEY idx_status_zen (status),
KEY idx_products_id_zen (products_id),
KEY idx_date_avail_zen (featured_date_available)
) TYPE=MyISAM;
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!
Thanks, that really helped me get out of a bind. OK, so last question (promise) -- how do I go about doing what you originally recommended, i.e. copying the product_id table into the featured table? Thanks again.
Go to phpMyAdmin ...
Click on the products table ...
Click on SQL ...
SELECT products_id from products
Click GO ...
At the bottom click Export ...
Uncheck Structure ...
Check Complete inserts ...
Check Extended inserts ...
Check Save as file ... click GO ...
Save as a file on your computer ...
Edit the file you just saved and change the table name products to featured
Click on the featured table ...
Click Import ...
Browse and find the file you just edited ... and click Go ...
You should now have all products in the featured table ...
NOTE: before attempting this Backup your database!!
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!
Great step by step - thank you! One extra thing I would love though... can you please give all the steps again, only this time tell me how to first clear the Featured table so I don't get duplicates.
I am thinking that every so often (after adding a bunch of products) I will just do this again so that my Featured is actually randomly spotlighting all the products.
Select the featured table and "empty" it ... no records mean no Featured products ...
And, as always, be sure you backup your database before breaking everything ...![]()
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!