Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a link to osc logo located in header.php


johnnyosc

Recommended Posts

To keep it in the same coding standard as the rest of OSC--

 

Define the page you want to link to in application_top.php:

 

  define('FILENAME_YOUR_PAGE', 'default.php');

 

and replace:

 

<?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce'); ?>

 

with:

 

<?php echo '<a href="' . tep_href_link(FILENAME_YOUR_PAGE, '', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', HEADER_TITLE_CART_CONTENTS) . '</a>'; ?>

 

IMO it's better practice to keep everthing (where possible) the same.

Link to comment
Share on other sites

To keep it in the same coding standard as the rest of OSC

...

<?php echo '<a href="' . tep_href_link(FILENAME_YOUR_PAGE, '', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', HEADER_TITLE_CART_CONTENTS) . '</a>'; ?>

 

If that is the case then in actuality it should be:

 

<?php echo '<a href="' . tep_href_link(FILENAME_YOUR_PAGE) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', HEADER_TITLE_CART_CONTENTS) . '</a>'; ?>

 

this is due to the fact that function tep_href_link() already defaults parameters to '' and connection to 'NONSSL' :sigh:

Link to comment
Share on other sites

Ryan

 

I understand that function tep_href_link() defaults to a non secure link if SSL is not specified.

 

But is this only applicable to MS1

and have they missed the 6 or so calls using NONSSL

 

LOADED5 has reference to approx 161 NONSSL links

 

So if using MS1 leave out the NONSSL?

If using an earlier snapshot keep it in?

 

OR What?

 

:?

Link to comment
Share on other sites

Well, in that last hoorah of commits to get MS1 released, you will notice that the dev team made it a point to not have any unnecessary " ' ', 'NONSSL' " 's laying around for tep_href_link 's. Therefore it is my belief that if you want to stick with the standards, then if the function defines a default, don't pass the function what the function would have set to default in the first place..

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...