Jump to content
Wandry

[Module] Print delivery label

Recommended Posts

Hello, I've developped a small module to edit delivery label straightly from the back office in PDF format.
I adapted the label size to label printer Dymo ( you can find a example here : DYMO LabelWriter 400 -USB )
Once installed, you will have a clikable link that will appear in you order panel control that will generate the pdf automatically.

feel free to share, adapt to your needs and of course comment it!

The directory contains two php files+logo+2 traduction files.
By default, it runs in english.

printlabel.zip

  • Like 1

Share this post


Link to post
Share on other sites

Hello Wandry,

Can you please explain more about this one, i cant get it to work. Have installed the module, but i dont get any new link in the subcategories of Orders tab.

Actually, the question is, what am i supposed to insert in the Token field in configuration of the module?

Thanks in advance.

Share this post


Link to post
Share on other sites

Hello,
you just have to put the unzip file in your module list then in you configuration panel install it. Don't care of the token,(actually it's just a token to access the database);
the module then should appear when you go in "Orders", select one the module then should appear.

Share this post


Link to post
Share on other sites

Hmmm Wandry,

Thats the wierd thing i have ... im using Version 1.1.0.5 of prestashop, could it has something to do with that? cause i dont get any link in Orders. Kinda said :/

Share this post


Link to post
Share on other sites

Hello,

Ohh, i saw it now. Cool thanks ... i was almost searching for the same thing, but i have another ideas:

It would be cool if you could have like different "groups". 1. Firstclass letter 2. Package order 3. Cod order etc etc

Then, every firstclass orders delivery slip are stored in a PDF, like the picture i have attached.. what do you think, is it hard to do something like that?

what do you think about the attached file, do you understand how i mean?

i mean that you can bring every 1. firstclass orders delivery slip in a pdf like you have create, so you have all slips at one PDF document to print.

10046_s2VE65pCoFZj7B5IcIA0_t

Share this post


Link to post
Share on other sites

Wonderful idea but unfortunately due to the FDPF it won't work for Greek :(

Share this post


Link to post
Share on other sites

