Zen Cart Logo
Forums / General Questions / Display only one featured product...

Display only one featured product...

Locked

Views: 2,478

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
25 Oct 2006, 10:57 PM
#1
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Display only one featured product...

I have currently enabled Featured Products on my homepage. I've set 10 products as featured, but would only like one featured product to be displayed at a time (to create a random featured product effect).

I know from that admin that I can specify the number of featured products per row, but I cannot set the number of featured products to display.

Does anyone know of an easy hack I could use here?

25 Oct 2006, 11:46 PM
#2
Kim avatar

Kim

Obaa-san

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

Re: Display only one featured product...

Admin> Configuration> Maximums> Maximum Display of Featured Products - Main Page - change to one

26 Oct 2006, 2:03 AM
#3
ajcannon avatar

ajcannon

New Zenner

Join Date:
Aug 2006
Posts:
68
Plugin Contributions:
0

Re: Display only one featured product...

If you do this is there any way to get a full-size image of that one product? I would love to be able to have just one or two or three featured items listed on the home page (drawn randomly from my list of featured items) and then have those items have a full-size image on them. Is this possible?

-ajcannon

26 Oct 2006, 7:22 AM
#4
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Display only one featured product...

ajcannon:

If you do this is there any way to get a full-size image of that one product? I would love to be able to have just one or two or three featured items listed on the home page (drawn randomly from my list of featured items) and then have those items have a full-size image on them. Is this possible?

-ajcannon

I'm also looking to achieve this.

At the moment I'm playing around with the code and will post back with my results. :)

26 Oct 2006, 1:19 PM
#5
ajcannon avatar

ajcannon

New Zenner

Join Date:
Aug 2006
Posts:
68
Plugin Contributions:
0

Re: Display only one featured product...

Thanks and please let me know if you do achieve this. I'd be glad to help you if you can maybe get me pointed in the right direction...I wouldn't even know where to being.

-ajcannon

27 Oct 2006, 6:51 PM
#6
ajcannon avatar

ajcannon

New Zenner

Join Date:
Aug 2006
Posts:
68
Plugin Contributions:
0

Re: Display only one featured product...

any update on this? I will try to mess around with it over the weekend if I get a chance, but I didn't want to be doing things that you had already done if you were going to release them publicly. Have a great weekend.

-ajcannon

28 Oct 2006, 12:48 PM
#7
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Display only one featured product...

This is what I've done so far...

1 - Set around 5 products as 'featured' from admin
2 - Set the maxium featured products to be displayed on the main page as 1 (Admin | Configuration | Maximum Values | Maximum Display of Featured Products - Main Page)

Now I 'think' you need to copy featured_products.php (from includes/modules) to your override folder and edit it.

However, I'm not sure if this will affect the display of featured products on all other pages (category pages and so on). If it does (and you don't want it to), you'll need to create a featured_products2.php and then create copies of all other files it uses and changed a little bit of code around.

Now... maybe there is a much easier way of doing all this. If anyone can think of a better way please let us know. Thanks! :)

30 Oct 2006, 2:51 PM
#8
ajcannon avatar

ajcannon

New Zenner

Join Date:
Aug 2006
Posts:
68
Plugin Contributions:
0

Re: Display only one featured product...

Alex,

Thanks SO MUCH for your help. This is what I have done...I followed your directions exactly but I didn't actually edit anything in the featured_products.php page. What I did was go into admin --> configuration --> images and change Image - Featured Products Width to 300 and the Image - Featured Products Height to 240. This gave me the desired effect that I was looking for. You can check it out at https://www.shoptomlinsons.com. Thanks again.

-ajcannon

30 Oct 2006, 10:31 PM
#9
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Display only one featured product...

Glad it's all working.

I'm going for a similar effect, but will be editing the code so that a little bit of the product description, average rating, and maybe a review extract are displayed next to the image.

If I create anything juicy I'll post it here! :)

31 Oct 2006, 2:15 PM
#10
ajcannon avatar

ajcannon

New Zenner

Join Date:
Aug 2006
Posts:
68
Plugin Contributions:
0

Re: Display only one featured product...

Hey, actually, I would love to have at least some of the description listed below the picture also...so if you figure out how to do that please let me know. Thanks!

-ajcannon