Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding extra pages but in categories box


Twice_knightly

Recommended Posts

Hello

 

I've sucessfully added new/extra pages to my site but so far these new pages have been added to the 'information' box below shipping etc.

 

What I'd like to do is move them to a more relevant place, i.e within the Categories box, however when I looked at the code for categories.php is was radically different to that of information.php and I couldn't see where to add the href lines etc for the link to the new pages.

 

Could somebody please tell me if you can do what I'm trying to do, and if so how!

 

Many thanks

Carl.

Link to comment
Share on other sites

Yes you can.

 

You can even create more information boxes if you like. Just copy the whole informatio box structure.

 

To add a html link to the Categories box as you say is a little trickier. You have the same href type code but you just have to make sure you put it in the right place. i.e. after the dispaly of the category. Take a copy of the file first and then have a go!

Link to comment
Share on other sites

I want to do the same thing but I kept getting errors in my code when I put the hard link in the categories.php file.

 

Where exactly would a hard link be placed in categories.php if you wanted to add a link to a static page?

 

Thanks in advance!

Keven J

Link to comment
Share on other sites

I want to do the same thing but I kept getting errors in my code when I put the hard link in the categories.php file.

 

Where exactly would a hard link be placed in categories.php if you wanted to add a link to a static page?

 

Thanks in advance!

Keven J

 

One method would be thus:

 

  tep_show_category($first_element); 

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

 $info_box_contents[] = array('align' => 'center" valign="top',
                              'text'  => '<a href="' . tep_href_link(FILENAME_FAVORITES, '', 'NONSSL') . '">' . BOX_INFORMATION_FAVORITES . '</a>');
 $info_box_contents[] = array('align' => 'center" valign="top',
                              'text'  => '<a href="' . tep_href_link(FILENAME_BESPOKE, '', 'NONSSL') . '">' . BOX_INFORMATION_BESPOKE . '</a>');
 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- categories_eof //-->

 

the above method gives a seperation between the links and the main category links and is for dynamic

 

this for hard coded links:

 

  tep_show_category($first_element); 

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

 $info_box_contents[] = array('align' => 'center" valign="top',
                              'text'  => '<a href="http://www.yourdomain.com/yourlink.html">Whatever the link is called</a>');
 $info_box_contents[] = array('align' => 'center" valign="top',
                              'text'  => '<a href="http://www.yourdomain.com/yourlink2.html">Whatever the next link is called</a>');
 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- categories_eof //-->

 

 

dynamic with no seperation:

 

  tep_show_category($first_element); 

 $info_box_contents = array();
 $info_box_contents[] = array('text' => $categories_string . '<br><a href="' . tep_href_link(FILENAME_FAVORITES, '', 'NONSSL') . '">' . BOX_INFORMATION_FAVORITES . '</a><br>' . '<a href="' . tep_href_link(FILENAME_BESPOKE, '', 'NONSSL') . '">' . BOX_INFORMATION_BESPOKE . '</a>');
 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- categories_eof //-->

 

static no seperation:

 

  tep_show_category($first_element); 

 $info_box_contents = array();
 $info_box_contents[] = array('text' => $categories_string . '<br><a href="http://www.yourdomain.com/yourlink.html">Whatever the link is called</a><br>' . '<a href="http://www.yourdomain.com/yourlink2.html">Whatever the next link is called</a>');
 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- categories_eof //-->

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...