Hey Team, I’m using the shopify integration in plasmic studio.
Is it possible for the currentProduct to also fetch the selling plans (subscriptions available on a product), and to also have the addToCartFunctionality handle the sellingplan?
Here is how you can query it from the API I assume the plugin uses the graphql storefront api:
`
query {
products(first: 20) {
edges {
node {
id
title
variants(first: 20) {
edges {
node {
id
title
price {
amount
currencyCode
}
image {
originalSrc
}
sku
sellingPlanAllocations(first: 20) {
edges {
node {
checkoutChargeAmount {
amount
currencyCode
}
sellingPlan {
id
name
options {
name
value
}
}
}
}
}
}
}
}
images(first: 1) {
edges {
node {
originalSrc
}
}
}
}
}
}
}`,
Here is how it would be for the cart create mutation
mutation cartCreateMutation($cartInput: CartInput) {
cartCreate(input: $cartInput) {
cart {
id
checkoutUrl
lines(first:10) {
edges {
node {
id
quantity
merchandise {
__typename
... on ProductVariant {
id
}
}
sellingPlanAllocation {
sellingPlan {
id
name
}
priceAdjustments {
price {
amount
}
compareAtPrice {
amount
}
perDeliveryPrice {
amount
}
}
}
}
}
}
}
}
}