Custom Labels, adding brand problem

Hi,
I'm trying to replace the title by brands. I used Adrian's script and was able to pull out the brand to replace the title. But I'm having a few problems, hopefully you guys can help me figure out. Thank you so much in advance!
1) The brand only appear on the first label when you try to print out multiple labels at the same time.
2) To be able to print custom template, I had to disable the Zebra Browser printer, but the print result is not quite the same, it's not as sharp and clear as the Zebra Browser Printer option (but of course, the Zebra Browser Printer can only print default label template).
4 comments
Hey @khanhle, did you manage to figure out how to amend the script?
Adrian Samuel
Software Developer
Lightspeed HQ
Hi @Adrian Samuel , I still haven't figured it out yet. I was able to get the category/ brand name display on the first label but whenever I tried to print out multiple labels it only displayed on the first label only.
@khanhle,
You'll need to loop through the list of labels that are in the DOM and then print out the right details for each one
Adrian Samuel
Software Developer
Lightspeed HQ
@Adrian Samuel ,
I tried and somehow it doesn't work. I'm not good at the front end side. The JSON response only have data of the first label too.
I tried another different approach like this :
{%set testCategories = 'Test Categories'%}
and put {{testCategories}} it would print out perfecly fine, but I don't know how to get the data to assign to testCategories variable.