Advertisement:

Author Topic: Get premium date?  (Read 1530 times)

lexosc

  • Sr. Member
  • ****
  • Posts: 344
Get premium date?
« on: November 05, 2014, 01:58:17 am »
Can someone help me to get the dt_date from t_payments_publish ?
 I want to display to user when his premium is expiring and the current osclass helper osc_premium_pub_date()  is not working correctly with this plugin, it gives me date of 1970

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Get premium date?
« Reply #1 on: November 06, 2014, 11:28:51 pm »
Hi,

Where do you want this? On public Ad view, on User Dashboard...? ???

Regards

nilu_lal

  • Newbie
  • *
  • Posts: 12
Re: Get premium date?
« Reply #2 on: November 07, 2014, 01:03:19 pm »
Ideally and logicaly, I guess the more appropriate place is users dashboard as it has nothing to do with site visitors or/viewers.
....just my 2 cents

lexosc

  • Sr. Member
  • ****
  • Posts: 344
Re: Get premium date?
« Reply #3 on: November 07, 2014, 03:10:12 pm »
in dashboard  listing payment status for the user to know when his vip is expiring

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Get premium date?
« Reply #4 on: November 07, 2014, 09:20:37 pm »
Hm... Not much experience with that plugin, is it osc_item_id() or osc_premium_id() giving the right Ad id there? ???

Regards

lexosc

  • Sr. Member
  • ****
  • Posts: 344
Re: Get premium date?
« Reply #5 on: November 08, 2014, 07:21:38 pm »
osc_premium_id()

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Get premium date?
« Reply #6 on: November 08, 2014, 08:00:14 pm »
This sould get dt_date from t_payments_publish:

Code: [Select]
$item_premium = ModelPayment::newInstance()->getPublishData(osc_premium_id());

echo osc_format_date($item_premium['dt_date']);

Regards
« Last Edit: November 08, 2014, 08:21:10 pm by teseo »

lexosc

  • Sr. Member
  • ****
  • Posts: 344
Re: Get premium date?
« Reply #7 on: November 10, 2014, 02:05:55 pm »
Thank you again teseo!

robello84

  • Newbie
  • *
  • Posts: 2
Re: Get premium date?
« Reply #8 on: March 04, 2015, 07:30:50 pm »
Hi, and for osc_item?  :D