{"id":16093,"date":"2023-08-12T07:28:37","date_gmt":"2023-08-12T14:28:37","guid":{"rendered":"https:\/\/membermouse.com\/?post_type=ht_kb&amp;p=7726"},"modified":"2023-08-12T07:28:37","modified_gmt":"2023-08-12T14:28:37","slug":"trocar-produtos-de-associacao-no-checkout","status":"publish","type":"ht_kb","link":"https:\/\/membermouse.com\/pt\/docs\/switch-membership-products-on-checkout\/","title":{"rendered":"Alternar entre n\u00edveis de associa\u00e7\u00e3o ou produtos em uma p\u00e1gina de checkout"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Switching between memberships level or products on the checkout page is easy and can be accomplished in a couple of ways: by\u00a0using buttons\u00a0or\u00a0using a drop down.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">Use Buttons<\/h5>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/storage.googleapis.com\/wpgcbucket\/wp\/2023\/10\/c2cb9bae-153852.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/storage.googleapis.com\/wpgcbucket\/wp\/2023\/10\/c2cb9bae-153852.png\" alt=\"\" class=\"wp-image-11143\" style=\"width:511px;height:161px\" width=\"511\" height=\"161\"\/><\/a><\/figure>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the steps below to switch between membership levels or products using buttons:<\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the WordPress menu click\u00a0<em>Pages<\/em>\u00a0and find the default Checkout core page. It will be the one where you see\u00a0the &#8216;orange flad'\u00a0in the\u00a0<em>Core Page Type<\/em>\u00a0column. Click on this page to edit it.<br><br><\/li>\n\n\n\n<li>Get the static purchase link for the membership level or product your want to allow the customer to switch to. Read this article to\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/membermouse.com\/docs\/create-a-purchase-link\/\" target=\"_blank\">learn how to get the static purchase link<\/a>. <br><br>For example, the static link could be something like:<br><a href=\"https:\/\/membermouse.com\/docs\/switch-membership-products-on-checkout\/\">http:\/\/yourdomain.com\/checkout\/?pid=4<\/a>.<br><br><\/li>\n\n\n\n<li>Find the place in your HTML where you have inserted your button code and copy and paste the following:<br><br><code>&lt;a href=\"{purchase_link_url}\">Starter&lt;\/a><\/code><br><br>Just replace\u00a0&#8216;purchase_link_url'\u00a0with your purchase link URL:<br><br><code>&lt;a href=\"yourdomain.com\/checkout\/?pid=4\">Starter&lt;\/a><\/code><br><br><br>An example of what the final code with\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/membermouse.com\/docs\/mm-button-styles\/\" target=\"_blank\">button<\/a>\u00a0and\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/membermouse.com\/docs\/create-a-purchase-link\/\" target=\"_blank\">purchase link<\/a>\u00a0would look like, is shown below:<br><br><code>&lt;a class=\"mm-button blue large\" href=\"yourdomain.com\/checkout\/?pid=4\">Starter&lt;\/a> <br>&lt;a class=\"mm-button blue large\" href=\"yourdomain.com\/checkout\/?pid=5\">Builder&lt;\/a> <br>&lt;a class=\"mm-button blue large\" href=\"yourdomain.com\/checkout\/?pid=6\">Growth&lt;\/a><\/code><br><br><\/li>\n\n\n\n<li>Save your changes. Now when a customer clicks any of those links the checkout page will reload with the appropriate membership level or product.<br><br><\/li>\n<\/ol>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">Use a Drop Down<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the steps below to switch between membership levels or products using a drop down:<\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the WordPress menu click\u00a0<em>Pages<\/em>\u00a0and find the default Checkout core page. It will be the one where you see\u00a0the &#8221;orange flag'\u00a0in the\u00a0<em>Core Page Type<\/em>\u00a0column. Click on this page to edit it.<br><br><\/li>\n\n\n\n<li>Click the\u00a0<em>Text<\/em>\u00a0tab in the upper right corner of the content editor to switch over to using the text editor. <br><br><\/li>\n\n\n\n<li>Find the place in your HTML where you want to insert the drop down and copy and paste the following:<br><br><code>&lt;select name=\"subscriptions\" onchange=\"window.location=this.options[this.selectedIndex].value;\"><br><br>&lt;option value=\"select\">Choose a Membership&lt;\/option> &lt;option value=\"{purchase_link_url}\">{item_name}&lt;\/option> &lt;\/select><\/code><br><br><\/li>\n\n\n\n<li>For each membership level or product you want the customer to be able to switch between, add an option by using this template:<br><br><code>&lt;option value=\"{purchase_link_url}\">{item_name}&lt;\/option><\/code> <br><br>Just replace\u00a0&#8216;{item_name}'\u00a0with the text you want displayed to the customer in the drop down and replace\u00a0&#8216;{purchase_link_url}'\u00a0with the static purchase link URL associated with the membership level or product. Read this article to\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/membermouse.com\/docs\/create-a-purchase-link\/\" target=\"_blank\">learn how to get the static purchase link<\/a>. <br><br>For example, the static link could be something like\u00a0<a href=\"http:\/\/yourdomain.com\/checkout\/?pid=4\">http:\/\/yourdomain.com\/checkout\/?pid=4<\/a>. You will want to leave the first option as placeholder text, as you will need to change the existing option in order for the link to work.<br><br>Here's an example of what a completed drop down menu looks like:<br><br><code>&lt;select name=\"subscriptions\" onchange=\"window.location=this.options[this.selectedIndex].value;\"> &lt;option value=\"\">Choose a Membership&lt;\/option> <br>&lt;option value=\"yourdomain.com\/checkout\/?pid=1\">Free Membership&lt;\/option> <br>&lt;option value=\"yourdomain.com\/checkout\/?pid=2\">Paid Membership&lt;\/option> &lt;\/select><\/code><\/li>\n<\/ol>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Alternar entre os n\u00edveis de associa\u00e7\u00e3o ou produtos na p\u00e1gina de checkout \u00e9 f\u00e1cil e pode ser feito de duas maneiras: usando bot\u00f5es ou usando um menu suspenso. Usar bot\u00f5es Siga o...<\/p>","protected":false},"author":20918,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_strive_editorial_status":"not-started","_strive_copy_of":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"ht-kb-category":[138],"ht-kb-tag":[],"class_list":["post-16093","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-tips-tricks"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/membermouse.com\/pt\/wp-json\/wp\/v2\/ht-kb\/16093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/membermouse.com\/pt\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/membermouse.com\/pt\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/membermouse.com\/pt\/wp-json\/wp\/v2\/users\/20918"}],"replies":[{"embeddable":true,"href":"https:\/\/membermouse.com\/pt\/wp-json\/wp\/v2\/comments?post=16093"}],"version-history":[{"count":0,"href":"https:\/\/membermouse.com\/pt\/wp-json\/wp\/v2\/ht-kb\/16093\/revisions"}],"wp:attachment":[{"href":"https:\/\/membermouse.com\/pt\/wp-json\/wp\/v2\/media?parent=16093"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/membermouse.com\/pt\/wp-json\/wp\/v2\/ht-kb-category?post=16093"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/membermouse.com\/pt\/wp-json\/wp\/v2\/ht-kb-tag?post=16093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}