6 replies [Last post]
ciobulus's picture
Offline
Joined: 12/14/2009
Juice: 25
Was this information Helpful?

Hello, I'm facing a big problem because here in the country i live in the invoice needs to have some additional info like : Vat number, Chamber of commerce registration number, the bank used by the company, the bank account number. I've tried using a MacGyver style solution by renaming fields like telephone and postal code to vat number and commerce reg number but i cant display them in the order summary or the invoice using tokens because they have no tokens set for them, also using additional fields in checkout module doesn't work for this because they have no token functionality yet and i have no idea how to extract info from the mysql database. The only option i can see right now is to replicate what they did in the VAT number module and edit them to suite my needs but i don't know how to do that either because i cant identify what does what in that code so if someone could explain to me briefly the code used to 1: add a new text field in the checkout section 2: create the new token used to display the info in the invoice. Thank you and please help me with this issue as i develop more and learn about this software i'l be able to help others in the near future. Thank you

I've attached the VAT number module for people to interpret the code and help me, i hope this is not illegal.

PreviewAttachmentSize
uc_vat_number.tar.gz8.66 KB
ciobulus's picture
Offline
Joined: 12/14/2009
Juice: 25
Re: ubercart checkout, European shop needs more fields for clien

anyone?

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
Re: ubercart checkout, European shop needs more fields for clien

Have you also seen the "Extra Fields Checkout Pane" contribution:
http://www.ubercart.org/contrib/13826

ciobulus's picture
Offline
Joined: 12/14/2009
Juice: 25
Re: Re: ubercart checkout, European shop needs more fields for c

yes as I sayd, i tried that but it dosent have token integration and i tried useing the info from the mysql but ran into another problem: how can i select the row for the specific order ? so i can display the info for that sepcific order and not all of them
  $data = ("SELECT ucxf_cui_billing FROM uc_extra_fields_values WHERE order_id = '11'");
this works but i dont know how to make it so it will automaticaly select the order number in the query so i can display the info for that order only. I saw that the Vat number module used this

   $order_data = db_result(db_query('SELECT data FROM {uc_orders} WHERE order_id = %d', $_SESSION['cart_order']));
      $order_data = unserialize($order_data);

they used %d for the order_id and i'm really noob with php code but i cant figure out how they did that coz it dosent work for me if i try to replicate it in my mysql query. Please help! i'm going nuts running in circles.

ciobulus's picture
Offline
Joined: 12/14/2009
Juice: 25
Re: Re: Re: ubercart checkout, European shop needs more fields f

issue solved, i figured it out, thank you anyway

eliasdelatorre's picture
Offline
Joined: 10/18/2010
Juice: 4
How you solved it?

Hi there.

I have the same problem, here at Mexico we have to store additional info for each invoice.

How do you finally solved your problem? Can you post it here please?

Thank you.

tomas.teicher's picture
Offline
Joined: 03/30/2011
Juice: 29
Re: Re: Re: Re: ubercart checkout, European shop needs more fiel

I have the same problem. I need to add store info (store address, name) into invoice.

Can anuybody help?
thanks