Print Fulfillment Pro WC


This plugin will basically create two files(PDF and XML) when an order completes successfully. The files will be sent to the FTP server of the printing company.



  • WordPress version 4.6
  • PHP version 5.2.4 or greater
  • Woocommerce version 3.0
  1. Click on Print Fulfillment Settings
  2. On the Print Fulfillment Settings dashboard, you will get General tab
  3. You should set all the required fields, ShopNo, Production Fulfillment FTPTest Fulfillment FTPFulfillment FTP to be used and Send to FTP when order status is information.
    1. Shop No. – The number is that you will get in your account.
    2. Production Fulfillment FTP – FTP URL that is for Production Site where XML and PDF files will be sent, the format is ftp://username:password@host
    3. Test Fulfillment FTP – FTP URL that is for Test Site where XML and PDF files will be sent, the format is ftp://username:password@host
    4. Fulfillment FTP to be used – Setting for what option you want to keep on.
    5. Send to FTP when order status is – You can set any of the order statuses from the dropdown list,
      Afventer betaling
      På hold
  4. Every order from your shop will generate two files,
    1. A printable PDF file
    2. An XML file with information about the printed matter, one XML per product ordered.
  5. FTP Logs
    Here are the log details of every order that will be logged in the Database also.

    On the Return Message column, you can view FTP message by clicking the specific order,

    On the Action column, you can send the files again if you want.
    An XML file will be generated automatically from your shop, each time an order is where the OrderNo, OrderTitle, ShopNo,  DeliveryShopName, DeliveryAddress, DeliveryZipCode, DeliveryCity, DeliveryEmail, ItemNo, ItemName, Dimensions, Pages, Amount, PdfFileName, PricePerItem and TotalPrice are dynamically changed.
    All the information are from the WordPress system that you need to put the product information in the WooCommerce plugin.

XML Specifications:

Here is the explanation for the XML file

  • <OrderNo> – An order number from the shop.
  • <OrderTitle> – The title of the order from the shop.
  • <ShopNo> – Your company name that the user in WordPress system to which your orders are included. This value must be on all the XML files that receive the orders.
  • <DeliveryShopName>, <DeliveryAddress>, <DeliveryZipCode>, <DeliveryCity> – All these informations are vary from order to order.
  • <DeliveryEmail> – Associated mail address for ordering
  • <ItemNo> – The number refers to a unique product
  • <ItemName> – The name refers to an Item name of products.
  • <Dimensions> – This is not mandatory, but more a reference to the product create the correct format.
  • <Pages> – Number of pages
  • <Amount> – Number of items
  • <PdfFileName> – Name of the PDF, which is located along with associated XML on the FTP server
  • <PricePerItem> – Unit price of products.
  • <TotalPrice> – Total price for the order. This price will be carried over to the order.

Adding Products:

Before diving into your first product you should familiarise yourself with how product categories, tags, and attributes work.

As you would expect, categories and tags work in very much the same way as any other post type categories and tags. They can be applied before or during the creation of a product. Attributes, on the other hand, are a little different

Adding attributes

Setting up attributes themselves uses an interface you will be familiar with. It’s recommended that you set up any attributes you will be using over and over in this way. Navigate to Products > Attributes and you will be presented with the following screen:

Here you can quickly and easily add attributes and their terms, here is the list of attributes that must be created for your products.

NameSlugOrder byTerms
Kunstkort Størrelserkunstkort-stoerrelserCustom ordering12 x 12 cm, A4 (21 x 29,7 cm), A5 (14,8 x 21 cm) 4-sidet foldekort, A6 (10,5 x 14,8 cm) 4-sidet foldekort, A7 (7,4 x 10,5 cm)
KunstneroprettelserkunstneroprettelserCustom ordering2 billeder, 5 billeder, 10 billeder, 15 billeder
Lærreder Størrelserlaerreder-stoerrelserCustom ordering20 x 20 cm, 40 x 40 cm, 40 x 60 cm, 60 x 60 cm, 60 x 80 cm, 100 x 120 cm, 120 x 120 cm
Plakater Størrelserplakater-stoerrelserCustom orderingA0 (84,1 x 118,9 cm), A1 (59,4 x 84,1 cm), A2 (42 x 59,4 cm), A3 (29,7 x 42 cm)
Vægdekorationer Størrelservaegdekorationer-stoerrelseCustom ordering120 x 240 cm, 120 x 120 cm, 59,2 x 119,2 cm, 59,3 x 59,3 cm

