- Posts: 515
- Thank you received: 22
changing customeraddress in backend database error
- jouwnaambord.nl
-
Topic Author
- Offline
Less
More
10 years 2 months ago #246452
by jouwnaambord.nl
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6
-- PHP version -- : 5.5.9
Hi,
When I change an address (billing or shipping) in an existing or new order, the address_user_id in the database stays empty (0) instead of being updated with the user_id. Could this be a bug?
Michel
-- Joomla version -- : 3.6
-- PHP version -- : 5.5.9
Hi,
When I change an address (billing or shipping) in an existing or new order, the address_user_id in the database stays empty (0) instead of being updated with the user_id. Could this be a bug?
Michel
Please Log in or Create an account to join the conversation.
10 years 2 months ago #246463
by nicolas
Replied by nicolas on topic changing customeraddress in backend database error
Hi,
The address_user_id of an address should never be 0 unless you deleted the user entry in the hikashop_user table.
So I don't understand why you say that it "stays" empty. It should not be 0 to begin with when it is created in the frontend.
The address_user_id of an address should never be 0 unless you deleted the user entry in the hikashop_user table.
So I don't understand why you say that it "stays" empty. It should not be 0 to begin with when it is created in the frontend.
Please Log in or Create an account to join the conversation.
- jouwnaambord.nl
-
Topic Author
- Offline
Less
More
- Posts: 515
- Thank you received: 22
10 years 2 months ago #246538
by jouwnaambord.nl
Replied by jouwnaambord.nl on topic changing customeraddress in backend database error
Hi,
No, of course it shouldn't. But it does. When editing the address as admin in the backend in an order a new address_id is made in the database. The user_id in this new addressfield is set to 0 by the system, see both screenshots.
No, of course it shouldn't. But it does. When editing the address as admin in the backend in an order a new address_id is made in the database. The user_id in this new addressfield is set to 0 by the system, see both screenshots.
Please Log in or Create an account to join the conversation.
10 years 2 months ago #246602
by nicolas
Replied by nicolas on topic changing customeraddress in backend database error
Hi,
Ok, I see what's wrong.
Please add the line:
$billing_address->address_user_id = $oldAddress->address_user_id;
before:
$result = $addressClass->save($billing_address, $order_id, 'billing');
and the line:
$shipping_address->address_user_id = $oldAddress->address_user_id;
before:
$result = $addressClass->save($shipping_address, $order_id, 'shipping');
in the file administrator/components/com_hikashop/classes/order.php and that will fix the problem.
Ok, I see what's wrong.
Please add the line:
$billing_address->address_user_id = $oldAddress->address_user_id;
before:
$result = $addressClass->save($billing_address, $order_id, 'billing');
and the line:
$shipping_address->address_user_id = $oldAddress->address_user_id;
before:
$result = $addressClass->save($shipping_address, $order_id, 'shipping');
in the file administrator/components/com_hikashop/classes/order.php and that will fix the problem.
Please Log in or Create an account to join the conversation.
Time to create page: 0.168 seconds