webERP Forum
Customer Login - Printable Version

+- webERP Forum (
+-- Forum: webERP Discussion (
+--- Forum: Problems / Bugs? (
+--- Thread: Customer Login (/showthread.php?tid=460)

Pages: 1 2

Customer Login - Rock*Star - 12-11-2012

Just downloaded and installed from site

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.

RE: Customer Login - Rock*Star - 12-12-2012

line 58 of SelectOrderItems

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

is never true because


has two members

0 = '0'
1 = '1'

RE: Customer Login - Rock*Star - 12-12-2012

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') {

RE: Customer Login - phil - 12-12-2012

I recently changed 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

RE: Customer Login - MacPhotoBiker - 12-17-2012


I just installed 4.09.1, and I have exactly the same issues as

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.


RE: Customer Login - phil - 12-17-2012

I guess I will need to do a new release. In the meantime you can get the file includes/

and SelectOrderItems.php

and OrderDetails.php

from SVN.

RE: Customer Login - MacPhotoBiker - 12-17-2012

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!

RE: Customer Login - phil - 12-17-2012

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.

RE: Customer Login - MacPhotoBiker - 12-18-2012

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/ on line 177

Is there something else I need to update?


RE: Customer Login - MacPhotoBiker - 12-18-2012

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 is calling it, but it can´t be found.

Thanks for your help!