Top WooCommerce & WordPress Plugins › Forums › EAN and Barcodes for WooCommerce › Internal margin on the barcode labels?
- Support forum for the EAN and Barcodes for WooCommerce.
- This topic has 3 replies, 2 voices, and was last updated 1 year, 9 months ago by
Tom Anbinder.
- AuthorPosts
-
March 3, 2022 at 8:30 am #85126
Julien Vanwinsberghe
Participant- How to add an internal margin on the barcode labels? (I can only set the pages margins)
- How to insert custom fields values on the barcode labels? (I used the ACF plugin to add custom field on product page to insert a custom reference, which needs to be printed on the barcode labels)
March 3, 2022 at 11:00 pm #85127Hi Julien,
> How to add an internal margin on the barcode labels? (I can only set the pages margins)
There is probably a number of ways of doing it. One would be to wrap all your content in
<table>
and set somepadding
, i.e. try setting your “Print > Template” option to something like this:<table style="padding: 50px"> <tr> <td>[alg_wc_ean_barcode]</td> </tr> </table>
> How to insert custom fields values on the barcode labels?
Please update the plugin to the latest v3.6.0. I’ve added a new shortcode there –
[alg_wc_ean_product_meta]
. So now you can use it in your “Print > Template” option, e.g.:[alg_wc_ean_product_meta key="your_custom_field_key"]
Please give it a try and let me know what you think.
March 4, 2022 at 11:45 am #85128Julien Vanwinsberghe
ParticipantThank you Tom for your replies and plugin updates, this is really awesome! I’m gonna rate you 5-stars, that’s what I call a premium support!
Regarding the styling (margins, centering), I tried using
<div>
elements before asking the question but it didn’t work, I will try using<table>
and<td>
as you suggest.Thanks!
March 4, 2022 at 6:18 pm #85129Hi Julien,
Thank you 🙂 I really appreciate it!
Regarding styling – yes, I’ve tried styling
<div>
as well, but got much better results styling<table>
instead. Sometimes it’s a challenge to know which CSS is supported in TCPDF. There are some articles about it I found on Google, e.g. this one, but in the end, I think, you will still have to test it and see if it really works. - AuthorPosts
- You must be logged in to reply to this topic.