Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Featured Listings on top - Categories Page

Featured Listings on top - Categories Page

Locked

Views: 3,104

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
11 Dec 2007, 5:18 AM
#1
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Featured Listings on top - Categories Page

Hi,

I'm trying to place featured listings above the default product listings on categories page, but no luck so far.

I tried placing the following code:

  <?php
    if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_FEATURED_PRODUCTS') { ?>
  <?php
/**
 * display the Featured Products Center Box
 */
?>
  <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
  <?php } ?>
  <?php
    if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_SPECIALS_PRODUCTS') { ?>

...to the top of **tpl_index_product_list.php **at line 16, just above <div class="centerColumn" id="indexProductList"> but it won't display featured products at all.

Any help appreciated. Thanks!

11 Dec 2007, 5:34 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Featured Listings on top - Categories Page

Did you enable the Featured centerbox from with the admin settings?
Admin->Configuration->Index Listing

11 Dec 2007, 5:44 AM
#3
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

I think Yes:

Show Featured Products on Main Page - Category with SubCategories 1
Show Featured Products on Main Page - Errors and Missing Products Page 3
Show Featured Products - below Product Listing 1

11 Dec 2007, 5:45 AM
#4
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

Featured box does display fine, I just want it ABOVE the normal listings, not BELOW.

Thanks.

16 Dec 2007, 3:46 PM
#5
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

Any other ideas?

I need to have featured products below pagination and above normal product listings.

Thanks

19 Dec 2007, 4:57 PM
#6
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

bump

I'm sure its not too complicated getting featured on top before the normal listing starts, or is it?

I would really appreciate any help.

Thanks! :-)

31 Dec 2007, 9:55 AM
#7
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

ahem, another bump!

Is it so difficult? :-(

31 Dec 2007, 6:17 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Featured Listings on top - Categories Page

Rather than bumping repeatedly (poor form around here), why not add more information about the things you've tried on your own in order to attempt to get it to work?
That's far more constructive and preferred than just "bump is it so hard, please just tell me how to do it".

Nevertheless ... just move or copy this line to wherever you want the featured centerbox to appear in that template:

  <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
```It will always appear even if there are no featured products this way, but unless you want to rewrite the whole template to honor the admin switches, that's the simplest way
1 Jan 2008, 4:44 AM
#9
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

Apologies for bumping reapeatedly.

Ah, I was close. I was moving the above line along with a few more around it, thiking that it was a single piece of code:

/**
 * display the Featured Products Center Box
 */
?>
  <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
  <?php } ?>
  <?php
    if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_SPECIALS_PRODUCTS') { ?>
  <?php
/**

Your suggestion did the trick. Thanks heaps again, DrByte.

2 Jan 2008, 10:48 AM
#10
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

Update: Although it did bring featured listings on top, but pagination goes below it. Like so:

<div id="featuredProducts" class="centerBoxWrapper">
</div>
<div id="productListing">
<div class="pagination pagination_top">....</div>
[Normal Listing starts..]

At first I thought it was a CSS issue and I'd manage it, but it doesn't seem so. I tried several combinations but I still can't bring pagination div out of the "productListing" div.

TIA

10 Jan 2008, 6:35 AM
#11
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

Tried several things, but pagination still remains below the featured products. The only (incorrect) way to fix this is to position the pagination bar using the absolute property, but I wouldn't want to do that unless there's no other choice.

Can someone give this a shot? Pagination goes below featured products.

Many thanks

4 Mar 2009, 10:47 PM
#12
dellonious avatar

dellonious

New Zenner

Join Date:
Jan 2009
Posts:
16
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

I found a simpler way to get this to work...

May not be the best way but it works in 1.3.8a... I added the code from the tpl_index_product_list.php for featured products to the define_main_page and it works perfectly. Of course I also turned featured items off (0) in all other areas as I only wanted them to show on my main page.

Dave~~

17 May 2009, 5:18 PM
#13
zcnb avatar

zcnb

Zen Follower

Join Date:
Jun 2008
Posts:
338
Plugin Contributions:
0

Re: Featured Listings on top - Categories Page

Dellonious:

May not be the best way but it works in 1.3.8a... I added the code from the tpl_index_product_list.php for featured products to the define_main_page and it works perfectly. Of course I also turned featured items off (0) in all other areas as I only wanted them to show on my main page.
By all means, this is the best approach I have examined and implemented so far. It works great and without having to change a single line of PHP code in the core files.

Thanks Dellonious.