How to add a title attribute to the free JoomShopping?

Writing a plug-in quick order, among other things, functionality has the ability to attach a file to the buyer. The file is uploaded to the server and reference to it is written in the free attribute of the product.
It happens this way:
JDispatcher::getInstance()->register('onBeforeAddProductToCart', function(&$cart, &$product_id, &$quantity, &$attr_id, &$freeattributes, &$updateqty, &$errors, &$displayErrorMessage, &$additional_fields, &$usetriggers) {
.......
 $freeattributes['File'] = JHtml::link($path_to_file . '/' . strtolower($file['name']), $file['name']);
.......
});

In the database in the table #_jshopping_order_item it is written so:
field freeattributes
a:1:{s:10:"File";s:134:"filename.jpg";}

field product_freeattributes
: filename.jpg

As in the field product_freeattributes to add a title to it:
Downloaded file : filename.jpg
March 19th 20 at 08:49
0 answer

Find more questions by tags Joomla