Share this post

Link to post

Share on other sites

I've tested but it's not working. I can't figure out what's missing. It basically get's the VAT in the registation (if user inserted one), and ask if it want to use in that order.

If yes it insert the current customer_nif from customers if not inserts NULL.. If in the registation the user didn't insert a VAT number in checkout_payment.php it asks if he want to use one for this order.

Share this post

Link to post

Share on other sites

Well @frankl I don't know why but this suddenly stopped to working. I've added a time ago a function to associate the vat number to customers db. It was working.. Only the orders aren't working. It insert a empty value to billing_nif.

Basically it's the same code all tep_db_prepare_input and orders.php are the same.

Share this post

Link to post

Share on other sites

Hi @wHiTeHaT thank for you answer. It initially worked.. When the customer register/alter account it can add the VAT number but when it's on the checkout_payment it shows if it's already on account and if customer want to use it in this order, else it asks if want to add a new one and associated it to the account. (it adds correctly but doesn't insert into orders).

I've tested it now but doesn't work, in checkout_confirmation.php if I var_dump the POST vars it shows the billing_nif so I think the problem is missing in checkout_process or classes/order.php

Share this post

Link to post

Share on other sites

Well, I really don't know what is happening - this stopped again working.

@burt The idea is to see admin/orders.php and it showing if the client choice VAT in this order.

When a new client create a account it ask if it want to add VAT to his account.

In the checkout_payment (if it has inserted) will show the VAT number and asks if he want this order with VAT, otherwise it will be a input to write and checkbox if he want to associate it to the account.

The code for associate the account works well as it insert into table customers but in the orders every "billing_nif" is a empty space. Neither the VAT or NULL.

If someone could really take a lot into this I would be really appreciate as this site is going live soon. Just tell the files needed.

Share this post

Link to post

Share on other sites

Have a look at the checkout success content module cm_cs_product_notifications

It accesses both customer_id which is still set for logged in customers and order_id which is already set to that customer's latest order. Then if they pay with paypal, worldpay etc you'll still get the info.