Questions, troubleshooting, and feedback on Subscription APIs
When I add a subscription to a product, the options are not showing on the products page. The subscription information is showing up in the product admin. I have it setup the same way on a test store and the options are showing on the products page?
-Showing on product admin
GraphQl used to create the subscription:
mutation {
sellingPlanGroupCreate(
input: {
name: "two months"
merchantCode: "two months"
options: ["Payment every two months"]
position: 1
sellingPlansToCreate: [
{
name: "Payment Every two Months"
options: "2 months(s)"
position: 1
billingPolicy: { recurring: { interval: MONTH, intervalCount: 2, maxCycles:3,anchors:{ type:MONTHDAY,day:15}} }
deliveryPolicy: { recurring: { interval: MONTH, intervalCount: 2 ,anchors:{type:MONTHDAY,day:15}} }
description:" my description"
}
]
}
resources: { productIds: ["gid://shopify/Product/6539671077035"], productVariantIds: [] }
) {
sellingPlanGroup {
id
}
userErrors {
field
message
}
}
}
Added to product-templete.liquid within form
{% for group in product.selling_plan_groups %}
<fieldset>
<legend>{{ group.name}}</legend>
{% for selling_plan in group.selling_plans %}
<input type="radio" name="selling_plan" value="{{ selling_plan.id }}">
{{ selling_plan.name }}
{% endfor %}
</fieldset>
{% endfor %}
Solved! Go to the solution
This is an accepted solution.
Have to have Shopify Payments Setup for the options to appear on a product page
This is an accepted solution.
Have to have Shopify Payments Setup for the options to appear on a product page
User | RANK |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023