Print Shipmondo label
Here’s an example of an order HTML page with:
- An input for the quantity of parcels
- Print label button that fetches the label from Shipmondo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<div class="input-group mb-1">
<span class="input-group-text" id="qp_label">Packages</span>
<input type="number" class="form-control" id="quantity_parcels" value="1" placeholder="Enter quantity" />
</div>
<script language="JavaScript">
function printShippingLabel() {
var baseUrl = "";
var quantity = $('#quantity_parcels').val();
var fullUrl = baseUrl + '&allow=new_if_exists&quantity_parcels=' + quantity;
window.location = fullUrl;
}
</script>
<a href="javascript:printShippingLabel()" class="btn btn-success w-100">Print label</a>