Hello, actually it's possible but a bit complicated...
here is a way to add new characterw to a font : http://www.id.uzh.ch/cl/zinfo/fpdf/tutorial/tuto7.htm
Though don't forget that your fonts directory is in tools/fpdf when using makefont.
when done, I suggest that you modify in downloadlabel.php the line 34 :
$pdf->SetFont("$police",'',12);
change $police to your new font ( but you won't be able to change fonts from the setup menu).

Share this post


Link to post
Share on other sites

Hello,


I am looking to add the logo of the web site to the label printed using you rmodule.
Nice Module by the way.


We use the label for giving the goods to deliver to UPS, so we need more information on the label
such as

Logo
and what was ordered by the customer.

Can you help me?

I tried to open the download-label.php.
But i can't get to insert the logo....

Thansk for your help...

  • Like 1

Share this post


Link to post
Share on other sites

to Carlv1428:

If you want to modify the label, you've got to open download-label.php (printlabel.php is for the installation and the settings from your back-office)
now i'll explain my code:
-line 2 : I used FPDF (fpdf.php) wich is a free library included in your prestashop. It allows you to make scripts that creates PDF documents.
( here is useful documentation you might need about http://www.fpdf.org/?lang=en)

-from line 12 to 27 I get the different informations i need about the customer.

-from34 to 45 I create the label:
line 34 : i create a new pdf(its the constructor, specifying landscape, the unit , height and width)

To insert a logo you should use the command $pdf->Image(parameters)

hope that it can help you.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hi Wandry,

Thanks for your reply, I could manage to change the labels according to the informations you gave me.

I now have my beautiful logo on my labels.... Thanks to you!!!!

Maybe I can ask you some more info.... We are on the good way!!!!
What about having on this label the product bought by the buyer and also the informations of number of colis.
For example,
We sell cupboards for shoes, but some of the furniture is so big that we have sometimes 2 colis for the same furniture.

What i was thinking about

I have ordered an Product A made of 2 colis
------------------------------------------------------------------
Logo |
Customer name |
Customer adress |
Customer postcode Customer City |
Customer Country |
------------------------------------------------------------------|
Customer product name |
Customer Colis/#Colis |
------------------------------------------------------------------|

Once I have this it is easy to imagine adding the weight, the HxWxL
Etc... All that kind of things making a shipping easier!!!!
I tried to add n$Products to the $pdf->Write but i didn't get the correct information so i guess some variables must be declared previously....


What do you think of this?

Share this post


Link to post
Share on other sites

Hi Wandry, nice idea. i get an error when installing the module in the backend.... but it works anyhow?! anybody else getting this error?

best

H.

Share this post


Link to post
Share on other sites

Hi I really hope some one have an easy solution to this problem.

After reading about this module I hurried out and bought a Dymo 450 label writer. I did'nt assume it would be a problem, to make the characters in Danish and Swedish work (ä,ö,æ,ø,å), as they looks fine in the Invoices from Prestashop and I could se that it also uses fpdf.php. But, now I have spent two whole working days on this issue and I just can't make it fit to these characters.

Does anyone have a solution on this?

I would appreciate any help on this issue.

Share this post


Link to post
Share on other sites

I have amended this a bit to suit my labels and just have one question.
When someone fills out their address and they dont have any details in address line 2, then the label has a space where the details would be if they had entered anything.
If that makes sense, how can we make the address not show a blank line as it currently does when nothing is entered for address line 2.

hope this is clear.

Share this post


Link to post
Share on other sites

Hi,

Sorry to dig up an old thread but is there any chance someone could post sample code showing a logo inserted and/or instructions on how to do it.

I have install the printlabel module and I have modified it to suit my needs by changing the field order but I would really like to include a company logo.

Thanks, Luke.

Share this post


Link to post
Share on other sites
Hi,

Sorry to dig up an old thread but is there any chance someone could post sample code showing a logo inserted and/or instructions on how to do it.

I have install the printlabel module and I have modified it to suit my needs by changing the field order but I would really like to include a company logo.

Thanks, Luke.


To insert an image is easy.
This is what I use for my labels/pdf document for the image insertion.

$pdf->Image(_PS_IMG_DIR_.'/logo.jpg', 68, 234, 35, 35);

Put the file named logo into your print label folder. My paper is standard A4.
The 68,234 is the location of my image, I know its in a strange position but anyway, the 68 represents 68mm from the left edge of the paper, the 234 is 234mm from the top of the page. Basicaly thats the x,y coordinates of the logo.
The 35,35 is the size of the file i.e 35 x 35

Play around with the settings and see what you get.

Hope this is of help.

Share this post


Link to post
Share on other sites
Hi,

Sorry to dig up an old thread but is there any chance someone could post sample code showing a logo inserted and/or instructions on how to do it.

I have install the printlabel module and I have modified it to suit my needs by changing the field order but I would really like to include a company logo.

Thanks, Luke.


To insert an image is easy.
This is what I use for my labels/pdf document for the image insertion.

$pdf->Image(_PS_IMG_DIR_.'/logo.jpg', 68, 234, 35, 35);

Put the file named logo into your print label folder. My paper is standard A4.
The 68,234 is the location of my image, I know its in a strange position but anyway, the 68 represents 68mm from the left edge of the paper, the 234 is 234mm from the top of the page. Basicaly thats the x,y coordinates of the logo.
The 35,35 is the size of the file i.e 35 x 35

Play around with the settings and see what you get.

Hope this is of help.


Hi

Thanks for the fast reply I will give this a try today. Also, thanks to Wandry for writing the module in the first place, it is very handy.

Luke.

Share this post


Link to post
Share on other sites

Right....I have uploded my logo called logo.jpg to the "printlabel" folder within the modules section of PrestaShop.

I have added the following line of code on the line above $pdf->Output(); to the "download-label.php"

$pdf->Image(modules/printlabel.'/logo.jpg', 68, 234, 35, 27);

I get syntax errors when I generate the label. I have experimented with adding ../modules/printlabel & /printlabel/ as the image directory but nothing seems to work.

What am I doing wrong? I'm guessing that I have the image directory path wrong but I can't figure out why.

Thanks

Luke.

Share this post


Link to post
Share on other sites
Right....I have uploded my logo called logo.jpg to the "printlabel" folder within the modules section of PrestaShop.

I have added the following line of code on the line above $pdf->Output(); to the "download-label.php"

$pdf->Image(modules/printlabel.'/logo.jpg', 68, 234, 35, 27);

I get syntax errors when I generate the label. I have experimented with adding ../modules/printlabel & /printlabel/ as the image directory but nothing seems to work.

What am I doing wrong? I'm guessing that I have the image directory path wrong but I can't figure out why.

Thanks

Luke.

If you have called the image file the same as what I have above then you do not edit that image location at all.
Leave it exactly as I have written above.

Share this post


Link to post
Share on other sites
Right....I have uploded my logo called logo.jpg to the "printlabel" folder within the modules section of PrestaShop.

I have added the following line of code on the line above $pdf->Output(); to the "download-label.php"

$pdf->Image(modules/printlabel.'/logo.jpg', 68, 234, 35, 27);

I get syntax errors when I generate the label. I have experimented with adding ../modules/printlabel & /printlabel/ as the image directory but nothing seems to work.

What am I doing wrong? I'm guessing that I have the image directory path wrong but I can't figure out why.

Thanks

Luke.

If you have called the image file the same as what I have above then you do not edit that image location at all.
Leave it exactly as I have written above.


Ok I have entered the line of code exactly as you have written and I am no longer getting syntax errors however, I am now getting a blank label. If I comment out the logo line of code the label prints fine. Out of interest what line did you insert the code on? I think that this has something to do with the problem.

Thanks for your help.

Luke.

Share this post


Link to post
Share on other sites

Hi Luke

Enter the line of code after your code that looks something like this

$pdf = new FPDF('P', 'mm', 'A4');
$pdf->open();
$pdf->AddPage();
$pdf->SetAutoPageBreak(false);

BUT BEFORE THIS

$pdf->Output();
} else {

Hope this helps.

  • Like 1

Share this post


Link to post
Share on other sites

I have had the module working for a couple of weeks and then no reason at all i'm getting "A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again." I haven't changed any permissions or files. Hope someone can point me in the right direction as why this has stopped working.

Thanks

Rich

Share this post


Link to post
Share on other sites

How come it produces a blank PDF file? (Using latest version of PrestaShop) I tried printing all info before the $pdf->Write() command and all the info is there so it shouldn't be a problem :/ Have any idea?

Share this post


Link to post
Share on other sites

I haven't played around with the logo for a week or so but I decided I would have a go again last night. I am getting the following syntax error;

FPDF error: Image file has no extension and no type was specified: PS_IMG_DIRjpg

I assume this means that I need to define the image directory elsewhere in the "download-label.php" file? How would I do this?

Thanks, Luke.

Share this post


Link to post
Share on other sites
How come it produces a blank PDF file? (Using latest version of PrestaShop) I tried printing all info before the $pdf->Write() command and all the info is there so it shouldn't be a problem :/ Have any idea?


Nevermind about this, there was no font selected......

Share this post


Link to post
Share on other sites

Has anyone got a solution to the problem with charactersets. I would like to use swedish characters (åäöÅÄÖ) but it's not working.

Too bad because i really like this module.

Share this post


Link to post
Share on other sites
Has anyone got a solution to the problem with charactersets. I would like to use swedish characters (åäöÅÄÖ) but it's not working.

Too bad because i really like this module.


Hehe, its quite easy to fix :) in the download-label.php file, change the line
$pdf->Write(5,"$entreprise \n$prenom $nom \n$champadresse1 \n$champadresse2  \n$codepostal $ville \n$country");


to

$pdf->Write(5,utf8_decode("$entreprise \n$prenom $nom \n$champadresse1 \n$champadresse2  \n$codepostal $ville \n$country"));

  • Like 1

Share this post


Link to post
Share on other sites
Has anyone got a solution to the problem with charactersets. I would like to use swedish characters (åäöÅÄÖ) but it's not working.

Too bad because i really like this module.


Hehe, its quite easy to fix :) in the download-label.php file, change the line
$pdf->Write(5,"$entreprise \n$prenom $nom \n$champadresse1 \n$champadresse2  \n$codepostal $ville \n$country");


