Addresses not displayed on invoice

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
DogMa
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 28 Nov 2010, 11:15

Addresses not displayed on invoice

Post by DogMa »

Good Afternoon,

I have just upgraded to the latest VM version and now the addresses on the new invoices don't show. If I view a new invoice there is no address, but if I view an old invoice of the same customer but an old order, the addresses show just fine.

Could you please help me out?

Kind regards,

Rianne
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Addresses not displayed on invoice

Post by Jan »

Hi, maybe you should upgrade to latest version of the addon, see:
https://www.phoca.cz/documents/18-virtue ... eipt-addon

Jan
If you find Phoca extensions useful, please support the project
DogMa
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 28 Nov 2010, 11:15

Re: Addresses not displayed on invoice

Post by DogMa »

Hi Jan,

I all ready have the newest version. In the old version I didn't have this problem. I upgraded to the new one and then it started. Maybe I did something wrong?

If I can help you out with screenprints or something like that, just ask and I will provide them.

Grtz,

Rianne
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Addresses not displayed on invoice

Post by Jan »

Hi, I know there were some problem with addresses (because VM save them different) but this was solved in the old version (and in the new this should work the same way) :idea:

maybe here:
plugins\phocapdf\virtuemart\virtuemarthelper.php

the sql needs to be somehow chnanged:

Code: Select all

case 'dbt1':
                $query = "SELECT a.*, a.state AS state, c.country_name AS country"
                        ." FROM #__{vm}_order_user_info AS a" 
                        ." INNER JOIN #__{vm}_country AS c ON a.country = c.country_3_code OR a.country = c.country_2_code"        
                        ." WHERE a.user_id = '".(int)$var['user_id']."'"
                        ." AND a.address_type = '".$var['address_type']."'"
                        ." AND a.order_id='".(int)$var['order_id']."'";
            break;
            case 'dbt2':
                $query = "SELECT a.*, s.state_name AS state, cc.country_name AS country"
                        ." FROM #__{vm}_order_user_info AS a"
                        ." INNER JOIN #__{vm}_state AS s ON a.state = s.state_2_code"
                        ." AND s.country_id=(SELECT c.country_id FROM #__{vm}_country AS c WHERE c.country_3_code = a.country OR c.country_2_code = a.country)"
                        ." INNER JOIN #__{vm}_country AS cc ON a.country = cc.country_3_code  OR a.country = cc.country_2_code"
                        ." WHERE a.user_id = '".(int)$var['user_id']."'"
                        ." AND a.address_type = '".$var['address_type']."'"
                        ." AND a.order_id='".(int)$var['order_id']."'";
            break; 
Do you use the latest VM version? I have tested in on different servers (with different users - Germany, Slovak, Czech, USA, ...) and everywhere there it was OK :idea: (we have tested all different addresses - with different countries and states ???)

Jan
If you find Phoca extensions useful, please support the project
DogMa
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 28 Nov 2010, 11:15

Re: Addresses not displayed on invoice

Post by DogMa »

I updated to the latest version of VM, but I had some problems, so I went back to 1.1.4. The problem seems to be occuring only with 'old' addresses, so first I thought there was something different with how they are stored, but even with the 'old' addresses, some invoices are fine and others not...

you can leave it up to me to take something that should be running smoothly and break it down :x
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Addresses not displayed on invoice

Post by Jan »

Hi, I have tested it with 1.1.5, and seems it should work with 1.1.6 (as users who use this do not have any problems there) :idea:
If you find Phoca extensions useful, please support the project
DogMa
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 28 Nov 2010, 11:15

Re: Addresses not displayed on invoice

Post by DogMa »

I will update my VM version. I don't know if I have time soon, but I'll let you know what happens ;)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Addresses not displayed on invoice

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Addresses not displayed on invoice

Post by Jan »

Hi, maybe you should enabled debug mode, maybe you get some error message from database in case, the addresses will be not found :idea:

Try to search this forum, there were some similar posts, maybe you can find a solution here.

Jan
If you find Phoca extensions useful, please support the project
Post Reply