Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Customer Login
12-11-2012, 01:17 PM,
#1
Customer Login
Just downloaded and installed from site webERP_4.09.1.zip

Created user, role as a customer login and set the customer code and customer branch in setup. And only access to Order Entry in user setup.

Log in ok. Three menu choices.
Account Status
Place an Order
Order Status

Place an Order asks for search on partial branch name or branch code or phone. In the source customer is locked out of the search for good reasons so they can't get to other customers.

But can't even find themselves, so can't place order.

Will probably program a work around in the next one or two days unless someone else has the line of code that I can insert easily. A search should occur, but locked into their own debtorsmaster record.

Reply
12-12-2012, 04:55 AM,
#2
RE: Customer Login
line 58 of SelectOrderItems

"if (count($_SESSION['AllowedPageSecurityTokens'])==1){ //its a customer logon"

is never true because

AllowedPageSecurityTokens

has two members

0 = '0'
1 = '1'

Reply
12-12-2012, 08:00 AM,
#3
RE: Customer Login
My fix.

$IsCustomerLogon = '0';
$ThisUser = $_SESSION['UserID'] ;
$sql = "SELECT * FROM www_users WHERE www_users.userid='" . $ThisUser . "'" ;
$ErrMsg = _('Could not retrieve user details on CustomerID find');
$debug =1;
$IsCustomer_Result = DB_query($sql, $db,$ErrMsg);
if (DB_num_rows($IsCustomer_Result) > 0) {
$IsCustRow = DB_fetch_array($IsCustomer_Result);
$TheCustomerResult = $IsCustRow['customerid'] ;
if ($TheCustomerResult == ''){
} else { $IsCustomerLogon = '1'; }
}


/* if (count($_SESSION['AllowedPageSecurityTokens'])==1){ //its a customer logon */

if ($IsCustomerLogon == '1') {
Reply
12-12-2012, 07:01 PM,
#4
RE: Customer Login
I recently changed session.inc in the svn to more explicity determine whether it is a CustomerLogin - I have updated line 58 to something very similar to your solution.
See svn
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
12-17-2012, 11:36 AM,
#5
RE: Customer Login
Hi,

I just installed 4.09.1, and I have exactly the same issues as
Rock*Star.

Could somebody please guide me as how to configure webERP so Customers can log in and place an order for themselves?

Any guidance would be greatly appreciated.

MacPhotoBiker
MacPhotoBiker
Just Core Business Inc.
[url]http://www.justcorebusiness.com[/url]
Reply
12-17-2012, 12:03 PM, (This post was last modified: 12-17-2012, 12:08 PM by phil.)
#6
RE: Customer Login
I guess I will need to do a new release. In the meantime you can get the file includes/session.inc

https://sourceforge.net/p/web-erp/code/5...format=raw

and SelectOrderItems.php

https://sourceforge.net/p/web-erp/code/5...format=raw

and OrderDetails.php

https://sourceforge.net/p/web-erp/code/5...format=raw

from SVN.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
12-17-2012, 12:09 PM,
#7
RE: Customer Login
Hi Phil,

thank you very much for you prompt reply.

I have no issues with "workarounds", I´d just like to get it running.

Sorry if my question appears ignorant, but who (or what?) is SVN?

Thanks a lot!
MacPhotoBiker
Just Core Business Inc.
[url]http://www.justcorebusiness.com[/url]
Reply
12-17-2012, 12:19 PM,
#8
RE: Customer Login
SVN is an acronym for SubVersioN version management system (like CVS - Concurrent Versioning System and GIT - not sure what that stands for but it is another type of distributed versioning system) - where all the code lives with the most recent changes applied. It is a repository where all developers can access the latest code using a subversion client and see the differences between our code and the "trunk" (the latest submitted scripts). Periodically I roll it up into a file release, but if you need the very latest script - as in a situation like this then that is how you can get it. I modified my post above so it has the links in to get the files for you.

You just need to get these files in the post above and over-write the existing files with these ones. All should be well.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
12-18-2012, 02:02 AM, (This post was last modified: 12-18-2012, 02:13 AM by MacPhotoBiker.)
#9
RE: Customer Login
Thank you very much Phil, I really appreciate it. I will replace the files on my installation, and post the results here.

Thanks again, it´s really of great help to get such responsive support!
Hi Phil,

I replaced the files, but after logging in, I´m getting the following message:

*************************************
INFORMATION Message : The system has just run the regular database administration and optimisation routine.

Fatal error: Call to undefined function google_currency_rate() in /home/justcore/public_html/webERP/includes/session.inc on line 177
*************************************

Is there something else I need to update?

Thanks!
MacPhotoBiker
Just Core Business Inc.
[url]http://www.justcorebusiness.com[/url]
Reply
12-18-2012, 03:29 AM, (This post was last modified: 12-18-2012, 03:33 AM by MacPhotoBiker.)
#10
RE: Customer Login
I replaced the three files Phil posted earlier, changed ownership and read/write access accordingly (chown, chmod 755).

The version I´m using is 4.09.1.

The content of file sql/mysql/upgrade4.09-4.10.sql is:

UPDATE config SET confvalue='4.09.1' WHERE confname='VersionNumber';

Since I´m running version 4.09.1 already, I thought I do not need to run this sql statement. Or am I mistaken? Is there something else I need to do?

I believe I need to replace the file where the function "google_currency_rate()" is defined, since session.inc is calling it, but it can´t be found.

Thanks for your help!
MacPhotoBiker
Just Core Business Inc.
[url]http://www.justcorebusiness.com[/url]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)