Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Want to be flash. How might I add a Forum to my shop


Guest

Recommended Posts

Posted

Now that I have my shop looking the part. How might I add other functionality? eg. A Forum that I could fit in?

 

Is this something I could do with a Open Source program (and what would you recommend for a novice), or am I being deluded.

 

Thanks

Shelley

Posted

You could add another link in the Information Box, copy the privacy.php file in catalog/includes/modules and save it as something else (like maybe forum.php). Install your forum normally, then include the forum's index.php and gut the rest of the file. You'll probably have to tweek table dimensions in the forum config. since the forum will appear in the same place as you catalog, etc. Other than that, you could put a new link in the Information Box that targets "_blank" and reference your forum index so it opens a new browser window or tab, leaving your site open.

 

Or, you could modify your header.php and add a link there somewhere to your forum.

 

Hope that helps a little.

Posted

Presuming you already have a forum module installed such as http://addons.oscommerce.com/info/4832 you will need to create the link to it from your home page

 

In your includes/header.php you can make your code look like this

 

if (tep_session_is_registered('customer_id')) {

echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a> | <a href="account.php" class="headerNavigation">' . HEADER_TITLE_MY_ACCOUNT . '</a>';

echo '| <a href="' . tep_href_link(FILENAME_FORUM, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_FORUM . '</a>  ';

}

else {

echo '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>';

}

echo '| <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" class="headerNavigation">' . HEADER_TITLE_CART_CONTENTS . '</a>   ';

echo '| <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_CHECKOUT . '</a>   ';

?>

 

The forum link will appear in the nav bar only if the user has logged in

 

otherwise you can use the following code

 

if (tep_session_is_registered('customer_id')) {

echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a> | <a href="account.php" class="headerNavigation">' . HEADER_TITLE_MY_ACCOUNT . '</a>';

 

}

else {

echo '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>';

}

echo '| <a href="' . tep_href_link(FILENAME_FORUM, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_FORUM . '</a>  ';

echo '| <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" class="headerNavigation">' . HEADER_TITLE_CART_CONTENTS . '</a>   ';

echo '| <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_CHECKOUT . '</a>   ';

?>

 

 

This will make the forum appear regardless of whether they are logged in

 

Please note that this code assumes you are using SSL if you are not using SSL then remove the (, '', 'SSL')

Archived

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

×
×
  • Create New...