Monthly or Yearly Price Switcher in Wix
Velo Code Solution
Monthly or annual subscriptions are the most common options for any subscription pricing model.
With the help of Velo, we can integrate different payment methods into your Wix online store, depending on the plan and time.
Your customers can buy a monthly or yearly subscription and choose from several plan options (standard, advanced or premium).
You will be able to fine-tune the prices, time intervals, and descriptions of plans and diversify the graphic design and description.
Contact us if you want to add advanced payment and subscription options to the Wix website.
Tools
Wix Velo API
Example Code
import wixData from 'wix-data';
import { session } from 'wix-storage';
export function Enter_click(event, $w) {
wixData.query("Plans").eq("title", $w("#text19").text).find().then((results) => {
session.setItem("planObj", JSON.stringify(results.items[0]))
session.setItem('disc', $w("#text18").text);
session.setItem('img', $w("#image7").src);
if ($w("#switch1").checked) {
session.setItem("planName", $w("#text19").text);
session.setItem('price', $w("#priceMonthly").text);
session.setItem('isMounth', 'true');
session.setItem('isYearly', 'false');
} else {
session.setItem("planName", $w("#text19").text);
console.log($w("#priceYearly").text);
session.setItem('price', $w("#priceYearly").text);
session.setItem('isMounth', 'false');
session.setItem('isYearly', 'true');
}
})
}
More Velo Integrations
Wix User Management
Learn how to manage users on Wix with VeloCode's powerful tools. Streamline user profiles, permissions, and interactions easily.