Zen Cart Logo
Forums / General Questions / Easier way to set products on Featured Products? SQL query perhaps?

Easier way to set products on Featured Products? SQL query perhaps?

Locked

Views: 1,445

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
2 Sep 2007, 10:09 PM
#1
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Easier way to set products on Featured Products? SQL query perhaps?

I need to set about 100 products to Featured Products.

Having thousands of products, it is very difficult doing it manually one by one with the built it feature.

Isn't there an easier way of doing this? Through an SQL query perhaps?

Thanks.

2 Sep 2007, 10:25 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Easier way to set products on Featured Products? SQL query perhaps?

You have 3 options:

  1. click-and-select manually one-by-one using pulldowns
  2. type in the product number manually on the Featured screen, one at a time and set dates
  3. SQL query ... add records to the "featured" table, including product number, and applicable dates etc.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Sep 2007, 4:31 AM
#3
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: Easier way to set products on Featured Products? SQL query perhaps?

Thanks for the suggestions DrByte.

Clicking and selecting one by one using the pull down is almost impossible since I have thousand of products. Actually I don't see a pull down, but rather a scroll box.

I really don't see how to type the product number manually in the Featured screen. All I see is the scroll box. Did you mean using something like phpMyAdmin instead? In which case, this seems like a possible option.

Doing an SQL query seems like the best option. Unfortunately, I really don't know the syntax. Do all the values need to be set? I plan to have these products featured indefinitely, do I need to set dates or this will be set automatically?

Can you confirm whether something like this would work?

INSERT INTO featured (products_id,status) VALUES (12345,1);

If not, what is the correct syntax?

Thanks.

11 Sep 2007, 4:36 AM
#4
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: Easier way to set products on Featured Products? SQL query perhaps?

...just replying to confirm the syntax below works, not sure if it's completely correct but it works.

INSERT INTO featured (products_id,status) VALUES (ProductIDHere,1);

Also, DrByte, when you mentioned typing manually the product id in the Featured screen and I said I didn't have that, now I see what you meant. The 'Product ID to be Manually Added as a Featured' link does not show unless at least one featured product already exists.
I think it would be better if this link appeared even there aren't any featured products. Good to know about this feature I wasn't aware of.