Velo: Build a Custom Pricing Plans Page

You can replace your site’s default Wix Pricing Plans page with your own customized version. This enables you to modify or extend the page’s functionality to suit your precise business needs.

To integrate the page into your site’s pricing plans flow and implement its functionality, you need to add code to the page and use Velo APIs.

Your code has to do several things:

  • Get data about the available pricing plans.
  • Handle UI initialization and interactions.
  • Implement any customized business logic.
  • Direct users to the next page in the flow.

Step 1 | Add a custom Pricing Plans page to your site

To create a custom Pricing Plans page, do one of the following:

Wix Studio
  1. Click and then Start Coding from the sidebar on the left side of the Editor.
  2. Click Pages on the sidebar.
  3. On the Plans & Pricing (under Pricing Plans Pages), click the More Actions icon .
  4. Click Replace with custom page.
  5. In the confirmation panel, click Replace.

Wix Editor
  1. Turn on Dev Mode.
  2. Click Pages on the left side of the editor.
  3. Click Pricing Plans Pages, and then on the Plans & Pricing page, click .
  4. Click Replace with custom page.
  5. In the confirmation panel, click Replace.

Step 2 | Design your custom page

Add elements to the page to create your business’s customized design and functionality, such as text, buttons, and images.

At a minimum, these elements must:

  • Display information about the pricing plans and let the site visitor select the plan.
  • Provide an action button that navigates to the next page in the flow (usually the Checkout).

Step 3 | Add Velo code to your page

  1. Use the getAppPageData() function to get the plans object associated with the page, and the getPricingPageOptions() function to get the options set for the current Plans & Pricing page.

For example:

Copy
  1. Depending on the functionality you’re developing, implement any business logic that your customized page requires. For example, define all the items in the repeater, such as text and buttons.

  2. Add an event handler to the page’s action button so that it navigates to the next page in the flow, which is typically your site’s Checkout. Use the navigateToCheckout() function and pass the checkout options together with the ID of the plan to buy. The repeater displays plans on the page.

For example:

Copy

Your custom page can now display the pricing plan’s data and direct site visitors to the next page in the flow.

Test your code

To receive a populated page data object using wixWindowFrontend.getAppPageData() when testing your code, do the following:

  1. Create at least 1 pricing plan.
  2. Publish a test site.
  3. Navigate to the Pricing Plans page in your test site.
  4. Return to the editor.
Did this help?