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

mwindey

  • *****
  • 478 posts
Change link {OFFER_LINK} in message
« on: September 30, 2021, 10:04:45 AM »
Everyday i find something new to change on my site and today it is this link {OFFER_LINK} that's keeping me busy :D
When a user get's an offer on his listing an email is send to inform them that a new offer has been done by someone. The link in that email points out to in my case (since i use instant messenger) https://....com/im-messages/46/QRYFdJIWze/ which is ok but i rather see it pointed to the offer page itself instead of the im-messenger link.

In the email it isn't such a big problem to point to im-messenger, but if you are in im-messenger the same link https://....com/im-messages/46/QRYFdJIWze/  appears to point you to the same message instead of the offer page. Attachement makes it more clear....
Is it possible to change the link so when user clicks they go to the offer page and not the message in im_messerger?

It must be {OFFER_LINK} that's needs to be changed but i am not able to find it in module file or functions....
« Last Edit: September 30, 2021, 06:09:35 PM by mwindey »

*

MB Themes

Re: Change link {OFFER_LINK} in message
« Reply #1 on: October 01, 2021, 03:22:30 PM »
@mwindey
Could you upload image in "english" ?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 478 posts
Re: Change link {OFFER_LINK} in message
« Reply #2 on: October 01, 2021, 05:50:34 PM »
@MB Themes,

Sorry, i don't have this in English translation.... The link says Click here to view offer and if you follow the link you go to the same IM message you are in https://wgg.be/im-messages/49/n instead of the offer page https://wggg.be/user/offers

What I've noticed also is that when you enable im-messenger in plugin make offer you receive the email im_email_message_notify instead of the mo_notify_seller.

Turning instant messenger off sends correct email.....
« Last Edit: November 04, 2021, 02:11:11 PM by mwindey »

Marked as best answer by mwindey on October 04, 2021, 10:44:11 AM
*

MB Themes

Re: Change link {OFFER_LINK} in message
« Reply #3 on: October 04, 2021, 08:00:19 AM »
@mwindey
Looking on code and  it looks good to me:
Code: [Select]
<?php if($offer) { ?>
      <a href="<?php echo osc_route_url('mo-show-offers', array('offerId' => $thread['i_offer_id'])); ?>" class="im-row im-body im-offer">
        <div class="im-line"><?php echo sprintf(__('Offer: %sx %s for %s%s''instant_messenger'), $offer['i_quantity'], $offer_item['s_title'], $offer['i_price']/1000000$currency['s_description']); ?></div>
        <div class="im-line"><?php _e('Click to view offer''instant_messenger'); ?> <i class="fa fa-angle-double-right"></i></div>
      </a>
    <?php ?>

Then I reviewed Make offer plugin and find out, that during major update, this line from index.php has been removed:
Code: [Select]
osc_add_route('mo-show-offers', 'mo-show-offers/([0-9]+)', 'mo-show-offers/{offerId}', osc_plugin_folder(__FILE__).'user/user_offers.php', true);

So just add it there and it should work ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 478 posts
Re: Change link {OFFER_LINK} in message
« Reply #4 on: October 04, 2021, 10:44:01 AM »
@MB Themes,

Super!  8) .... I added the line and works perfectly now. Thank you....

*

MB Themes

Re: Change link {OFFER_LINK} in message
« Reply #5 on: October 04, 2021, 05:36:04 PM »
Glad to hear that ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots