Hi there,
I’m following this guide to create an app for try-before-you-buy.
In the example code under “The selling plan selector on the product page”, it mentions both “selected_selling_plan_allocation” and “selling_plan_allocations”. However, when I test this, the allocation object still had the original price, not the lower purchase option price.
Here’s how I’m testing it:
- I have a selling plan with $0 fixed due at checkout assigned to my test product.
- To make sure it’s a server-side request that Liquid processes, I call the URL with both the variant and selling_plan: /products/the-3p-fulfilled-snowboard?variant=45203469238594&selling_plan=689019388226
- I’m printing a few debug strings to see the values:
- current_variant.selected_selling_plan_allocation = SellingPlanAllocationDrop
- current_variant.selected_selling_plan_allocation.price = 262995 [this is where I expected $0]
- product.selected_selling_plan.checkout_charge.value = 0
So it seems like the product selling plan has the correct info, but the variant selling plan allocation does not. Based on the example code given in the docs, I expected the variant to have the necessary info to render the correct price.
Any ideas what I’m missing?