NVN Export Orders “Calculated Fields”


1/ write formula into “Calculated Field x”

2/ click “Calculated Field x” button to add into export

3/ in “Calculated Field x” use same field name like XML tags (same name is displayed on mouse over button). Of course in you can use mathematical operators like + – * /  brackets etc. Important – from version 2.3 all text fields should be enclosed in single quotes!!!



// invoice number with prefix and six digits

'invoice_prefix'.sprintf('%06d', 'invoice_number')


//export delivery company, if delivery company is empty will be exported first name + last name

('delivery_company' <> '') ? 'delivery_company' :  'first_name last_name'


// product price with tax per one product



// product price with tax for all same ID products  in one order

product_price*(1+taxtaxrate/100) * product_quantity


// invoice date + 10 days

date('Y-m-d H:i:s',strtotime('invoice_date')+60*60*24*10)


// wholesale price * 1.18 (included wholesale price of combination)

(combination_wholesale>0) ? combination_wholesale*1.18 : wholesale_price*1.18


//  first name last name, all chars to upper case

strtoupper('first_name last_name')


//  first name last name email, user format

'first_name'.', '.'last_name'.' ('.'email'.')'

(all text text fields and chars should be in single quotes and concatenated by dot)

or simplified:

'first_name, last_name (email)'

for this is Excel exist trick how forces the data to be text for example =”1.65″
Because double quotes are problem in calculated field, use this calculated field: chr(61).chr(34).’1.65′.chr(34)

For text fields can be used as well multiline field (without single quotes)



2 comments for “NVN Export Orders “Calculated Fields”

  1. 15.1.2016 at 10.06


    Very useful module congratulations
    Only I have a problem:
    In order to be able to print on DPD I Paketomat
    I need delivery firstName and a delivery lastName in column
    with Calculated Fields have I problems
    Can you help me?
    Best Regards

    Best Regards

    • kafa
      15.1.2016 at 10.58

      delivery_firstname delivery_lastname in single quotes into calculated field or for text fields can be used as well multiline field (without single quotes)
      (Picture added into article)


Leave a Reply

Your email address will not be published. Required fields are marked *