I wish to create automatically created barcodes from newly create Node content and also Node content already created in the Drupal V7.3x system. Further to my previous posting Barcode Creation I can allow a user to create a QR barcode from a text field entered on a Node Form which successfully shows the QR on the Node display page; but this is no longer what I want, I require the QR code to create on the fly to create the QR code which will ultimately be the URL of that Node which is being shown so that the user then can scan it and save for later ie on a mobile device.
I have tried with Rules, but to date cannot get the Rule to write, save or show any QR code.
If it is a PHP script code, then what would it be to create onto the Node page the user would see.
I want to do it via Rules is possible but the barcode field wasn't showing in Rules. Any advice on a correct procedure or a Rules structure is most welcome.
PS:
I have found this type of PHP on https://www.drupal.org/node/1364118, and I wonder if this is the direction I need to go? to solve it:
<?php
if (!isset($commerce_product->field_barcode['und'][0]['value'])) {
$commerce_product->field_barcode['und'] = array(0 => array ('value' => $commerce_product->sku));
}
else {
if ($commerce_product->field_barcode['und'][0]['value'] == '') {
$commerce_product->field_barcode['und'][0]['value'] = $commerce_product->sku;
}
}
commerce_product_save($commerce_product);
?>