For discussing the development and integration of subscription-enabled shops using Shopify's Subscription APIs.
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:
Solved! Go to the solution
This is an accepted solution.
Hi!
There might be some confusion. The `current_variant.selected_selling_plan_allocation.price` refers to the amount that the customer is going to pay in the end. For try before you buy, this value equals to the full price.
I believe the value you are looking for in `selling_plan_allocation` should be the `checkout_charge_amount`: https://shopify.dev/docs/api/liquid/objects/selling_plan_allocation#selling_plan_allocation-checkout...
Hope this helps!
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
Hi!
There might be some confusion. The `current_variant.selected_selling_plan_allocation.price` refers to the amount that the customer is going to pay in the end. For try before you buy, this value equals to the full price.
I believe the value you are looking for in `selling_plan_allocation` should be the `checkout_charge_amount`: https://shopify.dev/docs/api/liquid/objects/selling_plan_allocation#selling_plan_allocation-checkout...
Hope this helps!
To learn more visit the Shopify Help Center or the Community Blog.
Ah, that makes sense. I thought the example code in the docs would have already accounted for that.