1. Where is the VIP Plan Data Stored?

When you create a VIP plan from the Subscribfy admin panel, all plan details are saved into Shopify metafields under:

πŸ“Œ Metafield Location: shop.metafields.exison.exison_plan_settings

πŸ”— More Info: Shopify Metafields Set by Subscribfy


2. How Can Customers Join the VIP Membership?

To allow customers to join the VIP program, you need to add the VIP product to the cart using a widget.

πŸ›’ Required Data from Metafields:

πŸ”Ή Example JavaScript Code to Add VIP Product to Cart:

// Add VIP product to cart
let formData = {
    'items': [
        {
            selling_plan: exison_plan_settings.plan_id,
            id: exison_plan_settings.product_variant_id,
            quantity: 1,
            sections: []
        }
    ]
};
fetch('/cart/add.js', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify(formData)
})
.then(response => response.json())
.then(data => {
    console.log('VIP product added to cart:', data);
})
.catch(error => {
    console.error('Error adding VIP product:', error);
});

πŸ”Ή Optional: Hide the VIP product from the cart items list to make it invisible to customers.


3. How to Remove VIP Membership from the Cart?

If the customer chooses not to join the VIP program, clicking β€œNon-Member” in the widget should:

πŸ”Ή Example JavaScript Code to Remove VIP Product from Cart: