Zen Cart Logo
Forums / Addon Shipping Modules / Endicia XML Export to Dazzle

Endicia XML Export to Dazzle

Locked

Views: 3,756

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
4 Aug 2008, 7:31 PM
#1
chaoscube avatar

chaoscube

New Zenner

Join Date:
Jul 2008
Location:
Bald Knob, AR
Posts:
18
Plugin Contributions:
0

Endicia XML Export to Dazzle

I am trying to integrate Zen Cart and Endicia, and I've made some progress. However, I do have an issue. What I set out to do was create a system that will let a user click a button on an order detail page and an Endicia label will print. I want as little user interaction as possible to minimize human error.

I created a button that passes the order ID to a script that successfully generates an XML file. The file gets saved on the server and everything is fine. Getting that XML file into Dazzle is the problem. Dazzle sits on a user's local PC, and I can't really fopen the file on their local computer. Dazzle will automatically check a directory on the same PC it's installed on, so if I could generate the file and stick it in that directory, that would be great.

I'm not enough of a php wiz to know how to do this. Anyone here know? Another option would be to generate an xml file for the previous day's orders, save it to a folder, then manually ftp it from the Dazzle PC, but that would put the user into mistake-mode.

I just need a little nudge in the right direction.


Mods, I had responded to another thread with this issue before I noticed where it was or what the thread title is...and I don't think many people are going to read it there. Maybe I'm wrong, but my point is that I'm not spamming the forum. You can delete my other post if you want. :yes:

Caleb

5 Aug 2008, 2:03 PM
#2
chaoscube avatar

chaoscube

New Zenner

Join Date:
Jul 2008
Location:
Bald Knob, AR
Posts:
18
Plugin Contributions:
0

Re: Endicia XML Export to Dazzle

For those curious, I may have come up with a solution. I just did a header save thingy and got it to work. That may be one more bit of user interaction, but I think it'll work.

Here's the code I used, which opens up a save dialog box:

$OutFile = "../xml/" . strftime('%Y%b%d-%H%M%S') . ".xml";

//Generate XML File
$fp = fopen($OutFile, 'a');
$fout = fwrite( $fp , $xml_msg );
fclose($fp);


header("Content-type: application/force-download");
header("Content-Transfer-Encoding: Binary");
header("Content-length: ".filesize($OutFile));
header("Content-disposition: attachment; filename=\"".basename($OutFile)."\"");
readfile("$OutFile");

If anyone has any other ideas, let me know. This is the first time I've done save dialog box, so there might be some stuff about it I don't know...

6 Aug 2008, 4:36 PM
#3
chaoscube avatar

chaoscube

New Zenner

Join Date:
Jul 2008
Location:
Bald Knob, AR
Posts:
18
Plugin Contributions:
0

Re: Endicia XML Export to Dazzle

So here's where I'm at. I have created two scripts -- one to generate an XML file for a particular order, and one to generated a file for all orders marked as "Processing." It works great in general, but there's one thing I haven't figured out yet.

I'm not sure I'm getting the right save dialog box. I've never done anything like that before, so I don't know the details. I get a dialog box that is just a save box. I am wondering if there is a "Save As..." type of box, or if this is just a browser specific issue.

I tried the code on Firefox on a Mac and then with IE on a Vista PC. Both were basically the same. Is there a way to open up a "Save As" box instead of just a save dialog?

Thanks!

3 Sep 2008, 9:17 PM
#4
andrewmp avatar

andrewmp

New Zenner

Join Date:
Sep 2008
Posts:
5
Plugin Contributions:
0

Re: Endicia XML Export to Dazzle

chaoscube,

I read your thread and this is exactly what I want to do. Could you share with me what you did and if you actually got it working. I would love a way to import my sales info into dazzle to print shipping labels. Could you just walk me through how to do it and provide your code?

16 Nov 2008, 9:52 PM
#5
albertsavage avatar

albertsavage

New Zenner

Join Date:
Feb 2008
Location:
Orange County, CA
Posts:
27
Plugin Contributions:
0

Re: Endicia XML Export to Dazzle

nudge

Did either of you have anything worth sharing with the broader group? I was going to undertake trying to integrate a Dazzle download into Zen.

Please respond as you find possible.

Regards,
Albert Savage