This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Dawid

  • ****
  • 149 posts
Question
« 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 ?


*

MB Themes

Re: Question
« Reply #1 on: January 30, 2019, 06:31:36 PM »
Will check that
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: Question
« Reply #2 on: January 30, 2019, 06:39:12 PM »
Thank You for any help .

*

Dawid

  • ****
  • 149 posts
Re: Question
« Reply #3 on: February 02, 2019, 03:28:56 PM »
MB Themes check that ???

Marked as best answer by dawid.olszewski on February 04, 2019, 03:28:00 PM
*

MB Themes

Re: Question
« Reply #4 on: February 04, 2019, 08:36:44 AM »
@Dawid
In file:
/oc-content/plugins/virtual/functions.php

Create new function:
Code: [Select]
// 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:
Code: [Select]
<?php echo vrt_item_file_version(osc_item_id()); ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: Question
« Reply #5 on: February 04, 2019, 03:28:37 PM »
Thank You so mutch . :) You are the best ;)