After adding the attributes, you need to add terms for each attribute. Click on the “Configure terms” link

Adding a new product and attribute

Adding a simple product is a straightforward process and not too dissimilar from authoring a standard WordPress post. In the Products menu click Add New; you will be presented with a familiar interface, and should immediately see where to type the product title and full description.

Under the product description box is the Product Data panel. Here you have to define Product Type > Variable Product.

Go to ‘Attributes’ tab and add the product attributes to select from the ‘Custom product attribute’ dropdown. After adding the attributes, you need to select two options are “Visible on the product page” and “Used for variants”. Finally, click on the ‘Save attributes’ button.

Go to ‘Variations’ tab and you can add variations.

Now you can add different images, prices PDF link for all the variations product.

After adding the PDF file, you need to enter valid PDF page counter in the ‘PDF page counter’ text field, the value must be an integer type.

Adding Product Categories

All products of similar characteristics are grouped under respective categories.

WooCommerce allows you to create and manage categories to properly classify the entire inventory. From the left pane in WordPress Dashboard, navigate to Products > Categories.

A screen resembling the following screenshot will appear,

Let me explain several important fields on this screen.

  • Name: This is the name of the category that will be visible to the visitors.
  • Description: This field contains the description of the category.
  • Slug: This is the SEO friendly name that will be used in the URL structure of the category page.
  • Image: You can set a thumbnail for your product category.

Once you have created a category, it is easy to add a product and check whether the category has been set up correctly.

To add a product to a category, go to WordPress Admin Dashboard > Products > Add Product

Fill in the details of your product. On the right side, you can see the option to choose a category for this product.

In this panel,  you can create as many categories as you require.

Adding Product Tags

To set tags for a product, navigate to Products > Tags.

You can now add a new tag to the following panel.

Once done, add a new product to the store. A list of available tags is available on the right panel. If it is a long list, just start typing the tag and the list will offer appropriate suggestions.

Testing process

Make an order, and check the order notes of the order, the plugin will note the status here of sending XML+PDF. In a coming version, there will also be a separate FTP log page to check.

After this, you can also manually login with the FTP login information to the print house, using an FTP program on your own client, and check the files are there.

Developer Guideline:

Developer Guideline of Prices rules and XML keymap with the Printing Company(Lasertryk)

Set Price rules for different categories

Here is the example of PHP code for setting price rules for the different categories.

File: /order-parser.php

Line: 252

public function setPlakaterPrice( $item ){

$ret = array();

$quantity = $item->get_quantity();

$variation_slug = $this->getVariationTag( $item )->slug;

$map_var = explode('-', $variation_slug)[0];

// A3 - Price mapping

$price_mapping['a3'] = array(

1 => 201,

2 => 203,





Set XML keymap function


Line: 657


* ~  Main Processing function. 

*  ~ It takes all items from order object.

*  ~ Loop over each items and push in fmt_data property of this class.

*  ~ Later fmt_data property will be return.


public function processItems(){

$items = $this->data->get_items();

$order_price = $this->getOrderPrice();

foreach ($items as $key => $item) {

$item_price = isset($order_price[$key]) ? $order_price[$key] : '0,00';

$this->fmt_data[$key]['OrderNo'] = $this->order_id;

$this->fmt_data[$key]['OrderTitle'] = $this->get_name( $item ).' Order #'.$this->order_id;

$this->fmt_data[$key]['ShopNo'] = $this->shop_no;

$this->fmt_data[$key]['DeliveryShopName'] = $this->DeliveryShopName();

$this->fmt_data[$key]['DeliveryAddress'] = $this->DeliveryAddress();

$this->fmt_data[$key]['DeliveryZipCode'] = $this->DeliveryZipCode();

$this->fmt_data[$key]['DeliveryCity'] = $this->DeliveryCity();






More Plugins


Tell us about your project

We would love to hear your ideas and thoughts


Where will your career take you?

Check out our openings and join us