
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Windows XP + Apache 2.2
|
|
|
I tried to do a "purchase" with the sample database; when I went through the account creation process during checkout the response indicated the account creation was successful, but nothing went into the database. I tracked this down to a problems with the osc_customers table: the fields customers_default_address_id and customers_telephone were not filled in on the creation form, had no default values and were labeled "NOT NULL" , so MySQL failed the INSERT, which was not detected.
I fixed the problem by adding a default value of 0 for the address_id and removing the "NOT NULL" from the telephone field. I don't know if this is the desirable fix, but it worked to get checkout going.
To find this I added the following to Osc_Database::setError and turned on query logging; I think this might be helpful in general, even though this particular error won't occur with proper table definition.
{code}
if (!osc_empty(SERVICE_DEBUG_EXECUTION_TIME_LOG) && (SERVICE_DEBUG_LOG_DB_QUERIES == '1')) {
@error_log('QUERY-ERROR ' . $this->getError() . "\n", 3, SERVICE_DEBUG_EXECUTION_TIME_LOG);
}
{endcode}
|
|
Description
|
I tried to do a "purchase" with the sample database; when I went through the account creation process during checkout the response indicated the account creation was successful, but nothing went into the database. I tracked this down to a problems with the osc_customers table: the fields customers_default_address_id and customers_telephone were not filled in on the creation form, had no default values and were labeled "NOT NULL" , so MySQL failed the INSERT, which was not detected.
I fixed the problem by adding a default value of 0 for the address_id and removing the "NOT NULL" from the telephone field. I don't know if this is the desirable fix, but it worked to get checkout going.
To find this I added the following to Osc_Database::setError and turned on query logging; I think this might be helpful in general, even though this particular error won't occur with proper table definition.
{code}
if (!osc_empty(SERVICE_DEBUG_EXECUTION_TIME_LOG) && (SERVICE_DEBUG_LOG_DB_QUERIES == '1')) {
@error_log('QUERY-ERROR ' . $this->getError() . "\n", 3, SERVICE_DEBUG_EXECUTION_TIME_LOG);
}
{endcode} |
Show » |
|
|