to

$pdf->Write(5,utf8_decode("$entreprise \n$prenom $nom \n$champadresse1 \n$champadresse2  \n$codepostal $ville \n$country"));



Thank You!!!!!!!!!!

Works perfectly.
  • Like 1

Share this post


Link to post
Share on other sites

Finally I got this working with my logo. I had to remove the ' at the end of co-ordinates so only the logo reference has '

e.g.

BEFORE:

$pdf->Image('logo.jpg',0,1,39,32');

AFTER:

$pdf->Image('logo.jpg',0,1,39,32);

Luke.

Share this post


Link to post
Share on other sites

Hi,

Does anyone know how to add the total order weight to the label to appear the same as in the orders?

I would like to have the label show an approx weight to make it easier for me when booking collections etc...

I have managed to change the code so that it will insert the carrier but I am struggling with the order weight.

Help is appreciated.

Luke

Share this post


Link to post
Share on other sites

i have installed the module but i cnt seam to find where the tab is any ideas?

thanks

Will Rose

Share this post


Link to post
Share on other sites
i have installed the module but i cnt seam to find where the tab is any ideas?

thanks

Will Rose


It will appear under the 'Modules' tab and under it's own heading 'Admin Orders'.

Luke.

Share this post


Link to post
Share on other sites

I found it there and clicked install but where do I go next I cant find it in orders and all i have in modules is configure. Any help would be great :-)

