Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[#4071] cbsubs extra field in invoicing address

  • serjo
  • serjo
  • OFFLINE
  • Posts: 25
  • Thanks: 2
  • Karma: 0
11 years 6 months ago - 11 years 4 months ago #225046 by serjo
how can we add an extra field to the CBsubs invoicing address? many countries use more than just 1 line for addresses (i.e. suburb)
I have managed to add the field: <param name="address_street2" type="text" size="" default="" label="Address 2" description="" />
to edit.front.invoice.xml
but where is the controller for this? how does it get added to the DB?

can you please advise how to add extra fields to the invoicing address in CBsubs?

using:
CB v2.0.x
CBsubs v 4.1.x
Joomla 3.3+
Last edit: 11 years 4 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago - 11 years 6 months ago #225068 by krileon
Replied by krileon on topic cbsubs extra field in invoicing address
I'm not sure you can, but you can give it a try. In addition to editing the XML file as you've already done you also need to create a column for your new input within _comprofiler database table for it. Based off the above input you'll want to create cb_subs_inv_address_street2 column. Note there's no guarantee this will even work at all.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 11 years 6 months ago by krileon.

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

  • serjo
  • serjo
  • OFFLINE
  • Posts: 25
  • Thanks: 2
  • Karma: 0
11 years 6 months ago #225143 by serjo
Replied by serjo on topic cbsubs extra field in invoicing address
I have tried your solution - but there obviously needs to be a controller that adds the data to the db and I would like to know where to find it and what to add. Am I really the only person out there that needs to have 2 lines for the address? It's such a common thing, in fact I hardly ever see online invoicing addresses with only 1 line.
So please can someone explain how to do this?

using:
CB v2.0.x
CBsubs v 4.1.x
Joomla 3.3+

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225220 by krileon
Replied by krileon on topic cbsubs extra field in invoicing address
Yes, as far as I am aware you're the only one to request this. Mainly because 99% of the payment gateways don't have a second address line. PayPal does I believe, but pretty much all the others do not.

The invoice address page is generated from the XML file and saved by binding the post data to the invoice address model. So as far as I am aware editing it and creating the corresponding database column should work. At any rate you can find the save invoice address function at the below location if you'd like to take a look.

IN: components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/models/order/cbpaidPaymentBasket.php
ON: Line 1665
FUNCTION: saveInvoicingAddressForm


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • serjo
  • serjo
  • OFFLINE
  • Posts: 25
  • Thanks: 2
  • Karma: 0
11 years 6 months ago #225298 by serjo
Replied by serjo on topic cbsubs extra field in invoicing address
I think Switzerland might be one of the few countries that DO NOT have a second address line. USA has, Germany has, UK has, NZ has, Australia has.... as for the gateways, you are not right either... Google checkout does, PayMate does, 2CheckOut does, eWay does.
So why do you say "99% of the payment gateways don't have a second address line" it's not quite true. Anyway.

As for your solution, this does not work. I have also added entries in cbpaidPaymentBasket.php like this:
'ADDRESS_STREET' => $this->address_street,
'ADDRESS_STREET2' => $this->address_street2,
wherever I found it...but the address_street2 does not get entered into the db. I have also placed the DB column in comprofiler straight under the existing one like this: first cb_subs_inv_address_street then next column cb_subs_inv_address_street2

Please take 2min of your time and try it yourself, then let me know how, and if, you where able to add a second address line to the invoicing. Maybe you want to add this to your feature requests - just an idea...

using:
CB v2.0.x
CBsubs v 4.1.x
Joomla 3.3+

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225319 by krileon
Replied by krileon on topic cbsubs extra field in invoicing address

I think Switzerland might be one of the few countries that DO NOT have a second address line. USA has, Germany has, UK has, NZ has, Australia has.... as for the gateways, you are not right either... Google checkout does, PayMate does, 2CheckOut does, eWay does.
So why do you say "99% of the payment gateways don't have a second address line" it's not quite true. Anyway.

The purpose of the invoice address information is to pass it to the payment gateway. Most payment gateways don't have a second address line, but really that should be irrelevant and the invoice address page should be more customizable, which we plan to improve with a later release.

Please take 2min of your time and try it yourself, then let me know how, and if, you where able to add a second address line to the invoicing. Maybe you want to add this to your feature requests - just an idea...

You can't add to the invoice page. Please see my above replies where I clearly state it may not work; this was simply a test to see if it would work, which appears it does not. We already have plans to improve customization of the invoice address usage though as I agree it needs to be more customizable (maybe somehow can be designed from backend?).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum