Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to manually add a category in the categories box


longhorn1999

Recommended Posts

Hi everyone,

 

In 2.2RC2a, I have the categories in a box in the left column, as is standard.

 

I also added a little blurb from the All Products SEO contribution so that there's a link that says 'View All Products' just below the categories that are listed.

 

lines 108-115 of inlcudes/boxes/categories.php:

 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
                              'text'  => $categories_string
                             );

 $info_box_contents[] = array('align' => 'left',
                               'text'  => '<a class="allproductsBox" href="' . tep_href_link(FILENAME_ALLPRODS_SEO, '', 'NONSSL') . '" title="'  . BOX_INFORMATION_ALLPRODS_SEO_CATEGORIES . '">' . BOX_INFORMATION_ALLPRODS_SEO_CATEGORIES . '</a>');

 

I'm trying to manually put in a link in between these two, but one that points to a different site.

 

I'd clumsily tried this code but it doesn't seem to do anything:

  $info_box_contents[] = array('align' => 'left',                        
 				'text'  => '<a href="www.some-other-site.com>New Category</a>');

 

Does anyone know what the proper syntax to do this is?

 

Thanks

Link to comment
Share on other sites

"Brute force" method:

 

 $categories_string .= '<a target="_blank" href="http://www.some-other-site.com>New Category</a>'; 

 

Your code looks good (haven't tested it).

 

If you use the category cache did you reset the cache in the admin?

:unsure:

 

Did you clear your browser cache to be sure you aren't looking at the page contents from your browser cache?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I'd clumsily tried this code but it doesn't seem to do anything:

  $info_box_contents[] = array('align' => 'left',                        
 				'text'  => '<a href="www.some-other-site.com>New Category</a>');

 

Does anyone know what the proper syntax to do this is?

Give this a try:

'text'  => '<a href="www.some-other-site.com">New Category</a>');

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...