Jump to content

Referrals: being able to choose the cookie duration


LaCollision

Recommended Posts

Hi,

By default, referrals are active for a year:

In /Dispatcher/Front:

\IPS\Request::i()->setCookie( 'referred_by', \intval( \IPS\Request::i()->_rid ), \IPS\DateTime::create()->add( new \DateInterval( 'P1Y' ) ) );

 

… 1 year is… 😳 😲 

That would be great to be able to choose this duration, like 1 week, 1 month, 10 days…

Thank you!

Link to comment
Share on other sites

On 1/28/2021 at 4:10 AM, LaCollision said:

Hi,

By default, referrals are active for a year:

In /Dispatcher/Front:


\IPS\Request::i()->setCookie( 'referred_by', \intval( \IPS\Request::i()->_rid ), \IPS\DateTime::create()->add( new \DateInterval( 'P1Y' ) ) );

 

… 1 year is… 😳 😲 

That would be great to be able to choose this duration, like 1 week, 1 month, 10 days…

Thank you!

Hey @LaCollision, I think this is an interesting suggestion! Let me pass this along and see if there's a simple solution or if it requires a lot of work. I'll circle back 🙏 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...