Esta etiqueta muestra el enlace con el que un usuario puede interactuar para comprar un producto o inscribirse en un nivel de afiliación gratuito. Para convertirse en un enlace funcional, esta etiqueta debe utilizarse junto con una etiqueta de anclaje (<a>), una etiqueta de botón (<button>) o algún otro método para ejecutar un enlace en el que se pueda hacer clic.
Debe especificarse un ID de producto o un ID de nivel de afiliación para indicar qué está comprando o suscribiendo el afiliado. Si no se especifica ninguno de los dos, servirá como enlace de inscripción para el usuario. Nivel de afiliación por defecto.
Atributos
productId (opcional) – Indicates the ID of the product to purchase. Following a successful purchase, the member’s account will be updated appropriately. If the product is associated with a membership level or bundle, then that membership level or bundle will be applied to their account.
membershipId (opcional) – Indicates the ID of the membership level for the member to sign up for. If the membership level is a paid membership, then the default product from the membership level configuration will be used unless a specific product ID is specified in the ‘productId’ attribute.
autoLogin (opcional) – When this is set to ‘true’ a login token will be appended to the URL so that when a member clicks on it they will be automatically logged in. The default value is ‘false’.
useCardOnFile (opcional) – This attribute is only applicable when you’re utilizing a payment method that supports card on file functionality.
When using a card on file solution, if there’s a card on file available for the current user, purchase links will be generated in a way that instruct MemberMouse to use that user’s card on file to make the purchase otherwise a standard checkout link will be generated so the user can enter in their billing information on the checkout page.
If you set this attribute to ‘false’ then regardless of whether the current user has a card on file or not, purchase links will always take the member to the checkout page to complete their order. The default value is ‘true’.
bypassConfirmation (opcional) – This attribute is only applicable when you’re utilizing a payment method that supports card on file functionality.
When using a card on file solution, if there’s a card on file available for the current user and they click on a purchase link, the default behavior is to display a confirmation message asking the user to confirm the purchase.
If you set this attribute to ‘true’ then the confirmation message will not be displayed and the user’s card on file will be billed. If you decide to bypass the confirmation message, it’s your responsibility to make it clear to the user that they will be charged when they click the purchase link. The default value is ‘false.
método de pago (opcional) – This parameter is used for certain offsite payment methods. It instructs MemberMouse to generate a link that goes directly to the offsite payment method’s checkout form instead of going to the MemberMouse checkout page. The only valid value for this attribute is ‘clickbank’. The payment method specified must be active in your configuración del método de pago para que esto funcione.
isGift (opcional) – When this is set to ‘true’ the product being purchased will be purchased as a gift. The default value is ‘false’.
Utilización
Ejemplo 1
Muestra un enlace en el que se puede hacer clic y que dirige a la página de pago del producto con ID 4. El texto del enlace dice "Adquirir membresía".
<a href="/es/[MM_Purchase_Link productId='4']/">Adquirir la afiliación</a>
Ejemplo 2
Muestra un enlace en el que se puede hacer clic y que dirige a la página de pago del producto con ID 6. El texto del enlace es "Comprar paquete". Configurado para que el usuario inicie sesión automáticamente en el sitio al hacer clic en el enlace.
<a href="/es/[MM_Purchase_Link productId='6' autoLogin='true']/">Comprar paquete</a>
Ejemplo 3
Muestra un enlace en el que se puede hacer clic y que dirige a la página de pago del nivel de afiliación con ID 1 (nivel de afiliación gratuito por defecto). El texto del enlace es "Regístrate gratis".
<code><a href="/es/[MM_Purchase_Link membershipId='1']/">Regístrate gratis</a>
Ejemplo 4
Muestra un enlace en el que se puede hacer clic y que dirige a la página de pago del producto con ID 10. El enlace está configurado para dirigir a la página de pago incluso si el cliente tiene una tarjeta registrada. El texto del enlace es "Comprar paquete".
<code><a href="/es/[MM_Purchase_Link productId='10' useCardOnFile='false']/">Comprar paquete</a>
Ejemplo 5
Muestra un enlace en el que se puede hacer clic y que dirige a la página de pago del producto con ID 10. Enlace establecido no para mostrar la ventana emergente de confirmación para los enlaces de 1 clic. Aplicará el pago inmediatamente. El texto del enlace dice "1-Click Buy (Bypass Confirmation)".
<code><a href="/es/[MM_Purchase_Link productId='10' bypassConfirmation='true']/">Compra en 1 clic (sin confirmación)</a>

