All the data field macros can be used as well. A full list of these is available at the link below:
[+] | The two values either side are added up |
[-] | The value to the right is taken away from the value on the left. |
[/] | The value on the left is divided by the value on the right. |
[*] | The two values are multiplied together. |
[<] | Compares the value and if it is less than the value given value show the first value otherwise show the second value. For example, to show Parcel Force for orders less than £100 and CityLink for orders over and including £100 use: [%ORD_SUB_TOTAL%] [<] 100 [Parcel Force] [CityLink] |
[>] | Compares the value and if it is greater than the value given value show the first value otherwise show the second value. For example, to alert someone (by adding text into a certain field) to check all orders over £200 use: [%ORD_SUB_TOTAL%] [>] 200 [Check Order] |
[=] | Compares the value and if it equals value given value show the first value otherwise show the second value. This can include text aswell as numeric values. For example, to change the drop shipper depending upon a certain product use: [%ITEM_SKU1%] [=] IL42 [SmartShipper][We Ship] |
[U] | Make the field UPPERCASE. You should put the opertaor after the field value. This can be useful for making certain fields more visible. For example, to make the Delivery company name UPPERCASE use: [%DEL_COMPANY%] [U] |
[l] | Make the field lowercase. You should put the opertaor after the field value.This can be useful for making certain fields more readable when joined with other fields. For example, to make the built up sentence (which is itself made up from other fields) more readable use: [%CUSTOM_ENTERED1%]l] |
[$] | Display a portion of a field. The 2 values following the operator are the position to start in the text followed by the number of characters to use. This can be useful when values have to be a fixed length for certain export functions or using certain characters in a value as a code to another system. For example, to use the first 3 characters of a product code as a warehouse location (or dropshipper) use the following. You can then base other fields on tests on this field. [%ITEM_SKU1%][$][1][3] If you put a ! before the second value you can take the portion of the string before the text given. For example, to include all the text before a space in the item title use the following: [%ITEM_TITLE1%] [$][1][! ] You can also search for certain words, not just single characters. |
[.] | Take the absolute value of the number. For example, 19.21 would be shown as 19. This is very useful for any Inland Revenue figures where only the £ (GBP) number is required. For example: [%ORD_GRAND_TOTAL%] [.] |
[#] | Replace a letter or word with another word. This can be useful if you wish to replace certain words (for branding) or to remove unwanted. To replace the word Free with Additional use: [%ITEM_TITLE1%] [#][Free][Additional] To remove all commas from an address line: [%INV_ADD_LINE1%] [#][,][] |
[D] | Display the date (if a date field) in the format YYYY-MM-DD. This is useful when some export formats need the date in a different format. The formats supported are: 1 - yyyy-mm-dd 2 - dd/mm/yyyy 3 - dd/mm/yy 4 - mm/dd/yy If you use nothing or 1 after the [D] it will use the format YYYY-MM-DD. For example, to display the date as day/month/year use. [%INV_DATE%] [D]2 |
[?] | Find a word within a field. If the text is found show the first value otherwise the second value. For example, to look for the word Fast in the shipping instructions use the following: [%DELIVERY_INSTRUCTIONS%] [?]Fast[UPS][DHL] This will display UPS if the word fast is used in the shipping instructions or DHL if it is not. This can be used to display order processing information based upon the order's choices. |