Adding FB messenger possible?

I’ve been doing a lot of learning and experimenting with this platform (MV 4.17.1). Most recently my vendors are not keen with the current message addon - it is so limited and lacks the simplest of features (attachments being the big one). Considering so many use FB messenger would the code below work if added to a products template to “message the vendor”?
If so, I’m not entirely sure what specific template or what line to place it on.

{if $product.vendor}
  <span class="vendor">{$product.vendor|escape}</span>
  <a href="https://m.me/{$product.vendor_id}" target="_blank">Contact Vendor</a>
{/if}

You can try to add this code using the hook products:options_advanced, just like the Message center add-on adds the Ask a question link on the product’s details page.

Do I just place it anywhere in:

design/themes/[THEME]/templates/views/products/components/products_options.tpl

??
Certainly it can’t be THAT easy, must be more to this to function properly.

No, definitely not like that :slight_smile:

Please check this article first and if any other questions remain, feel free to ask:
https://docs.cs-cart.com/latest/developer_guide/addons/hooking/tpl_hooks.html

Well, I’ve been reading and trying understand, even edited tpl files (I don’t feel comfortable doing that) - and nothing seemed to have worked.
I would assume it would be easy to add such a simplistic line of code.
I’ll add it to the list of 14 other things that I’ll have to get a hired programmer to implement.

1 Like