Liquid、JavaScript、主题、销售渠道。
Graphql >> discountCodeBasicCreate
指定用户部分
customerSelection: {
"customers": {
"add": "gid://shopify/Customer/xxx"
}
}
我尝试过 "add": ["gid://shopify/Customer/xxx"]
都是错误 {"message":"Parse error on \"customers\" (STRING) at [9, 7]
这个地方应该怎么写啊
content-type 还是这个application/graphql 这个没有改~~
是shopify-cli 下载的PHP
我说的改是 query 里面 那一个小部分修改
不是修改 content-type
意思就是我如果里面的内容是应用于全部客户, 可以成功返回, 但是如果我指定特定用户使用就错误,
我在想是不是我的query 指定特定用户得那一小段内容有问题~~正确的格式应该是什么样子的
是参数使用方式错误
$graphQL = <<<Query mutation ($input: CustomerInput!) { customerCreate(input: $input) { customer { id displayName } userErrors { field message } } } Query; $variables = [ "input" => [ "firstName" => "Greg", "lastName" => "Variables", "email" => "gregvariables@teleworm.us" ] ] $shopify->GraphQL->post($graphQL, null, null, $variables);
类似找各种参数方式就可以了
今年二月,我们在新的英语问答讨论区举办了为期两周的首个社区问答会。 以下是大家针对 Shopify Editions 2023 年冬季版宣布的超过 100 项产品更新 提出的问...
By SarahF_Shopify Mar 21, 2023三年的疫情为消费市场带来不少改变,无论是消费者的生活方式,抑或消费心理都与过去有所不同。面对经营成本上升、消费者需求和忠诚度转变,企业主该如何应对?我们将综合通过数据和专家预测,助...
By Irene_ Mar 1, 2023