Display custom address fields on billing address

  • Posts: 209
  • Thank you received: 18
  • Hikashop Business
13 years 2 months ago #7412

Hi,

I have created several custom address fields to be completed during registration. How can I allow the user to edit those fields when going through the checkout? At the moment all that displays are the core address fields unless the customer clicks the edit icon.

I need to show the custom fields completed with their relative labels.

I'm thinking that I need to edit the Display > Views > address_template but I'm not sure how to get the labels for the custom fields to show as well.

Any help appreciated.

cheers!

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

  • Posts: 81567
  • Thank you received: 13075
  • MODERATOR
13 years 2 months ago #7415

Hi,

You indeed need to edit the Display > Views > address_template. There you have one tag per custom field. As you can see it uses the column name of the custom field.
So, if your custom field column name is 'my_custom_field', then, the tag will be {my_custom_field} in the address_template view.

The following user(s) said Thank You: oxheadproductions

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

  • Posts: 209
  • Thank you received: 18
  • Hikashop Business
13 years 2 months ago #7541

Thanks Nicolas, I though I was on the right track - but how do I get the field label to show as well?

cheers!

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

  • Posts: 81567
  • Thank you received: 13075
  • MODERATOR
13 years 2 months ago #7542

You can write it directly in the view:
My field: {field_column_name}

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

  • Posts: 209
  • Thank you received: 18
  • Hikashop Business
13 years 2 months ago #7548

Awesome - thanks!

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

  • Posts: 209
  • Thank you received: 18
  • Hikashop Business
13 years 1 month ago #9912

How do you get the custom fields to show on either the tax invoice or the shipping invoice?

At the moment it seems that only the administrator can get this info from the backend on the Sales pages.

cheers!

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

  • Posts: 81567
  • Thank you received: 13075
  • MODERATOR
13 years 1 month ago #9919

If you edit the address_template files you can add the custom fields info. There are two address_template files. One for the front end and one for the back end.
So if you add it on the front end one, your users will see it as well on their order details page.

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

  • Posts: 35
  • Thank you received: 0
13 years 1 month ago #10395

This not working for me. I added a custom field called 'address' so I have two address lines with lables 'address line one' and 'address line two'. It appears on the checkout pages, but it does appear on the shipping invoice.

I did as mentioned in this thread in the address template back end and front end.

Code here:

<?php
/**
* @package HikaShop for Joomla!
* @version 1.4.3
* @author hikashop.com
* @copyright (C) 2010 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
{address_company}
{address_title} {address_firstname} {address_lastname}
{address}
{address_street}
{address_post_code} {address_city} {address_state}
{address_country}
<?php echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');?>

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

  • Posts: 35
  • Thank you received: 0
13 years 1 month ago #10397

Also the custom field does not show in the billing address page view

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

  • Posts: 81567
  • Thank you received: 13075
  • MODERATOR
13 years 1 month ago #10398

And did you activate your custom field for back end display ? Because otherwise, the tag won't be replaced.

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

  • Posts: 35
  • Thank you received: 0
13 years 1 month ago #10401

Also Paypal is not pulling through the billing address fields

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

  • Posts: 81567
  • Thank you received: 13075
  • MODERATOR
13 years 1 month ago #10403

What is the configuration you set in the paypal payment plugin ? Did you select the billing address in the address option ?

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

  • Posts: 35
  • Thank you received: 0
13 years 1 month ago #10488

Yes I did - I note the only thing different to the other fields is it is not core

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

  • Posts: 35
  • Thank you received: 0
13 years 1 month ago #10490

Yes it is set to billing address

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

  • Posts: 81567
  • Thank you received: 13075
  • MODERATOR
13 years 1 month ago #10493

Having it core or not doesn't make any difference. This core setting only prevents you from deleting default custom fields, that's all. It doesn't have any impact on the custom field display.

Are you sure that you made your address_template modification for the good template ? If you have several templates installed on your website, you will have the address_template view several times (one per template) so if you don't do it for the template you're using, it won't be used by hikashop when you display that view.

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

  • Posts: 35
  • Thank you received: 0
13 years 1 month ago #10496

Hi Nicolas

thanks for your help - yes I had not changed the correct address_template for the template I am using.

I have done it now - both of them the one for front end and back end.

BUT I still have 2 problems.

The shipping invoice format still does not reflect the changes.

Paypal is not pulling the data for the address I am getting town and postcode but not address line one and two and county. This is does not harm functionality but confuses customers who think they have to refill data.

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

  • Posts: 81567
  • Thank you received: 13075
  • MODERATOR
13 years 1 month ago #10504

Hi,

For your first problem, are you sure that you did the modification in the good template of the BACKEND ? If you use joomla 1.6, the default template of the back end is called bluestork.

HikaShop only sends the default custom address fields to joomla. There is no county field in HikaShop by default so it's not sent to paypal. The address_street custom field should be sent to paypal but the address field you added can't be sent to paypal since paypal wouldn't know what to do with it.

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

  • Posts: 35
  • Thank you received: 0
13 years 1 month ago #10518

This solved it - I made the change to the Bluestork template.

And the shipping invoice and Paypal address works now.

Thankyou for your patience!

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

  • Posts: 2
  • Thank you received: 0
13 years 1 month ago #11223

need to add the customer email address to the Invoice and Shipping Invoice views. How to?


thanks!

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

  • Posts: 81567
  • Thank you received: 13075
  • MODERATOR
13 years 1 month ago #11234

You can edit the file invoice of the view order via the menu Display->Views. There, you can add the code:
echo 'User email : '.$this->order->customer->user_email;

(You might need to put it between <?php and ?> depending on where you want to put it in the invoice)

Last edit: 13 years 1 month ago by nicolas.
The following user(s) said Thank You: huwhuw

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

Time to create page: 0.111 seconds
Powered by Kunena Forum