Sentidos Café connects customers directly to the café’s WhatsApp line through two distinct touchpoints: inline order buttons embedded in each combo card and a persistent floating chat button fixed to the bottom-right corner of every page. Both are powered by the standardDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Jimmy13anhelo/paginaweb2.github.io/llms.txt
Use this file to discover all available pages before exploring further.
api.whatsapp.com/send deep-link pattern — no WhatsApp Business API account or third-party service is required.
How the WhatsApp API Link Works
The integration is built on a single URL format:- The browser opens
https://api.whatsapp.com/sendin a new tab. - WhatsApp (desktop app, mobile app, or
web.whatsapp.com) opens automatically. - A new conversation to the configured number is pre-loaded with the message already typed.
- The user simply taps Send — no manual typing required.
The Core abrirWhatsapp Function
All WhatsApp buttons on the site call a single shared function. Both the numeroTelefono constant and abrirWhatsapp() are defined inside the DOMContentLoaded callback in buscador.js, so they have access to each other through closure:
encodeURIComponent converts spaces and accented characters (like Dúo or Súper) into safe URL sequences before the link is opened.
Inline Order Buttons (.btn-wsp-pedido)
Each combo card in the accordion gallery contains an inline green order button. The product name is stored in the data-producto HTML attribute and read by JavaScript at click time — no hardcoded strings inside buscador.js.
HTML structure (from index.php):
index.php and their data-producto values are:
| Card | data-producto value |
|---|---|
| Combo Dúo | Combo Dúo (2 Personas) |
| Mix Antojos | Mix Antojos (3-4 Personas) |
| Súper Banquete | Súper Banquete (5 Personas) |
| Mega Compartir | Mega Compartir (Hasta 7 Personas) |
estilo.css) — the buttons use WhatsApp’s brand green and darken on hover:
Floating Chat Button (#btn-wsp-flotante)
A circular green button with the WhatsApp icon is fixed to the bottom-right corner of the viewport on every page. It uses id="btn-wsp-flotante" and the CSS class .btn-wsp-flotante-principal.
HTML (from index.php, placed just before </body>):
data-producto is set to "Consulta General", the generated message reads:
Hola Sentidos Café Cusco, deseo solicitar más información o realizar un pedido del producto: Consulta General.CSS positioning and animation:
cubic-bezier on the hover transform gives the button a bouncy, attention-grabbing wiggle — helping it stand out without an autoplay animation.
Changing the WhatsApp Number
The phone number is defined as a constant near the top of theDOMContentLoaded block in buscador.js:
Open buscador.js
Locate the line
const numeroTelefono = "937604465"; inside the DOMContentLoaded callback.Replace the number
Replace
"937604465" with your full number including country code and no special characters. For Peru: "51937604465".Customizing the Message Template
The message text is a template literal insideabrirWhatsapp(). Edit it freely to match your brand voice:
${producto} in the string — it is replaced at runtime with the value of the data-producto attribute from whichever button the user clicked.
Adding a New Product Button
To add a WhatsApp order button for a new menu item, paste this snippet into the appropriate section of your HTML and setdata-producto to the exact product name:
querySelectorAll('.btn-wsp-pedido') loop in buscador.js automatically picks up any button with that class and attaches the click listener. If you also want an alternative hover image for the new card, add an entry to the fondosAlternativos object in buscador.js: