Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

clickable tabe heading


azziman

Recommended Posts

Hi!

 

That should be possible, have a look into your /includes/boxes/whats_new.php.

 

Somewhere near line 23 there should be something like this:

 

$info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);

 

This is your table heading. You could now change that line to:

 

$info_box_contents[] = array('text' => '<a href="new_products.php">'.BOX_HEADING_WHATS_NEW.'</a>');

 

If that doesn?t work, try changing it in your /includes/languages/english.php :

 

change

 

define('BOX_HEADING_WHATS_NEW', 'What\'s New?');

 

to

 

define('BOX_HEADING_WHATS_NEW', '<a href="new_products">What\'s New?</a>');

Link to comment
Share on other sites

i managed to et this to work on the other boxes except with this code:

 

  $info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 

where do i add the herf tag?

no1.jpg
Link to comment
Share on other sites

i tried it like this:

 

$info_box_contents[] = array('align' => 'left', 'text' => '<a href="new_products.php">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))).'</a>');;

 

but im getting an error :(

no1.jpg
Link to comment
Share on other sites

I would try something like ...

 

sprintf('a href="new_products.php">' . TABLE_HEADING_NEW_PRODUCTS . '</a>', strftime('%B'))

 

or ...

 

'a href="new_products.php">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . '</a>'

Link to comment
Share on other sites

I'm trying to accomplish the same task.

 

Some of the code listed in this thread did not work and the other code I did not try as I am not sure which files to make the code changes in.

 

Can anyone offer any additional information on this?

 

Much appreciated!

Link to comment
Share on other sites

$info_box_contents[] = array('align' => 'left', 'text' => '<a href="new_products.php">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))).'</a>');;

has three ( and 4 ) causing a parse error. Try

$info_box_contents[] = array('align' => 'left', 'text' => '<a href="new_products.php">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . '</a>');

in includes/modules/new_products.php

 

Hth,

Matt

Always back up before making changes.

Link to comment
Share on other sites

Thanks. That worked fine except that the code in last box should be <a href="products_new.php" instead of new_products.php.

 

I would also like to do this feature for the shopping cart box header as well as the specials box header.

 

I tried similar codind in the includes/boxes/search.php and it did not work.

 

Any suggestions for that?

 

Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...