will

Share this post


Link to post
Share on other sites
I found it there and clicked install but where do I go next I cant find it in orders and all i have in modules is configure. Any help would be great :-)

will


Click on an actual Order under the Orders tab in Back Office. Approx half way down the page, you will see 'Print Delivery Label' clicking that will produce a PDF label formatted according to the settings in 'download-label.php' located in the module folder.

It is possible to play around with the formatting a little to suit your needs but you will need to know a little programming and have access to a text editor. I use Crimson Editor.

Give me a shout if you get stuck.

Luke.

Share this post


Link to post
Share on other sites

I can use it now thanks very much, one last little thing i read you were trying to put an image in it so am i

$pdf->Image('stamp.jpg', 68, 234, 354, 354);
$pdf = new FPDF; $pdf->open(); $pdf->AddPage(); $pdf->SetAutoPageBreak(false);
$pdf->Output();

that's what I have added and put the file stamp.jpg in the module directory but nothing happens it just generates a blank pdf

any ideas as it looked like you managed to do it

Many Thanks

Will

Share this post


Link to post
Share on other sites
I can use it now thanks very much, one last little thing i read you were trying to put an image in it so am i

$pdf->Image('stamp.jpg', 68, 234, 354, 354);
$pdf = new FPDF; $pdf->open(); $pdf->AddPage(); $pdf->SetAutoPageBreak(false);
$pdf->Output();

that's what I have added and put the file stamp.jpg in the module directory but nothing happens it just generates a blank pdf

any ideas as it looked like you managed to do it

Many Thanks

Will


Hi Will

It looks like you have the line of code correct but the last two numbers must match the the size of your image exactly. I believe the the size is in mm not pixels, so make sure you enter it in mm.

For example;

If your image is called 'stamp.jpg' and it is 50 x 50 mm, the line of code will look like;

$pdf->Image(‘stamp.jpg’,0,1,50,50);

Note the last two numbers are the image dimensions. The first two set the x,y coordinates. Try playing around with the x,y numbers and the image size numbers. It took me a while but I eventually got it working. If you image is outside the margin parameters, it can also throw out the whole label.

Luke

Share this post


Link to post
Share on other sites

great thanks for your help have it up now just working out how to indent the text then im all done. thanks again

will

Share this post


Link to post
Share on other sites

This has been just what i needed but for the icing on the cake has any one that uses this found a way to print all labels needed at once just like you do with invoices in Prestashop just select the date range and off you go?

Many Thanks

Will Rose

Share this post


Link to post
Share on other sites

Just wondering if someone had made it work with Czech language???

