Dear All,
I am working on creating a sticker sheet, based on NovaJet 56L Sticker page. The page has to be saved as a PDF for printing purposes.
The Sticker Page looks like the following design:
In order to fill the <td> with data (barcode and some text, as per the requirement), there will be a table, that will have the item names fetch from a clonable template and there will be an input to set how many times a particular data needs to be replicated. The table for an idea looks like:
When the "CHECKBOX" are selected (which can be for 1 or 3, at random) and the "COPIES" and then the "Generate Barcode Sheet" button is pressed, an AJAX (as below) call is made to generate the PDF (using the PDF Exporter, posted by Aashish Sir).
(Edit#1: Added AJAX Code, that I missed out earlier)
Now the issue is that I cannot get my mind around the fact how to generate the stickers data. Can anyone please help me.
Regards,
GXCPL (CTR)
I am working on creating a sticker sheet, based on NovaJet 56L Sticker page. The page has to be saved as a PDF for printing purposes.
The Sticker Page looks like the following design:
- Code: Select all
<div class="container">
<div class="row">
<div class="col-md-12">
<style>
.page {
width: 21cm;
height: 29.7cm;
padding-top: 2mm;
padding-left: 6mm;
box-sizing: border-box;
border: 1px solid #212121;
}
table {
border-collapse: separate;
border-spacing: 2mm 1mm; /* Horizontal and vertical pitch */
}
td {
width: 48mm;
min-height: 20mm;
max-height: 20mm;
height: 20mm;
margin-bottom: 1mm;
margin-right: 2mm;
border: 1px solid rgba(0, 0, 0, 0.35);
border-radius: 10px;
box-sizing: border-box;
}
</style>
<div class="page">
<table>
<cms:repeat count="14">
<tr>
<cms:repeat count="4">
<td>
</td>
</cms:repeat>
</tr>
</cms:repeat>
</table>
</div>
</div>
</div>
</div>
In order to fill the <td> with data (barcode and some text, as per the requirement), there will be a table, that will have the item names fetch from a clonable template and there will be an input to set how many times a particular data needs to be replicated. The table for an idea looks like:
When the "CHECKBOX" are selected (which can be for 1 or 3, at random) and the "COPIES" and then the "Generate Barcode Sheet" button is pressed, an AJAX (as below) call is made to generate the PDF (using the PDF Exporter, posted by Aashish Sir).
(Edit#1: Added AJAX Code, that I missed out earlier)
- Code: Select all
$("#bulk-pdf").click(function() {
var ids = [];
var copies = [];
$('.bulk_checkbox:checked').each(function(i, e) {
ids.push($(this).val());
copies.push($(this).closest('tr').find('input[name="copies"]').val());
});
$('#loading-image').show();
$.ajax({
url: "<cms:show k_site_link />ajax/barcode-pdf.php",
type: "POST",
data: {
'id': ids.join(),
'copies': copies.join()
},
beforeSend: function() {
$('#loader').show();
},
complete: function() {
$('#loader').hide();
},
success: function(file) {
if (file != '') {
window.open(file);
}
}
});
});
Now the issue is that I cannot get my mind around the fact how to generate the stickers data. Can anyone please help me.
Regards,
GXCPL (CTR)