-->
Searching...
Tuesday, March 15, 2011

Oscommerce Tutorial: Missing Logout Button/ Link

I am also one who is in Disagreement with both the definition of Open Source and of The Free Software fondation the body who are certifying software as such , the fact that the words - Open Source Quotes

After tinkering about Oscommerce, there are a few flaws that I detected, first missing logout button. Customer simply can't logout from your e-shop after logging in. Security hazard.

So here is what I did, after perusing around trying to figure out how to add logout button to your customer page so the customer can logout anytime she or he wants.

This instruction was given by somebody from the Silver&Gold Design.

Difficulty: Easy
Technical knowledge: if you can find the source code and understand a few line written in html then its alright.
What you need: The Oscommerce files containing all the page in your installation folder.


1. Find account.php (ussually in the main Oscommerce folder, Catalog > account.php, no need to browse into other folder)

find this line: (in about line number 160)

<tr>
<td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></td>
</tr>

add this right below this, this will add the logout button right after "My account password"

<tr>
<td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' . MY_ACCOUNT_LOGOFF . '</a>'; ?></td>
</tr>


2. Find account.php in your language folder: catalog/includes/languages/(yourlanguage)/account.php

Find this line:

define('HEADING_TITLE', 'xxxxxxxxx');
(if you have english language, then find define('HEADING_TITLE', 'My Account Information')

And add this line right after

define('HEADING_TITLE', 'My Account Information (Log off)');

You can change the "My account information" to the translation of what ever language that you use

In the same file add this line to show the logout button

define('MY_ACCOUNT_LOGOFF', 'Log off.');

Done! now customer can logout from their account anytime they want



Just one part of the open-source puzzle. But it's not necessarily the most important one.” - Open Source quotes

1 comments:

Armyne.com said...

Thanks, I had a hard time finding a tutorial like this on google regarding to the same problem. Now I fixed it thanks to You.
Thanks a lot!

 
Back to top!