Osclass Support Forums
Osclass plugin support => Virtual Products Plugin => Topic started by: Dawid on January 30, 2019, 05:47:32 PM
-
Hi , its posible to show version product in item.php ? If users posting new items can add file's. must write version product .
What function must use ?
-
Will check that
-
Thank You for any help .
-
MB Themes check that ???
-
@Dawid
In file:
/oc-content/plugins/virtual/functions.php
Create new function:
// GET VERSION OF LAST FILE BY ITEM ID
function vrt_item_file_version($item_id) {
if($item_id > 0) {
$file = vrt_item_file($item_id);
if(isset($file['i_version']) && $file['i_version'] <> '') {
return $file['i_version'];
}
}
return false;
}
You can then use it anywhere as:
<?php echo vrt_item_file_version(osc_item_id()); ?>
-
Thank You so mutch . :) You are the best ;)