I've tried my best, but can't put a finger on it :(

1. changed as suggested with Swedish ... //utf_decode ...// - it helped with some characters, but not all.
2. tried to use another font, but what happens is I get message - "unidentified font arielmt"

But it has to be working somehow, because I can easily generate invoices in Czech with settings to
Font - arielmt and CP1250 so why cannot apply it with printers? and the font is in the font directory too.

Any ideas?

Share this post


Link to post
Share on other sites

Thanks for the fantastic module! :)

Can anyone please tell me how to get the state into the address? I can't seem to get anything I try to work.

Share this post


Link to post
Share on other sites

is there a simple way to make it print multiple shipping labels ?
like the build in delivery slips in BO, i would very much like this, since it is to much hasle to click in on every order when packing...

Share this post


Link to post
Share on other sites

if like me you have a brother QL printer ad want to use this module here is some code i used to make my labels with

the label size is 62mmx100mm

$pdf=new FPDF('L', 'mm', array(62,100));
$pdf->AddPage();
$pdf->SetDrawColor(255);
$pdf->SetAutoPageBreak(false); 
$pdf->SetFont("$police",'',24);
$pdf->SetMargins(0,50,0);
$pdf->SetXY(10,2);
$pdf ->Write(8,"$entreprise \n$nom $prenom \n$champadresse1 \n$champadresse2   \n$ville \n$codepostal \n$country");
$pdf->SetFont("$police",'',8);
$pdf ->Write(7,"\n If undelivered please return to : My Address");
$pdf->Output();



this code is modified to include senders address in a smaller text at the bottom of the label

once you press print in adobe select your brother printer and make sure its set to 62x100
and that it is also set to fit to printable area this ensures it all fits on correctly

Thanks to the Creator of this Module

  • Like 1

Share this post


Link to post
Share on other sites

Nice module!

Unfortunately it isn't really working with my LabelWriter 450. The font on the screen is fine but it prints it so small that u can't read it, no matter what size i write into the download-label.

First I bought this module http://addons.prestashop.com/de/logistics/2151-deliverylabels.html but it didn't work, too.

Do u have any ideas why? :-(

SOLVED!!! THE PROBLEM WAS GOOGLE CHROME!

  • Like 1

Share this post


Link to post
Share on other sites

Thank you for the module. I need HELP to add the first message sent by a client. This is the message that the client adds to the order during checkout for special delivery instructions.

 

This message is in table `messages` field `message` with earliest date for that `id_order`. I’m a beginner so this code has many errors, but hopefully someone can help. (Changes made to download-label.php)

 

Under:

$products = $order->getProducts();

Add:

$message = new Message ($order->id_message);

 

Under:

$champadresse2=utf8_decode($ad->address2);

Add:

$pfmessage= _DB_PREFIX_.message;
$requestmessage="SELECT (message, MIN(date_add) AS MinDate) FROM $pfmessage WHERE $order=id_order"; //Error
$resultmessage=mysql_query($requestmessage);
$rowmessage=mysql_fetch_assoc($resultmessage); //Error
$signmessage=$rowmessage['message'];
$signmessage=utf8_decode($signmessage);

 

Replace:

$pdf ->Write(5,"$entreprise \n$prenom $nom \n$champadresse1 \n$champadresse2  \n$codepostal $ville \n$country");

With:

$pdf ->Write(5,"$entreprise \n$prenom $nom \n$champadresse1 \n$champadresse2  \n$codepostal $ville \n$country \$signmessage");

Share this post


Link to post
Share on other sites

 

 

Hehe, its quite easy to fix :) in the download-label.php file, change the line

$pdf->Write(5,"$entreprise \n$prenom $nom \n$champadresse1 \n$champadresse2  \n$codepostal $ville \n$country");

to

$pdf->Write(5,utf8_decode("$entreprise \n$prenom $nom \n$champadresse1 \n$champadresse2  \n$codepostal $ville \n$country"));

 

 

What about Turkish charactersets like a ÜÖİŞÇĞüıöşçğ... we are using iso-8859-9.

Share this post


Link to post
Share on other sites

Hi,

 

Thank you very much Wandry for this module.

I have made some changes to it because I am using an Inkjet printer and A4 label sheets (with 4 labels per sheet).

 

