LemonStand Forum: Can we have a second address field - LemonStand Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Can we have a second address field

#1 User is offline   Leon 

  • Member
  • Group: Members
  • Posts: 10
  • Joined: 27-June 11

Posted 10 November 2011 - 01:32 AM

Hi all,

Let me start by saying that Lemonstand is a fantastic product, well done!

Here in the UK, most addresses require the use of a second address field, between street address and city:

Street address,
Village,
Town,
County,
Post Code

Would this be possible to implement for the checkout process for both shipping and billing addresses?

Regards,
Leon
0

#2 User is offline   Eric 

  • Developer
  • PipPipPip
  • Group: Members
  • Posts: 1,290
  • Joined: 04-August 10
  • LocationVancouver, Canada

Posted 16 November 2011 - 01:27 PM

Hi Leon,

How about using a textarea for the address in your frontend HTML? Would that work?

Thanks
0

#3 User is offline   PaulC 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 31
  • Joined: 12-September 11

Posted 24 November 2011 - 02:58 AM

I'm looking for a similar solution and not having much success in creating a module to add a second address line.

A textarea would work however the site I am working on is linked to Sage which has a 30 character field limit, therefore two address fields is required.

I'll keep you posted if I have any success with the module.
0

#4 User is offline   PaulC 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 31
  • Joined: 12-September 11

Posted 24 November 2011 - 08:54 AM

I have managed to add an extra address line to both billing and shipping forms using the Extending Customers method http://lemonstandapp...xisting_models.

I now need to work out how to get it to work with copy billing information, any ideas?
0

#5 User is offline   Manca 

  • Developer
  • Group: +Administrators
  • Posts: 114
  • Joined: 02-September 11

Posted 24 November 2011 - 11:26 AM

View PostPaulC, on 24 November 2011 - 08:54 AM, said:

I have managed to add an extra address line to both billing and shipping forms using the Extending Customers method http://lemonstandapp...xisting_models.

I now need to work out how to get it to work with copy billing information, any ideas?


Hi Paul,

You will need to use a custom ajax handler for copying billing information. Look at the current ajax handler (shop:on_copyBillingInfo). You need to also copy over the new fields you've added. Check out this post that explains how to access the field for the billing info (use get_custom_field) and then you can use get_custom_fields and set_custom_fields (see the Shop_CheckoutData class) to not just get the value of the field but also set it.

Hope that steers you in the right direction.

#6 User is offline   PaulC 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 31
  • Joined: 12-September 11

Posted 02 December 2011 - 04:52 AM

View PostManca, on 24 November 2011 - 11:26 AM, said:

Hi Paul,

You will need to use a custom ajax handler for copying billing information. Look at the current ajax handler (shop:on_copyBillingInfo). You need to also copy over the new fields you've added. Check out this post that explains how to access the field for the billing info (use get_custom_field) and then you can use get_custom_fields and set_custom_fields (see the Shop_CheckoutData class) to not just get the value of the field but also set it.

Hope that steers you in the right direction.


Thanks very much for your help, I've kind of had to give up on this one though. I've settled for copying the billing info across automatically on page load without the copy button trigger, i.e. <?= h(Shop_CheckoutData::get_custom_field('billing_address_2')) ?>.
0

Share this topic:


Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users