Quote:
Originally Posted by cflsystems
Ok next - let's start with the bugs - 4.4.3
http://forum.x-cart.com/showpost.php?p=312270&postcount=195
Reported on March 10 and here we are 2 months later this is not fixed. I am still to check with fake order if the userid=0 is fixed or not but looking at the code seems it's not fixed. Then the second part about the Advanced Statistics / Recommended Products is carried to 4.4.3 again. Am I reading this wrong or QT just ignores some reports?
This is how the upgrade "fixes" these bugs
Code:
- 'userid' => $userinfo['id'] ? $userinfo['id'] : 0,
- 'membershipid' => $userinfo['membershipid'],
- 'membership' => addslashes($userinfo['membership']),
+ 'userid' => !empty($userinfo['id']) ? $userinfo['id'] : 0,
+ 'membershipid' => @$userinfo['membershipid'],
+ 'membership' => addslashes(@$userinfo['membership']),
Again I think the 0 userid will still happen.
Code:
- if (!empty($active_modules['Recommended_Products'])) {
+ if (
+ !empty($active_modules['Recommended_Products'])
+ && !empty($userinfo["id"])
+ ) {
Again - why "Recommended Products"? Are they pulled off of the stats table?
So QT - does this fixes the bugs or not? Do I need to again report in the bugtracker? Or these are not bugs?
|
Answering to your above questions:
1) The 0 userid is added to the "xcart_orders" table:
Code:
// Insert into orders
$insert_data = array (
'userid' => !empty($userinfo['id']) ? $userinfo['id'] : 0,
It's OK, as the 0 userid means "anonymous" customer.
However, there was a bug - the 0 userid was added to the "xcart_stats_customers_products" table. That bug has been fixed in 4.4.3 as follows:
Code:
- if (!empty($active_modules['Recommended_Products'])) {
+ if (
+ !empty($active_modules['Recommended_Products'])
+ && !empty($userinfo["id"])
+ ) {
2) The "xcart_stats_customers_products" table is used by the 'Recommended_Products' module to get statistics about products purchased by customers in the past. The stats is used when the module's option 'Select recommended products randomly' is turned OFF.