I have added inputs when you print the label so you can choose on which label you want to print (2 rows: 0 and 1, 2 lines 0 and 1).

I print the name and direction of my shop.

 

I have prepared the code to change the size of the labels. When I'll have some time, I will improve it a bit more in order to be able to configure the size and place of the labels directly from the back office.

 

I am working also on a version that will take a serie of order and automatically print the labels.

 

Hope this help.

 

Atila

 

printlabel v02.zip

  • Like 1

Share this post


Link to post
Share on other sites

Hi Aron,

 

In file \your_prestashop\modules\printlabel\myPDF.php, try adding the following:

 

$phone = utf8_decode($this->ad->phone);

just after the line

$ville = utf8_decode($this->ad->city);

 

and change line:

$pdf->MultiCell($this->LabelWidth - $this->BoxMarginRight - $this->BoxMarginLeft - $this->InnerMarginLeft - $this->DocMarginLeft, 8,
		    $entreprise.(strlen($entreprise)!=0?"\n":"")."$nom $prenom\n$champadresse1 \n$champadresse2".((strlen($champadresse2)!=0)?"\n":"")."$codepostal $ville \n$country\n", 0, 'L');

to something like that:

 $pdf->MultiCell($this->LabelWidth - $this->BoxMarginRight - $this->BoxMarginLeft - $this->InnerMarginLeft - $this->DocMarginLeft, 8,
               $entreprise.(strlen($entreprise)!=0?"\n":"")."$nom $prenom\n$champadresse1 \n$champadresse2".((strlen($champadresse2)!=0)?"\n":"")."$codepostal $ville \n$country\nTeléfono: $phone\n", 0, 'L');

 

Some warnings:

  • User can introduce a mobile phone number or land line phone number, so if it works, you can modify your code with something like that:
    $phone = (strlen(utf8_decode($this->ad->phone))!=0?utf8_decode($this->ad->phone):utf8_decode($this->ad->phone_mobile));


  • In the code, I have hard coded the some text printed on the label, it's in Spanish, feel free to change it to be managed by prestashop translation system.
  • I work on Perstashop V14.
  • I don't have any test version of my prestashop so I can't make any test: I just look at the Database content for address and found that there are 2 phones numbers.
  • Remember to force smarty compilation to see the changes

 

Hope this help

 

Atila

Share this post


Link to post
Share on other sites

Hi,

 

Thank you very much Wandry for this module.

I have made some changes to it because I am using an Inkjet printer and A4 label sheets (with 4 labels per sheet).

 

I have added inputs when you print the label so you can choose on which label you want to print (2 rows: 0 and 1, 2 lines 0 and 1).

I print the name and direction of my shop.

 

I have prepared the code to change the size of the labels. When I'll have some time, I will improve it a bit more in order to be able to configure the size and place of the labels directly from the back office.

 

I am working also on a version that will take a serie of order and automatically print the labels.

 

Hope this help.

 

Atila

 

printlabel v02.zip

 

Hi Atila,

 

Thanks for your improved version, could you please help me change the label dimensions, I have a A4 label page with 2 across by 8 down (16 labels per page). The label size is 99 x 34 mm. I see that you have larger labels with more information, however I just want the customer name & address on these smaller labels.

 

Would be great if you could tell me what variable to change.

 

Also did you ever figure out the printing with series of order status?

 

Thanks!

Share this post


Link to post
Share on other sites

Very nice module. I had to modify it a bit for US City, State Zip format, but working just as I need now!

Share this post


Link to post
Share on other sites

Anyone that can help me set this up with logo on each label (2 col x 4row) A4 pape. My Logo  size 200px wide x 50px high

 

Thanks!

Share this post


Link to post
Share on other sites

super modul !!  habe mir die V1 etwas angepasst, sodaß auf Dymo Etiketten Typ 99010 die Adresslabels rauskommen können,
gute Arbeit !!

Share this post


Link to post
Share on other sites

Hi, Great module. but not working anymore on PS1.6. Can anyone please resolve the error and make this work on 1.6?

 

Thanks

  • Like 1

Share this post


Link to post
Share on other sites

