Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"More Featured Products" text link in box - how to


JenRed

Recommended Posts

Take a look here: http://www.redinstead.com.au to see what I am on about below!

 

What I have done is added images for the tops of the two boxes in the middle column (Specials and Featured Products) but that means losing the text link to more Featured Products that formed part of the box heading before I replaced it with an image heading. Does that make sense? :)

 

I have managed to insert the right code for the Specials box on my default.php page but I can not work out how to do the same thing for the Featured Products box.

 

So what I want is to add a text link to the bottom of the Featured Products box that says "More Featured Products" and leads to the featured_products.php page - in the same way as the text link for the Specials box above it.

 

Here is the relevant code from the featured.php page:

    } else {

     $info_box_contents[$row][$col] = array('align' => 'center',

                                          'params' => 'class="smallText" width="33%" valign="top"',

                                          'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])));

 

and here is what I need to add:

<br><br><font face=verdana, arial, sans serif size=2><b><a href="' . tep_href_link(FILENAME_FEATURED_PRODUCTS) . '">More ' . sprintf(TABLE_HEADING_FEATURED_PRODUCTS, strftime('%B')) . '</a></b></font><br><br>

 

but I am not sure where. I have tried all different combinations - eg before/after 1st/2nd/3rd bracket etc etc but nothing is working for me. Whatever I try is making the box not appear at all - so obviously the syntax is wrong.

 

This is how I did it for the Specials page:

 $info_box_contents[$row][$col] = array('align' => 'center',

                                          'params' => 'class="smallText" width="33%" valign="top"',

                                          'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $default_specials['products_image'], $default_specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']) . '">' . $default_specials['products_name'] . '</a><br><s>' . $currencies->display_price($default_specials['products_price'], $default_specials['products_tax_class_id']) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($default_specials['specials_new_products_price'], $default_specials['products_tax_class_id']).'</span><br><br><font face=verdana, arial, sans serif size=2><b><a href="' . tep_href_link(FILENAME_SPECIALS) . '">More ' . sprintf(TABLE_HEADING_DEFAULT_SPECIALS, strftime('%B')) . '</a></b></font><br><br>'

);

 

(I just added the piece of code in between the </span> and the ' apostrophe that was right after it.) But the end of the code in featured.php is quite different.

 

Please can someone help me work this out?

 

thanks heaps

 

 

Jen

I haven't lost my mind - I have it backed up on disk somewhere.

Link to comment
Share on other sites

  • 4 weeks later...

Just in case anyone else wants to know how:

 

in includes/modules/featured.php add this code:

 

  $info_box_contents[] = array('align' => 'left', 'text' => '<br>    <a class=main href="' . tep_href_link(FILENAME_FEATURED_PRODUCTS) . '">more featured products</a><br><br>');

 

 

just before this (which is towards the bottom):

 

      new contentBox($info_box_contents);

 

 

voila!

 

Jen

I haven't lost my mind - I have it backed up on disk somewhere.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...