*

mwindey

  • *****
  • 468 posts
Republish URL - Only text but no usefull link in email
« on: October 06, 2023, 04:26:26 PM »
After reinstalling the back office manager several times, I finally succeeded in sending the emails to the recipients.
However, the problem remains that the {REPUBLISH_URL} and {EXPIRE_DAYS} are not active and no active link is clickable. It contains only text {REPUBLISH_URL} and {EXPIRE_DAYS}
I know this isn't useful in all emails, but the bo_mgr_email_will_expire mail should work.
Original mail txt on fresh install contains:
Hi {CONTACT_NAME}!

Let us inform you, that your listing: {ITEM_TITLE} (#{ITEM_ID}) will expire in {EXPIRE_DAYS} day(s) and will not be active on our site anymore.

If this listing is still active and you want to continue offering it on our site, please republish this listing on following link:

{REPUBLISH_URL} ----- NOTE:  This remains only text without link

Regards,
{WEB_TITLE}

*

MB Themes

Re: Republish URL - Only text but no usefull link in email
« Reply #1 on: October 06, 2023, 07:15:03 PM »
You can create link from url i ln email template
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 468 posts
Re: Republish URL - Only text but no usefull link in email
« Reply #2 on: October 06, 2023, 10:25:56 PM »
@MB themes

Do you mean this url?
$raw_url = osc_route_url('bomgr-republish', array('item_id' => $item_id, 'secret' => $item['s_secret']));
or
$raw_url = osc_base_url() . 'oc-content/plugins/backoffice_manager/republish.php?item_id=' . $item_id;

Both of them will not work.... Any idea how to make this work so {REPUBLISH_URL} will become active?

thx

*

MB Themes

Re: Republish URL - Only text but no usefull link in email
« Reply #3 on: October 08, 2023, 09:25:47 AM »
<a href="{REP...URL}">Republish</a>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 468 posts
Re: Republish URL - Only text but no usefull link in email
« Reply #4 on: October 08, 2023, 11:40:33 AM »
LOL ... The problem is not creating the link but the fact that it does not recognize the words REPUBLISH_URL and EXPIRE_DAYS despite these being passed as variables in email php file

File emails.php  contains:

//Create email when listing is going to expire

EmailVariables::newInstance()->add('{REPUBLISH_URL}', 'Generate complete republish link (not raw, but text with link).');
EmailVariables::newInstance()->add('{EXPIRE_DAYS}', 'In how many days will listing expire.');

then:

$words   = array();
$words[] = array('{CONTACT_NAME}', '{ITEM_TITLE}', '{WEB_TITLE}', '{REPUBLISH_URL}', '{EXPIRE_DAYS}', '{ITEM_ID}');
$words[] = array($item['s_contact_name'], stripslashes(strip_tags($item['s_title'])), stripslashes(strip_tags(osc_page_title())), $url, $expire_days, $item['pk_i_id']) ;

All words are recognized in the email but the most important are not converted to actual links or days eg: {REPUBLISH_URL}', '{EXPIRE_DAYS}
« Last Edit: October 08, 2023, 05:47:43 PM by mwindey »

*

MB Themes

Re: Republish URL - Only text but no usefull link in email
« Reply #5 on: October 11, 2023, 10:49:01 PM »
Based on code you posted, it looks correct
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots