This tag outputs the link that a member can interact with to purchase a product or sign up for a free membership level. In order to become a functional link, this tag should be used in conjunction with a anchor tag (<a>), a button tag (<button>) or some other method of executing a clickable link. Either a product ID or a membership level ID should be specified to indicate what the member is purchasing or signing up for. If neither are specified, then it will serve as a sign up link for the Default Membership Level


Attributes


productId (optional) - 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 (optional) - 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 (optional) - 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 (optional) - 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 (optional) - 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.


paymentMethod (optional) - 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 payment method configuration in order for this to work.


isGift (optional) - When this is set to true the product being purchased will be purchased as a gift. The default value is false.


Usage


Example 1


Displays a clickable link directing to the checkout page for the product with ID 4.  Link text reads "Purchase Membership". 


<a href="[MM_Purchase_Link productId='4']">Purchase Membership</a>


Example 2

Displays a clickable link directing to the checkout page for the product with ID 6.  Link text reads "Purchase Bundle".  Set to automatically log the member into the site when clicking the link.


<a href="[MM_Purchase_Link productId='6' autoLogin='true']">Purchase Bundle</a>


Example 3

Displays a clickable link directing to the checkout page for the membership level with ID 1 (default free membership level).  Link text reads "Sign Up Free". 


<a href="[MM_Purchase_Link membershipId='1']">Sign Up Free</a>


Example 4 


Displays a clickable link directing to the checkout page for the product with ID 10.  Link is set to direct to the checkout page even if the customer has a card on file. Link text reads "Purchase Bundle".  


<a href="[MM_Purchase_Link productId='10' useCardOnFile='false']">Purchase Bundle</a>


Example 5 


Displays a clickable link directing to the checkout page for the product with ID 10. Link is set not to display the confirmation popup for 1 click links. Will immediately apply payment.  Link text reads "1-Click Buy (Bypass Confirmation)". 


<a href="[MM_Purchase_Link productId='10' bypassConfirmation='true']">1-Click Buy (Bypass Confirmation)</a>