For discussing the development and integration of subscription-enabled shops using Shopify's 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