Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems with Login Box


Kidz Toyz

Recommended Posts

Hi guys,

People have been very helpful so far, but I have another problem.

 

Today i tried to install the Loginbox Best contribution. As far as I'm aware, I've followed all of the instructions correctly. But after uploading, all I get is the box heading (in my right column), no box though!

Other boxes (shopping cart & reviews) which should be in the right column have dissapeared on all pages (except account).

My footer bar & everything below it is not showing.

 

Has anyone else had this problem? How did you fix it?

 

I've probably missed something somewhere, but I've doublechecked everything & can't find anything.

If you know what I've missed I'd appreciate a little help with this.

 

 

Failing that, can anyone reccomend a good login box contribution, that I can use (in a column, not in the header preferably), thats relatively simple to install.

 

Thanks

 

Nikki

Link to comment
Share on other sites

Have you done a backup to the files you changed?

If you did it, replace them to restore all.

Then, try to do it again and be carefull.

If you see that there is something wrong with the contibution, just look for another one.

Link to comment
Share on other sites

:) Hi,

Thanks for the quick reply.

I see other sites with this contrib on so it must be useable.

 

I'm pretty sure that I've probably just made a mistake installing it.

I'll have another check through it, now I've had a break from the computer and see if i can find anything, if I can't find the problem I'll try reinstalling it, like you suggested.

 

I'd rather find a solution to this (and maybe learn from it) than give up on it, so in the meantime if anyone has any other ideas/possible solutions i'd be very happy to hear them.

 

 

Nikki

Link to comment
Share on other sites

well it looks like a simple install one of two things probably happened

 

my first guess is when you added the line to column_right.php

require(DIR_WS_BOXES . 'loginbox.php');

that you inserted it between and "IF" or "else" statement which is confusing the other box modules.

 

Try posting your includes/column_right.php code to make sure you didnt add it in a bad spot.

 

The only other part would have been when you added the code to the includes/functions/general.php you either copied over existing code, or didnt add the code in the right spot.

 

my guess as i said would be when you added the require login.php code to the column_right.php file you smushed it into a spot that it shouldnt be in between something.

Link to comment
Share on other sites

Try posting your includes/column_right.php code to make sure you didnt add it in a bad spot.

 

my guess as i said would be when you added the require login.php code to the column_right.php file you smushed it into a spot that it shouldnt be in between something.

 

The instructions given were:

 

CODE CHANGE TO ADD BOX TO COLUMN:

Add to /catalog/includes/column_left.php

or /catalog/includes/column_right.php

 

 

// BOF: WebMakers Added: Login Box My Account

require(DIR_WS_BOXES . 'loginbox.php');

// EOF: WebMakers Added: Login Box My Account

 

This is column_right.php

 

<?php
/*
 $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

// BOF: WebMakers Added: Login Box My Account
 require(DIR_WS_BOXES . 'loginbox.php');
// EOF: WebMakers Added: Login Box My Account

 require(DIR_WS_BOXES . 'shopping_cart.php');

 if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');

 if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (tep_session_is_registered('customer_id')) {
     $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
     $check = tep_db_fetch_array($check_query);
     if ($check['count'] > 0) {
       include(DIR_WS_BOXES . 'best_sellers.php');
     } else {
       include(DIR_WS_BOXES . 'product_notifications.php');
     }
   } else {
     include(DIR_WS_BOXES . 'product_notifications.php');
   }
 } else {
   include(DIR_WS_BOXES . 'best_sellers.php');
 }

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
 } else {
   include(DIR_WS_BOXES . 'specials.php');
 }

 require(DIR_WS_BOXES . 'reviews.php');
 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {

 }
?>

 

 

Nikki

Link to comment
Share on other sites

:thumbsup: Problem sorted.

 

I removed the contribution and used Login Box 5.6 instead. No problems with that one it was up & running straight away.

 

Thank You to those that tried to help.

 

Nikki

Link to comment
Share on other sites

  • 1 month later...

I have gotten this contribution to work just fine but i did find a bug. If you have added products to the basket and then click on "Click here to create an account" rather then signing, then it will take you to the "create new account" page but you lose all your cart contents.

 

Is there any way to fix this please?

Link to comment
Share on other sites

I have gotten this contribution to work just fine but i did find a bug. If you have added products to the basket and then click on "Click here to create an account" rather then signing, then it will take you to the "create new account" page but you lose all your cart contents.

 

Is there any way to fix this please?

this typically happens if you lose the session during the page transition. Check the urls you click from within the php code. Make sure for each, the tep_href_link function is used and not some hard-coded link.

Link to comment
Share on other sites

I don't know anything about php but understand only a little. Learning from contribution installations as i go along. I just follow the contribution instructions. Session ids seem to be working fine when i use the normal oscommerce option the right of the header for my account. Everything stays. Only in this contributions box from any page i am on (either that be main page or product info page) and click on "Click here to create an account" underneath the email and password selection it clears everything. Is it to do with the way that "Click here to create an account" selection performs an action as to why the session id gets removed or where should i look for in this php code? What php code plz?

 

Sorry but i am very new to programming. Am an accountant actually :-)

Link to comment
Share on other sites

yea, this module has problems. In the catalog\includes\languages\english\loginbox.php (same for the other languages)

 

you need to change these lines

  define('BOX_LOGINBOX_NEW', '<span class="greetUser">Not registered yet?</span><br><a href="' . FILENAME_CREATE_ACCOUNT . '"><span class="smallText">Click here to<br>create an account</span></a>');
 define('BOX_LOGINBOX_FORGOT_PASSWORD', '<a href="' . FILENAME_PASSWORD_FORGOTTEN . '"><i>(forgotten?)</i></a>');

 

to this

  define('BOX_LOGINBOX_NEW', '<span class="greetUser">Not registered yet?</span><br><a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '"><span class="smallText">Click here to<br>create an account</span></a>');
 define('BOX_LOGINBOX_FORGOT_PASSWORD', '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '"><i>(forgotten?)</i></a>');

 

Then in the catalog\includes\boxes\loginbox.php

you should change whatever states NONSSL to SSL because all these links related with the customers account and login pages should be secure.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...