View Product Page

Shortcodes

YITH Render Barcode

The shortcode [yith_render_barcode] allows you to display a barcode anywhere you wish on the page. You can set up the following attributes:

  • id: enter the ID of the order/product/ticket/gift card to display a specific barcode.
  • hide_if_empty (default: 1): this has to be used together with the ID attribute to make sure the shortcode box is hidden if there is no barcode with the selected ID.
  • protocol: it allows you to specify which protocol to use to display the barcode (default: EAN8).
  • value: it allows you to specify the barcode number you want to display. This has to be used with the protocol parameter.
    Example: if you want to display a barcode with the value 1234 on a specific place on your website, you can use this shortcode setup:

[yith_render_barcode protocol=EAN8 value=1234]

YITH Order Barcode

The shortcode [yith_order_barcode] allows you to view a section with which you can apply actions on orders.
You can configure this shortcode from YITH > Barcodes and QR Codes > Settings > Shortcodes tab in the plugin settings.

Order shortcodes
  • Shortcode capability: this allows you to choose which capabilities are required to be able to use the information printed by this shortcode. Default to: manage_woocommerce, so that only admins and shop managers will be able to access this information. You can use ‘all’ or any other capability to customize this option.
  • Show Processing button: this allows you to add a button so that you can set the status of the rendered order to Processing in one click.
  • Show Completed button: this allows you to add a button so that you can set the status of the rendered order to Completed in one click.
  • Update an order status after scanning: choose here if you want to automatically perform a specific action whenever an order status is scanned:
    • Don’t update the order status
    • Process the order automatically
    • Complete the order automatically
Order barcode shortcode example

YITH Product Barcode

With this shortcode, you will be able to show the product barcode and automatically or manually update the stock quantity and add it to the cart. Go to YITH > Barcodes and QR Codes > Settings > Shortcodes > Product shortcode settings to configure the shortcode options.

Product barcode shortcode settings
  • Shortcode capability: this allows you to choose which capabilities are required to be able to use the information printed by this shortcode. Default to: manage_woocommerce, so that only admins and shop managers will be able to access this information. You can use ‘all’ or any other capability to customize this option.
  • Show Stock buttons: this allows you to add two buttons to let you increase or decrease the stock quantity of the product displayed.
  • Stock behavior on product scan: choose here if you want to automatically perform a specific action whenever a product barcode is scanned:
    • Don’t update the stock
    • Decrease the product stock automatically
    • Increase the product stock automatically
  • Show “Add to cart”: choose whether to show the “Add to cart” button or not
Product barcode shortcode example

Please, note: The increase and decrease stock buttons appear only if the product has stock enabled.

How to use the shortcodes

After connecting your barcode scanner or smartphone to the computer (barcode scanners are simply copy/paste tools so no specific integration is required), open the shortcode page where you will find the input to add the barcode value. After scanning or typing the barcode number in the field, the product/order information will show. You will then be able to apply the actions that you find in the right column (update the order status, increase/decrease the product stock, add to cart)

Use of YITH Product Barcode with YITH POS

If you use the plugin in combination with YITH Point of Sale for WooCommerce, an additional selector will show through which you can choose the store to update the stock. You can refer to this page for more information about this integration.

POS product barcode example