1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Whatsapp outgoing message without PHP

Discussion in 'Community' started by Nagtegaal, Oct 11, 2019.

  1. Nagtegaal

    Nagtegaal New Member

    Level: Community
    Just because I love Fabric so much, I would like to contribute as well. It is a simple solution to be able to Whatsapp people without the use of PHP. Perhaps this is helpful for other users:

    1. I created a view like:
    #CREATE OR REPLACE VIEW kan_vw_test_whatsapp AS
    SELECT
    `t1`.`id` AS `ID`,
    `t1`.`name` AS `NAME`,
    `t2`.`tekst` AS `tekst`,
    REPLACE
    (
    CONCAT(
    'https://wa.me/31',
    SUBSTR(`t1`.`telephone`, 2, 9),
    '?text= Hi, ', `t1`.`name`,' ',
    `t2`.`tekst`
    ),
    ' ',
    '%20'
    ) AS `WhatsApp`
    FROM
    (
    `37248kaneeltje`.`kan_klanten` `t1`
    JOIN `37248kaneeltje`.`kan_tekst` `t2`
    ON
    (`t2`.`id` = 3)
    )

    obviously you have to adjust this to your needs/tables.

    2. create a new list using this view 'kan_vw_test_whatsapp' as your database table

    3. edit the element 'Whatsapp' to input type URL
    upload_2019-10-11_11-42-9.png

    4. set Guess link type to Yes
    upload_2019-10-11_11-43-16.png
    5. Add a Whatsapp button image to your images. I named it 'whatsapp_small'
    6. Use the image. Set Replace with icons to Yes. Enter the name of the image in Static icon file
    upload_2019-10-11_11-45-3.png

    7. Add the list to your Menu
    8. Result on my iPhone:
    [​IMG]

    And after touching the button:
    [​IMG]

    A bit strange to send the message to myself, but you got the idea
     

Share This Page