- Posts: 127
- Thank you received: 6
Edit Cart Username
-- Joomla version -- : 3.4.8
Hi
When I try to change the user name for a cart (at the back end) the user I select is replaced with a random user.
I have checked the database and cleared all cache but the problem remains.
It is a useful method for us when we want to create an order for a customer. We load a cart logged in as a Test-User and then, when we are happy, go to the back-end and change the user for that cart. But at the moment we cannot select the user we want. We can see the user we want, but on confirm a different user is selected.
Help would be much appreciated.
Kind regards, Bob
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I just tried on my local and I don't have this issue. Do you have overrides for the backend cart views ?
Are the customers existing and with the correct ID in database ?
Please Log in or Create an account to join the conversation.
Would you be willing to register at the site for me to set you admin rights?
Please Log in or Create an account to join the conversation.
You can directly create an account for us and send us the informations via our contact form with a link to this topic in your message.
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The given account does not allow me to reach the backend and so see the issue.
Could you grant the access for this account ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I am not able to reproduce the issue. When I add a customer to the cart, the correct customer is added.
Even when I add a customer form the third page of the list, no problems.
ps: after a second attempt it seems that if you select a customer, then another one it is not working as expected. So in this case you have to close the cart edition page (go back on the listing) and open again the cart page and set the customer.
Please Log in or Create an account to join the conversation.
What we want to do is create a cart using one of our own staff accounts, with the same ACL (determined by User Group) as the customer, from the front end. Then assign that cart to the customer, ready for when they login.
But when we switch from one of our Staff Accounts (often we use Testdealer for our wholesale customers) and try to select one customer, another is chosen instead. It seems like the relationship between User Group and Customer isn't working correctly.
A good example is Testdealer (ID80, used to create the cart) then assign it to one wholesale customer, Nickb (ID632). When we select Nickb, who is also a member of the ACL Group Dealers (ID10) a seemingly random user is selected instead.
Please Log in or Create an account to join the conversation.
Xavier wrote: Hi,
ps: after a second attempt it seems that if you select a customer, then another one it is not working as expected. So in this case you have to close the cart edition page (go back on the listing) and open again the cart page and set the customer.
if I understand this issue correctly, it is the same issue I had in the past.
When you select customer for the cart, there is a race condition.
Click on the button fire 2 requests: submit form and parent window reload
In case you saved cart before, parent reload will replay post request and if form submit is faster, then previous customer is saved again.
Please Log in or Create an account to join the conversation.
So please try to replace the code:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Xavier wrote: Hi,
So please try to replace the code:Code:window.parent.location.reload(); [code] By: [code] setTimeout(function(){ window.parent.location.reload(); },1500);
This will not work as form submission will cancel setTimeout before it could execute. It should work with value 200-500, but again, if you saved cart before, it will reload last post request and save again old value.
I spent a lot of time with this and ended up with solution:
1. Hide customer part if $this->cart->cart_id is not set
2. In parent window add js function to redirect to cart form and call it from iframe
Please Log in or Create an account to join the conversation.
You're right, my code could not be working fine.
Please edit the file "administrator/components/com_hikashop/controllers/cart.php" and replace the function "customer_save()" by:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please provide a ftp access via our contact form. (with url to this topic in the message)
I will debug this on your end directly.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I am not able to connect to your FTP. Could you check this ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.