Name field empty

  • Posts: 151
  • Thank you received: 9
12 years 1 month ago #66789

Hi,

I am selling downloads only. Checkout is simple: No registration and I only ask an e-mail address and Name.
For the Name I use the "Last name" field.

I disabled all the other fields in Custom Fields, because they're not necessary.

The checkout process works fine, but when I check the order in the backend, the Name field is emtpy and so is the name in the personalized e-mails that are sent to the customer.

How can I fix this?

Thank you
Maurice Wasbauer

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 1 month ago #66967

Hi Maurice,

You can edit the view "order / listing" (backend) in HikaShop > Display > Views, and replace:

						 if(!empty($row->username)){
						 	echo $row->name.' ( '.$row->username.' )</a><br/>';
						 }
By:
						 if(!empty($row->username)){
						 	echo $row->name.' ( '.$row->username.' )</a><br/>';
						 }else{
						 	echo $row->name.'</a><br/>';
						 }

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 9
12 years 1 month ago #67200

Hi,

Your solution works partly.

In the backend orders, the customer is the e-mail address. This is ok.

In the backend Customers the "Name" and "Username" fields are empty. Since "Registration" is set to "No Registration", there is no username. However, the "Name" field should be filled with the "Last name" field value.

When I change the status of an order manually, I have the option to send an e-mail to the customer. Here too the name field is not filled.

Furthermore, since this "Name" field is empty, the customer is also not moved to AcyMailing, I assume this has to do with the same problem.

Please help.

Kind regards,
Maurice

Last edit: 12 years 1 month ago by Maurice.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 1 month ago #67237

Hi,

I think that your answer is in this topic:
www.hikashop.com/en/forum/4-how-to/53045...n-backend.html#67137

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 9
12 years 1 month ago #67242

Hi Xavier,

Thank you. a Name view on the orders page is quite handy, however, it does not answer my questions.

What I need is:

  • a filled Name field on the customers page. Now it is empty.
  • the customer name must be filled in, in the e-mails that are sent. The name is now empty.
  • the customer name must be transferred to AcyMailing via the AcyMailing HikaShop plugin.


Ik think the Shipping Last Name value must be stored ALSO in the Customer Last Name field when an order is created and when the Customer Last Name field is empty. I think the Customer Last Name field must always be filled to avoid these problems.

I guess that will be the solution because the above three problems arise from the fact that the Customer Last Name field is empty when an order is created. If you agree, can you tell me where and how I can do this?



Thank you,
Maurice

Last edit: 12 years 1 month ago by Maurice.

Please Log in or Create an account to join the conversation.

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 1 month ago #67493

The Name field of a customer is a joomla user field. It is stored in the jos_users table, in the field name.
Since you set the system to "no registration", no user account is created during the checkout, and thus there is no "name" to add in the emails, the customer page, etc, etc.

I would recommend to unpublish the lastname field and to create a new field called "name" and of the table "user" (and not address).
That way the data will be attached to the user and there is a good chance that it will make it display everywhere.

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 9
12 years 1 month ago #67522

Hi Nicolas,

I tried your suggestion and unfortunately things get worse.
Now I also have no name on the checkout page after filling in the name (in the new name field) while everything else is the same. The name is not displayed anywhere and the user is not transferred to AcyMailing.

Isn't it better to go back to the previous name (address) field and use that field on all places where the name is needed?
- e-mail
- backend
- AcyMailing HikaShop plugin

Maurice

Please Log in or Create an account to join the conversation.

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 1 month ago #67606

Hi,

Can you try to change the line:
$select='a.*,b.*';

to:

$select='b.*,a.*';

in the file administrator/components/com_hikashop/classes/user.php ?

That should help add it in the emails and back end of HikaShop.

For acymailing, there is no trigger implemented if you are in "no registration" mode. You need to do a manual import in acymailing as explained here:
www.acyba.com/en/support/documentation/8...import.html#hikashop

Using the address last name field is much more complex and you won't be able to import it in acymailing, which is why I recommended you to use a custom user field.

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 9
12 years 1 month ago #67617

Hi Nicolas,

I don't understand. I changed the file as you suggested, but this doesn't change anything in the results. I'm getting a little desperate here, trying all kinds of suggestions that don't work.

When I use the custom fields instead of the address fields, I immediately get an empty popup with an "ok" button in it, as soon as I fill in the new custom field Name and click the "ok" button. This is the kind of popup that you get when you want to edit or add an address.

It looks like the system does not get any address information (because the address Name field is disabled and the new custom Name fiel comes in its place), it asks for it in the popup. But because the address Name field is disabled, you wont see it in the popup.

When I click the "ok" button in the empty popup, the popup closes.

The Address Name field, that's normally being displayed after filling it in (to show you what you filled in) is now empty.


At this point I can finish the checkout.


When I go to the orders page in the backend two error messages appear in the Billing Address pane and the Delivery Address pane:
Warning: Invalid argument supplied for foreach() in /home/domain/public_html/niburu.nu/administrator/components/com_hikashop/views/order/tmpl/form_address.php on line 32

The name fields in th eemail and everywhere else are still empty.

So using the custom fields make the problem bigger.

However, now that I use the custom fields, as you suggested, what do I need to do to:

- Fix the empty popup that appears immediately after filling in the name and pressing the little "ok" button
- Fix the Address Name field, that's normally being displayed after filling it in (to show you what you filled in) is now empty.
- Fix the two errormessage in the back-end orderpage "Billing Address" and the "Delivery Address" pane
- Display the name in the e-mails
- Solve the problem with the AcyMailing plugin

Thank you,
Maurice

Last edit: 12 years 1 month ago by Maurice.

Please Log in or Create an account to join the conversation.

  • Posts: 151
  • Thank you received: 9
12 years 1 month ago #67625

UPDATE: I see that the field "name" in the table hikashop_user, is NOT filled when I place a test order.

Please Log in or Create an account to join the conversation.

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 1 month ago #67890

Hi,

Well, you're trying to do something which is out of the possible options provided. Which means that it requires development done by a developer.
Note that this forum is for support. We try to help for development questions on HikaShop and especially when it's only one or two lines of code but we can't do customization projects here.

I will recommend that either you use the simplified registration mode and keep one of the address name fields published (which will do what you want, use the name, give it to acymailing, etc all that automatically), or that you hire a developer to work on the customization you want with the "no registration" mode.

Please Log in or Create an account to join the conversation.

Time to create page: 0.085 seconds
Powered by Kunena Forum