*

megacheb

  • ***
  • 21 posts
Get expiration date of premium
« on: September 21, 2019, 02:31:37 AM »
How i can get expiration date of premium, which extended by user?
I want to extand expiration day of ads on duration for premium.
I use

Code: [Select]
$expire = date('Y-m-d H:i:s', strtotime(" + " . $hours . " hours", strtotime($curr_date)));
Item::newInstance()->dao->query(sprintf('UPDATE %st_item SET dt_expiration = "%s" WHERE pk_i_id = %d', DB_TABLE_PREFIX, $expire, $item_id));

Its work good, when user buy premium at first, but when he extend i can not get date of expiration premium and extend expiration date of ads from this date.
I found $duration = $product[2]; in fuction osp_product_title($product), this return date of expiration premium, but it does not work on function osp_pay_fee($details)
« Last Edit: September 21, 2019, 02:33:58 AM by megacheb »

*

MB Themes

Re: Get expiration date of premium
« Reply #1 on: September 21, 2019, 09:49:02 AM »
Premium "label" cannot extend expiration date of item, there is republish option for that. Expiration date is saved in _osp_item table with code 201 and item id.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

megacheb

  • ***
  • 21 posts
Re: Get expiration date of premium
« Reply #2 on: September 21, 2019, 12:15:31 PM »
Premium "label" cannot extend expiration date of item, there is republish option for that. Expiration date is saved in _osp_item table with code 201 and item id.

Thanks, i know that premium lable can not extend expiration day. And republish option dont extend to. Republish only change publish date.
Can you help me with custom query for premium lable expiration date. How i can select it for assign a value to a variable

*

MB Themes

Re: Get expiration date of premium
« Reply #3 on: September 21, 2019, 01:33:28 PM »
Republish update expiration date, to update publish date only you can use move to top feature.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots