I managed to get him to start free songs, which is good with this code, now comes the problem that I have to set a link for bought songs. Can some help also want to show if the product is not bought notice (This should show the product page). Also, I want to ask if I create a subscription whether after purchase there may be access to certain product files.
This code automatically generates url addresses:
<?php
foreach($this->element->files as $file) {
$json = array(
"name" => $file->file_name,
"artist" => '',
"album" => '',
"url" => hikashop_completeLink('product&task=download&file_id=' . $file->file_id.$url_itemid),
"cover_art_url" => ''
);
$info = json_encode($json);
echo $info;
echo ',';
}
?>