Zebra printer
Zebra printers are barcode and label printers which are easy to use often used in combination with EVA.
Configuration
A WiFi enabled Zebra printer is setup easily in the Infrastructure chapter in Suite's Control room. Device type ZPL.
Field | Description |
---|---|
Name | Whatever you want. |
Device backend ID | Whatever you want. |
Device type | Zebra printer |
IP address | tcp:// + device IP + :9100 Example: tcp://1.2.3.4:9100 |
Zebra programming language
The creation of a PriceLabel Stencil (not to be confused with ProductPriceLabel) is done in the Zebra ZPL programming language, which is different from our regular stencils.
To help out with this, here's an example of a PriceLabel template configured on a Zebra printer. Put the Destination to PDF.
^XA^
^FWB
^FX bar code section
^FO5,55^BY2
^BEB,60,Y,N
^FD{{>Barcode}}^FS
^FX OriginalPrice/Season section
^AJ,30,10
^FO135,143,0^FDPrix Conseille^FS
^AJ,30,10
^FO168,46,1^FDAnnee^FS
^A0,30,20
^FO160,189,0^FD{{>CurrencyID}} {{:~getRecommendedRetailPrice(RecommendedRetailPrice)}}^FS
^A0,30,20
^FO190,81,1^FD{{:~getSeasonCode(ProductProperties.season_code)}}^FS
^FX OutletPrice section
^AJ,30,10
^FO210,175,0^FDPrix Outlet^FS
^A0,30,20
^FO235,189,0^FD{{>CurrencyID}} {{:~getOriginalPrice(OriginalPrice,Price)}}^FS
^FX CurrentPrice section
^AJ,30,10
^FO285,174,0^FDPrix Actuel^FS
^A0,30,20
^FO310,189,0^FD{{>CurrencyID}} {{:~getPrice(OriginalPrice,Price)}}^FS
^XZ
function getSeasonCode(id) {
var arr = id.split('_');
if (arr.length > 1) {
season = arr[0];
}
return season;
}
function calculateDiscount(rrp,original,price) {
var rrp = rrp;
if(price!=0){
return Math.floor(((rrp-price)/rrp)*100) + '%';
}
else{
return Math.floor(((rrp-original)/rrp)*100) + '%';
}
}
function getPrice(original,price) {
if(price !=0){
var correctedPrice = price;
if(correctedPrice % 1 != 0){
return correctedPrice.toFixed(2);
}
else{
return correctedPrice + ".00";
}
}
else{
var correctedPrice = original;
if(correctedPrice % 1 != 0){
return correctedPrice.toFixed(2);
}
else{
return correctedPrice + ".00";
}
}
}
function getOriginalPrice(original,price){
if(original !=0){
var correctedPrice = original;
if(correctedPrice % 1 != 0){
return correctedPrice.toFixed(2);
}
else{
return correctedPrice + ".00";
}
}
else{
var correctedPrice = price;
if(correctedPrice % 1 != 0){
return correctedPrice.toFixed(2);
}
else{
return correctedPrice + ".00";
}
}
}
function getRecommendedRetailPrice(price) {
var rrp = price;
if(rrp % 1 != 0){
return rrp.toFixed(2);
}
else{
return rrp + ".00";
}
}