Anyone able to get this working for a Zebra 2844 printer ? Even when I change the settings in the php files I still get dimensions of Width 124 and Length 297, I have no idea why. My stats are 100 by 50 . Also it always adds 20 to one of the borders. I know this wasn't designed for a Zebra 2844 printer, but any help appreciated, thanks :)

 

PS 1.4

Share this post


Link to post
Share on other sites

Hi, download the fpdf-class from http://www.fpdf.org/ and unpack it into your tools folder.

Then rename the fpdf17-folder to fpdf.

That should do the trick, did for me at least :)

 

// Fredrik

 

Hi, Great module. but not working anymore on PS1.6. Can anyone please resolve the error and make this work on 1.6?

 

Thanks

  • Like 2

Share this post


Link to post
Share on other sites

Great Module!!!

 

 

I get this label:

 

 

Sender: My Company
 
Tel: 
 
Ship to:
XX XXXXX
PO Box 56XXXX 
33256 Miami 
EE.UU.
 
Order ID: 16
Packages: 1
Weight: 10.000 kg
 
 
 
Can I remove fields like Tel, Order ID, Packages and Weight???
 
THANKS!
Edited by pegasus6464 (see edit history)

Share this post


Link to post
Share on other sites

Hi,

 

Thank you very much Wandry for this module.

I have made some changes to it because I am using an Inkjet printer and A4 label sheets (with 4 labels per sheet).

 

I have added inputs when you print the label so you can choose on which label you want to print (2 rows: 0 and 1, 2 lines 0 and 1).

I print the name and direction of my shop.

 

I have prepared the code to change the size of the labels. When I'll have some time, I will improve it a bit more in order to be able to configure the size and place of the labels directly from the back office.

 

I am working also on a version that will take a serie of order and automatically print the labels.

 

Hope this help.

 

Atila

 

attachicon.gifprintlabel v02.zip

This is a very great label version. I needed a cross over the sender of the package in all 4 col and maded a file in photoshop 

i opened the myPDF.php file and put in theese 4 lines to show the cross behind the sender field x 4

 

logo1.jpg is only what i called it, but remember to upload the logo1.jpg file in the root of printlabel folder

 

 

$pdf->SetFillColor(128,0,0);
 
$pdf->SetDrawColor(128,0,0);
 
$pdf->SetMargins($this->DocMarginLeft, $this->DocMarginTop, $this->DocMarginRight);
 
$pdf->Line(105, 0, 105, 297);
 
$pdf->Line(0, 148.5, 210, 148.5);
$pdf->Image('logo1.jpg',5,3,95,45);
$pdf->Image('logo1.jpg',110,3,95,45);
$pdf->Image('logo1.jpg',110,153,95,45);
$pdf->Image('logo1.jpg',5,153,95,45);
 
 
$this->LabelRow = $_GET["row-pos"];
 
$this->LabelColumn = $_GET["column-pos"];
 

 

 

 

 

 

logo1.jpg

  • Like 1

Share this post


Link to post
Share on other sites

Anyone who can help me out making this:

howtomakethis.jpg

 

look like this:

looklikethis.jpg

Using this module? Or is it a hard template change?

hey  tonight I have changed the print label as u want it in your shop  ...

Share this post


Link to post
Share on other sites

Hi, download the fpdf-class from http://www.fpdf.org/ and unpack it into your tools folder.

Then rename the fpdf17-folder to fpdf.

That should do the trick, did for me at least :)

 

// Fredrik

Thanks! it works for me! :)

Share this post


Link to post
Share on other sites

Thanks for module and adaptation!

 

I need help to show "reference" or "order_name" at the Label, this is more usefull for me than "id_order"..

 

Sorry for my english..

Share this post


Link to post
Share on other sites

Using prestashop 1.6?

 

Yes, PS1.6, thanks for reply, and sorry for not give this info before..

Share this post


Link to post
Share on other sites

Hi, download the fpdf-class from http://www.fpdf.org/ and unpack it into your tools folder.

Then rename the fpdf17-folder to fpdf.

That should do the trick, did for me at least :)

 

// Fredrik

 

thanks for the tip!,, works for me in 1.6.0.9

 

only let down is it could look a little prettier on the order page  ;)

Share this post


Link to post
Share on other sites

