shopify

Jquery - POST, success callback is not getting executed

╄→尐↘猪︶ㄣ 提交于 2020-01-03 02:42:11
问题 I am using the below Jquery code to add items to cart. My intention is to change the "Add to cart" button once the Ajax call is success. However its not happening. Code is below - jQuery.post('/cart/add.js', { quantity: 1, id: variant_id }, function(data){ var myelem = document.getElementById('red') ; if (myelem != null){ document.getElementById('red').id = 'normal'; } $("span").removeClass("hidden-count"); $(".cart-count").text('1'); $("#AddToCartText").text("Added"); $("#AddToCart").css(

How to use the Rails shopify_app gem with a private API key?

可紊 提交于 2020-01-02 10:15:06
问题 I am trying to use the Rails *shopify_app* gem with a private API key. The documentation for the gem mentions that it's possible to do this but doesn't say how. The instructions are only for a Shopify Partner Account. For a private api key there seems to be no way of specifying the return url . This results in the following response fragment being sent back: {"error":"invalid_request","error_description":"The redirect_uri and application url must have matching hosts"} I've looked around a bit

How to use the Rails shopify_app gem with a private API key?

岁酱吖の 提交于 2020-01-02 10:14:53
问题 I am trying to use the Rails *shopify_app* gem with a private API key. The documentation for the gem mentions that it's possible to do this but doesn't say how. The instructions are only for a Shopify Partner Account. For a private api key there seems to be no way of specifying the return url . This results in the following response fragment being sent back: {"error":"invalid_request","error_description":"The redirect_uri and application url must have matching hosts"} I've looked around a bit

python requests - encoding with 'idna' codec failed (UnicodeError: label empty or too long) error

自闭症网瘾萝莉.ら 提交于 2020-01-02 08:31:51
问题 [![enter image description here][1]][1]An api call I have been using with the requests package is suddenly returning the following error: "UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)" and I have no clue how to fix this. My code looks like the following, with certain credentials faked for this example: api_key= '123abc' password = '12345' #password that only idiots use on their luggage shop_name = 'myshopname' shop_url = 'https://%s:%s@%s

Overcome limit of 50 in for loop in shopify

一曲冷凌霜 提交于 2020-01-02 04:36:18
问题 I have paginated a product list over a limit of 50 to fit in the whole page ( index.liquid ). But the if condition within for loop doesn't apply over whole paginated items as for loop is limited to 50 items. Any help would be appreciated. <td class="collection-reviews"> {% paginate collections.all.products by 1000 %} {% for product in collections.all.products %} {%if product.metafields.spr.reviews %} <div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews

How to add multiple product to cart by on click in shopify

谁都会走 提交于 2019-12-31 05:07:06
问题 I want to add multiple products to cart in a single click in Shopify. to apply the algorithm of frequently bought together products. Please help if anyone know about the Shopify API or related to above. Please guide with your knowledge. 回答1: There is plenty of documentation online for that. https://help.shopify.com/en/themes/development/getting-started/using-ajax-api 来源: https://stackoverflow.com/questions/51245063/how-to-add-multiple-product-to-cart-by-on-click-in-shopify

Shopify Variants

筅森魡賤 提交于 2019-12-30 10:53:06
问题 Wondering if there is any way to assign variants to custom radio inputs? I'd like to set up tiered shipping with different rates for 2 Day, 3 Day and Standard shipping. I can do this with variants but the drop down won't work for me.I'd like to have date information and a datepicker in order to choose preferred shipping dates and have it all appear on a modal with the rest of the delivery options. Line item properties won't work because as far as I know they cannot affect price. So I wondered

How to develop Shopify themes locally?

天大地大妈咪最大 提交于 2019-12-29 04:22:04
问题 I'm going to work on a Shopify theme, and I want to figure out how to run/edit it locally. I'd like to be able to the following, if possible: Pull all the Shopify theme code from the site to my local computer (ideally a single command line tool) Make edits locally, and run them locally or in a staging environment Push all the edits to the main Shopify site, again using a command line tool Is this at all possible? 回答1: There are quite a few workflows you can use here. 0. Shopify Slate (new!)

customer Id not return in shopify cart webhook

旧巷老猫 提交于 2019-12-25 16:03:07
问题 The Shopify cart webhook is not returning customer id. so we can't able to identify which user added the product to cart. How can we achieve this? 回答1: I think you can't get the customer id from that webhook and the point is that a cart can be created by a registered customer or an unregistered customer as well so in this last case Shopify doesn't know the customer id yet. Also the example response included in the documentation doesn't include the customer id. { "id":

customer Id not return in shopify cart webhook

流过昼夜 提交于 2019-12-25 16:02:23
问题 The Shopify cart webhook is not returning customer id. so we can't able to identify which user added the product to cart. How can we achieve this? 回答1: I think you can't get the customer id from that webhook and the point is that a cart can be created by a registered customer or an unregistered customer as well so in this last case Shopify doesn't know the customer id yet. Also the example response included in the documentation doesn't include the customer id. { "id":