[英]Rails Gem Shopify_app not able to save new products to shop
使用Shopify API和应用程序gem,我创建了一个有效的会话并将其激活,但是由于某种原因,我无法将新产品保存到连接的Shopify商店中。 见下面的代码
session = ShopifyAPI::Session.new(shop,token)
if session.valid?
ShopifyAPI::Base.activate_session(session)
sellersku.each do |xyz|
yours = find_by sellersku: xyz
new_product = ShopifyAPI::Product.new
new_product.title = yours.title
new_product.product_type = yours.product_type
new_product.vendor = yours.vendor
new_product.body_html = yours.description
new_product.images = yours.image
new_product.save
end
希望您能告诉我们您究竟得到了什么错误,也请检查一下范围,它是否包含“ write_products”?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.