Hello Friends

 

I Created a printlable with the help of this old version. thanks for author who created this printlable module.

I modified this printlable module version PS1.5.6.2. hope you like my attachment. if you like contact me :).

post-976757-0-54503700-1429194974_thumb.jpg

Edited by vebpro (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Thanks
What should we include in the token
I do not find it after clicking on Show

Share this post


Link to post
Share on other sites

I've downloaded  version 2 of this module but am having some difficulties getting it to work and wondered if someone might point me in the right direction as I can't find a guide anywhere. I've installed the module but when I go to configure it I only have two options 'font' and 'token.' There are no other fields to edit and so I can't actually create a label. Also, when I try to generate a label in the orders section I get the message 'FPDF error: Could not include font definition file'

Can anyone help?

 

Stuart

Share this post


Link to post
Share on other sites

plz help for this moudle

not page afther click for printlable

what token

i need this is muodle

Share this post


Link to post
Share on other sites

Hello Friends

 

I Created a printlable with the help of this old version. thanks for author who created this printlable module.

I modified this printlable module version PS1.5.6.2. hope you like my attachment. if you like contact me :).

very nice look, can you please share your code to make it look like this...
  • Like 1

Share this post


Link to post
Share on other sites

if like me you have a brother QL printer ad want to use this module here is some code i used to make my labels with

 

the label size is 62mmx100mm

 

$pdf=new FPDF('L', 'mm', array(62,100));$pdf->AddPage();$pdf->SetDrawColor(255);$pdf->SetAutoPageBreak(false); $pdf->SetFont("$police",'',24);$pdf->SetMargins(0,50,0);$pdf->SetXY(10,2);$pdf ->Write(8,"$entreprise \n$nom $prenom \n$champadresse1 \n$champadresse2   \n$ville \n$codepostal \n$country");$pdf->SetFont("$police",'',8);$pdf ->Write(7,"\n If undelivered please return to : My Address");$pdf->Output();

this code is modified to include senders address in a smaller text at the bottom of the label

 

once you press print in adobe select your brother printer and make sure its set to 62x100

and that it is also set to fit to printable area this ensures it all fits on correctly

 

Thanks to the Creator of this Module

 

Hi ajhawley, could you please inform in wich file you made these modifications and the path?

Thanks so much!

Share this post


Link to post
Share on other sites

 

Hi, download the fpdf-class from http://www.fpdf.org/ and unpack it into your tools folder.

Then rename the fpdf17-folder to fpdf.

That should do the trick, did for me at least  :)

 

// Fredrik

 

Frederik's reply works. For Prestashop 1.6 download the fpdf package, upload the folders "font" and "makefont" as well as fpdf.php to /tools/fpdf/

 

Important!:

 

Go to Advanced Parameters, Performance. Clear your cache and force compilation. The fix did not work on our end before recompiling everything.

Share this post


Link to post
Share on other sites

So I am not sure what magic is happening but it seems when Install the module using the module upload in the backoffice it works but when I upload it to the server manually the print link ends up producing a 404 error.

 

If it is installed using the module upload the printlabel directory is no where to be found, can anyone give me a clue as to where the files end up on my server?

 

I have checked the code and cannot find anything

 

Kind Regards

 

Toby

Share this post


Link to post
Share on other sites

hi

my font is bad

 

 
 
 
 
 
 

 

 
 
 
 
 
 
 
????? ???
?????? - ????????? - ????? ???? -
????? ?????? ???? 3 - ???? 3 - ???? 3
8179966541 ??????
?????
why

Share this post


Link to post
Share on other sites

No, there are not any free version. I do not like seeing my code stolen and used in other paid versions.

Share this post


Link to post
Share on other sites

plz update for 1.6.1.4 / 1.6.15

 

tnx

 

on prestashop 1.6.x, I only add fpdf class in tools folders.

Share this post


Link to post
Share on other sites

Hello Friends

 

I Created a printlable with the help of this old version. thanks for author who created this printlable module.

I modified this printlable module version PS1.5.6.2. hope you like my attachment. if you like contact me :).

hi tnx

you can send me your them label

tnx

Share this post


Link to post
Share on other sites