Top 5 Programming Questions and their Answers about Label Printing in PrestaShop

Posted On: Sep 14, 2018

Categories: Shopping Carts & Platforms

Tags: Prestashop , module , print label , shipping , USP

Although PrestaShop is very flexible platforms but there are some of the drawbacks that exists from the beginning of the shopping cart. One of such drawbacks is label printing for shipping purpose. When a merchant is receiving the order in the amount of 100 or even less, the manual process of printing label is tiresome. In manual printing, admin has to copy paste the information of the customers’ form back office and then paste it on the shipping packages.

Therefore, merchants always look for a system that allow the auto printing of labels. An auto system directly gets the information of customers and show 3,5 labels per A4 page for final printing through printer. Admin can also change the size and number of labels and edit the information of a label if needed. Considering the needs of users, many companies has developed the modules to facilitate them. One such printing label module is also developed by “FMEModules”. You can check the demo to get full fledge view of this module but here in this post, our purpose is not to promote our module but here we will address some common issues of users about label printing. So given here top 5 programming questions and their answers about label printing;

Question No. 1: Hello, I want to remove the print button from product page of my PrestaShop store. How it is possible?

Answer: Find the below code in your product.tpl file

<!-- usefull links-->


                      {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}

                      <liclass="print"><ahref="javascript:print();">{l s='Print'}</a></li>

                      {if $have_image && !$jqZoomEnabled}



remove the

                      <liclass="print"><ahref="javascript:print();">{l s='Print'}</a></li>

Question No. 2: Hello! I want to make some changes in the shipping labels of my PrestaShop store like increasing/decreasing the font. Also invoice number should move to top of page in the middle. How can I make these editing?

Answer: You can get this done in two ways depends on which you like;

Solution 1: Go to classes/pdf.php

lines 376-384, change the values in this line.

$width =100;$pdf->SetX(20);$pdf->SetY(25);$pdf->SetFont(self::fontname(),'',12);$pdf->Cell($width,10,self::l('Invoicing'),0,'L');$pdf->Cell($width,10,self::l('Delivery'),0,'L');$pdf->Ln(8);$pdf->SetFont(self::fontname(),'',9);

Solution 2: Go to that is a PHP based PDF generator and you can make necessary changes as needed by you in the labels.

Question No. 3: Hi, I want to remove the print option from product pages and also the send to friend option. How this is possible?

Answer: in product.css change this code

#usefull_link_block  {



or remove this from product.tpl


                <!-- usefull links-->

                <ul id="usefull_link_block"class="clearfix no-print">

                    {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}

                    <li class="print">

                        <a href="javascript:print();">

                            {l s='Print'}



                    {if $have_image &&!$jqZoomEnabled}{/if}



send to a friend is actually a local module and you can deactivate it to remove this option.

Question No.4: Hi, I want to print the delivery slip using dot matrix printer. I placed the date at correct places and printed it. When the result came out, the characters and not understandable. For detecting the issue, I exported into word file and printed, then all was fine. Is there a way that PrestaShop prints the delivery slips in the docx file type so that?

Answer: No, it is not possible to get invoice format in docx through PrestaShop. Actually, the problem arises when the PrestaShop installation has no Courier Font and the pdf invoices are in courier font. If you will find a way to include the courier font in default PrestaShop installation, then hopefully this issue can be solved.

Question No. 5: Hi, I want to add sorting for new product in product-sort.tpl. How to do that?

Answer: Edit product-sort.tpl and add the following to the options

<optionvalue="{$link->addSortDetails($request, 'date_add', 'desc')|escape:'htmlall':'UTF-8'}" {if $orderby eq 'date_add'    AND $orderway eq 'DESC'}selected="selected"{/if}>{l s='new products'}</option>

Note: These questions are answered by top community developers and do not reflect FMEModules.