Page 1 of 1

Addresses not displayed on invoice

Posted: 28 Nov 2010, 13:44
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

Re: Addresses not displayed on invoice

Posted: 01 Dec 2010, 20:18
by Jan
Hi, maybe you should upgrade to latest version of the addon, see:
https://www.phoca.cz/documents/18-virtue ... eipt-addon

Jan

Re: Addresses not displayed on invoice

Posted: 05 Dec 2010, 17:07
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

Re: Addresses not displayed on invoice

Posted: 06 Dec 2010, 23:42
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

Re: Addresses not displayed on invoice

Posted: 07 Dec 2010, 14:42
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

Re: Addresses not displayed on invoice

Posted: 12 Dec 2010, 00:32
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:

Re: Addresses not displayed on invoice

Posted: 12 Dec 2010, 10:57
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 ;)

Re: Addresses not displayed on invoice

Posted: 14 Dec 2010, 17:42
by Jan
Ok

Re: Addresses not displayed on invoice

Posted: 01 Jan 2011, 23:39
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