IDR via Email doesn't work at all!?

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
Nukem36
Phoca Enthusiast
Phoca Enthusiast
Posts: 65
Joined: 08 Sep 2008, 19:34

IDR via Email doesn't work at all!?

Post by Nukem36 »

High !

My environement:
Joomla is 1.5.20
VM is 1.1.4
PHP is 5.2.13

I installed and configured the addon like explained here from Jan:

https://www.phoca.cz/documents/18-virtue ... -via-email

Email-Check worked fine. Databasetables were created and the functions are available. I checked configuration 3 times, additionally a second person checked it, but I may do what I want: When opening an order and selecting "Delivery" (yes I see it!) the component shows always "Not all products are delivered". I tried all order stati, but no change?

While playing around (deleting orders all the time to start from scratch..) I got the pdf-icons one time, but then I got an error "TCPDF ERROR: Some data has already been output, can't send PDF file". I read in several threads about coding problems (utf8 / ISO8859-1) for language files, and I did find 2 german translation files with this problem and fixed that.

But like I said, only one time....

Could anyone give me a hint? I'm checking, reading googeling since 4 days, and I'm really stuck

Regards
Nukem36
Nukem36
Phoca Enthusiast
Phoca Enthusiast
Posts: 65
Joined: 08 Sep 2008, 19:34

Re: IDR via Email doesn't work at all!?

Post by Nukem36 »

High !

Jan: could it be that in your code there is a problem with table-prefixes? I just cleared my VM tables, created a new order and had a look at the component tables (vm_bills, vm_deliveries, vm_delivery_item). They are empty! As I understood, there should be some data in it!?

What may be different in my installation: I do not use the standard tabble prefix jos_, but asp_ (there are 2 joomla websites on one database!).

May this be the problem?

Regards
Nukem36
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: IDR via Email doesn't work at all!?

Post by Jan »

Hi, the standard VM SQL queries are used in this addon:

Code: Select all

$q="CREATE TABLE `#__{vm}_delivery_item` (
`delivery_item_id` int(11) NOT NULL auto_increment,
`delivery_id` int(11) NOT NULL default '0',
`order_id` int(11) NOT NULL default '0',
`vendor_id` int(11) NOT NULL default '0',
`order_item_id` int(11) NOT NULL default '0',
`obliterated` tinyint(1) NOT NULL default '0',
`product_quantity_delivered` int(11) default '0',
PRIMARY KEY  (`delivery_item_id`),
KEY `idx_delivery_item_delivery_id` (`delivery_id`),
KEY `idx_delivery_item_order_id` (`order_id`),
KEY `idx_delivery_item_vendor_id` (`vendor_id`),
KEY `idx_delivery_item_obliterated` (`obliterated`),
KEY `idx_delivery_item_order_item_id` (`order_item_id`)
) TYPE=MyISAM;";
$db->query($q);
If you find Phoca extensions useful, please support the project
Nukem36
Phoca Enthusiast
Phoca Enthusiast
Posts: 65
Joined: 08 Sep 2008, 19:34

Re: IDR via Email doesn't work at all!?

Post by Nukem36 »

High Jan,

thanks I checked that already. In administrator/components/com_virtuemart/classes/ps_delivery.php

line 370, this seems to be not ok:
$qt = "SELECT order_info_id FROM jos_vm_order_user_info WHERE user_id='".$user_id."' AND order_id='".$d['order_id']."' AND address_type='ST' ";

I thinks this should be:

$qt = "SELECT order_info_id FROM #__{vm}_order_user_info WHERE user_id='".$user_id."' AND order_id='".$d['order_id']."' AND address_type='ST' ";

Isn't it? With another prefix this table will not be found..

Anyhow, this was not the solution for my problem... The icons are still not shown

Regards
Nuklem36
Nukem36
Phoca Enthusiast
Phoca Enthusiast
Posts: 65
Joined: 08 Sep 2008, 19:34

Re: IDR via Email doesn't work at all!?

Post by Nukem36 »

High!

one step further....

After playing around with the language files (english and german) I had to notice, that some of them were coded UTF8, but internaly marked as ISO8859-1, what is not really beautiful for PHP! I had to change all files to UTF8 encoding changing additionally the pragma

'CHARSET' => 'UTF-8'

I found several special characters (STX,ETX) in the files preventing - at least - the component to run! I'll give the virtuemart translator some hints concerning that.

Additionally I had to erase double linefeeds in these files. Both in the english and german translation files in

/administrator/components/com_virtuemart/languages/

While doing my adaptions I got the beautiful message

"TCPDF ERROR: Some data has already been output, can't send PDF file"

It seems that this had to do with a missing language file (english) in:

/administrator/components/com_virtuemart/languages/affiliate/

??

Anyhow : it's running now and I can do real work to addapt some things in layout a.s.o..

Hope this helps someone. If some people need the changed translation files: give me a PM! And I'll send you "my" files, before giving my hints to the VM translators....

Technical hint: I did all that on an OpenSuSE 11.3 with the help of "kate", one of the best text editors on this planet!

All poor Win-users: search for a high-end editor to do such jobs!

Regards
Nukem36
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: IDR via Email doesn't work at all!?

Post by Jan »

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