- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用节点平台编写一个 shopify 应用程序,我试图使用 npm 模块“shopify-node-api”从我的应用程序获取 shopify 中的折扣信息,它显示“404- Not Found”错误,但是,我我能够通过此方法获取产品和 custom_collections。
var Shopify = require('shopify-node-api');
var config = {};
config.shop = myshop.myshopify.com;
config.shopify_api_key = XXXX;
config.shopify_shared_secret = XXXX;
config.access_token = XXXX;
sails.log.verbose('Shopify config object: ', config);
var shopify = new Shopify(config);
shopify.get('/admin/discounts.json', function(err, data)
if (err) {
sails.log.error("Error in getDiscount ", err);
} else {
sails.log.verbose(" shopify.getDiscount data ", data);
}
我还可以使用 URL https://myshop.myshopify.com/admin/discounts.json
获取折扣详情,输出为
{
discounts: [
{
id: 4128341132,
code: "GET4PRODUCT",
value: "10.00",
ends_at: null,
starts_at: "2017-03-09T00:00:00-08:00",
status: "enabled",
minimum_order_amount: "0.00",
usage_limit: null,
applies_to_id: 9720854796,
applies_once: true,
applies_once_per_customer: true,
discount_type: "fixed_amount",
applies_to_resource: "product",
times_used: 0,
applies_to: {
id: 9720854796,
title: "xxxxxxxxxxxxxx",
body_html: "<meta content="text/html; charset=utf-8" http-equiv="content-type">
<ul class="a-vertical a-spacing-none">
<li><span class="a-list-item">Outer Material: EVA Sheet</span></li>
<li><span class="a-list-item">Sole Material: Anti Slip EVA Sole</span></li>
</ul>",
vendor: "myshop",
product_type: "",
created_at: "2017-02-18T05:24:52-08:00",
handle: "adreno-mens-blue-slippers",
updated_at: "2017-02-18T05:28:20-08:00",
published_at: "2017-02-18T05:23:00-08:00",
template_suffix: null,
published_scope: "global",
tags: ""
}
}
]
}
但是我无法使用我的应用程序获得折扣对象。我是否需要提供任何其他凭据或是否有任何其他方法可以从我的应用程序中获取折扣对象。
请帮助我从应用程序中获取折扣 json。
最佳答案
HymnZ 是正确的,折扣端点只能通过 API 访问 Plus 商店帐户。
如果您不是 Plus 订阅者,则可以使用经过管理员身份验证的 session 访问浏览器中的折扣端点,但不使用 API 凭据。
关于javascript - 无法从我的应用程序中获取 shopify 中的折扣详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42760042/
我试图了解如何返回多个值。现在,我的代码设置为为任何具有一个兑换代码的代码返回单个对象(redeemDisc)。我的问题是,如果一个代码有多个兑换代码,它只会返回“多个折扣”。我试图了解如何将“red
我有一个函数discount,它接受一个“rate”参数( double )并将我的类中的私有(private)变量netPrice更新为减价。计算看似可行,但有一个问题;它会产生不准确的结果。 pu
我正在尝试获得折扣以应用于我编写的购物车。我正在使用 Adaptive API 系统,但我似乎无法正确使用它。我在 SetPaymentOptions 调用中尝试过: 'receiverO
我在尝试为我的程序创建 switch 语句时陷入困境。为了充分披露,这是明天到期的家庭作业。我应该使用 switch 语句来为所售 CD 的总费用指定折扣率。黄金级折扣 15%,银级折扣 10%,铜级
我的动画遵循这个计时函数:cubic-bezier(0.25, 0.1, 0.25, 1.0) 我想修改这个函数,所以我只得到它的结尾 40%。为了让事情变得简单,我们可以说我想要函数的最后 50%。
Paypal 的新手。在协会网站上使用“立即购买”按钮,适用于单价商品。 但是,现在客户想要设置折扣功能。我认为逻辑很简单,但就我的生活而言,我不了解文档或如何让它正常工作。 这是设置。高尔夫郊游,有
Array ( [return] => http://www.example.com/ [cancel] => http://www.example.com/ [currenc
Paypal 列出了折扣的方法,例如: discount_amount 可选与项目关联的折扣金额。它必须低于商品的售价。如果您指定 discount_amount 且未定义 discount_amou
我在 woocommerce 中有很多产品(将近 30,000 个)。常规价格已设置正确,现在我想将销售价格设置为具有一定折扣百分比的常规价格。我尝试使用一些插件,但由于产品数量,我总是遇到 PHP
如何应用税收、小计折扣以及计算总计? 我的这些段落具有以下 ID 15000 10 // In percentage 1000 // Grandtotal will be calculated an
有人知道与Stripe一次性交易是否可以接受优惠券吗? 我知道您可以添加带有定期订阅的优惠券,但我只希望能够提供一次性付款折扣。 最佳答案 我认为这里的想法是,您可以完全控制单个费用(或一次性付款,无
当产品价格为零或 100% 折扣时,我需要一个解决方案来隐藏产品页面上的“添加到购物车”按钮 我认为以下代码可能用于添加到购物车部分此代码位于以下路径中mytheme/woocommerce/单一产品
我希望为特定的可变产品设置特定的折扣,如果客户购买一种产品,他们会以 50% 的折扣获得另一种(相同的)(买一个 50% 的折扣)。我试过很多折扣插件,我发现最接近的是: WooCommerce 的定
在我上一个问题之后 WooCommerce discount: buy one get one 50% off 每当特定产品(不是所有产品)添加到购物车时,我想向购物车添加自定义通知。 我想先检查数量
我是一名优秀的程序员,十分优秀!