shopify

Remove item from cart permanently in Vue.js and Shopify using AJAX [duplicate]

大憨熊 提交于 2021-01-07 02:43:50
问题 This question already has an answer here : Shopify cart update not working with axios (1 answer) Closed 22 days ago . Looking for some help with removing a product from a MiniCart using Vue.js in a shopify theme. Below you can see the minicart.liquid file and below that the cart data being stored in the datat property. The remove function does remove the ite, however when the browser id refreshed the product reappears and is not saved. Looking for some guidence on solving this issue. I have

Shopify Buy Button JS display collection in product slider

浪尽此生 提交于 2021-01-07 02:27:45
问题 <div class="wrap"><div id="collection-component-1608088773387"></div></div> <script type="text/javascript"> /*<![CDATA[*/ (function () { var scriptURL = "http://sdks.shopifycdn.com/buy-button/2.1.7/buybutton.js"; if (window.ShopifyBuy) { if (window.ShopifyBuy.UI) { ShopifyBuyInit(); } else { loadScript(); } } else { loadScript(); } function loadScript() { var script = document.createElement("script"); script.async = true; script.src = scriptURL; ( document.getElementsByTagName("head")[0] ||

Using Timber and Shopify, how can I add meta fields on the ajax mini cart of timber?

三世轮回 提交于 2021-01-07 01:21:02
问题 I’m using Timber in a Shopify theme. I would look to add meta fields of the product on the cart. Cart screenshot here The metafields are showing on product i would like to show that on Ajax mini cart too. product page screenshot js code here Let me know if its possible. 回答1: Here are a few examples on how you may access a product's metafields. In the cart page though, because you don't have a direct access to the product object, you should first get access to the product object via the [line

Using Timber and Shopify, how can I add meta fields on the ajax mini cart of timber?

纵然是瞬间 提交于 2021-01-07 01:17:08
问题 I’m using Timber in a Shopify theme. I would look to add meta fields of the product on the cart. Cart screenshot here The metafields are showing on product i would like to show that on Ajax mini cart too. product page screenshot js code here Let me know if its possible. 回答1: Here are a few examples on how you may access a product's metafields. In the cart page though, because you don't have a direct access to the product object, you should first get access to the product object via the [line

Shopify cart update not working with axios

删除回忆录丶 提交于 2020-12-27 06:16:36
问题 I am trying to permanently remove product items from my cart, but the function i created only only removes the data from the DOM and upon browser resfresh, reappears. Here is what i have done so far. HTML with JS click function in the cart.liquid file <a @click="removeFromCart(item)" class="product-remove">remove</a> removeFromCart function in my CartForm.js file removeFromCart(item){ let productInfo = this.cart.items.reduce( (accumulator, target) => ({ ...accumulator, [target.variant_id]:

Shopify cart update not working with axios

蹲街弑〆低调 提交于 2020-12-27 06:16:01
问题 I am trying to permanently remove product items from my cart, but the function i created only only removes the data from the DOM and upon browser resfresh, reappears. Here is what i have done so far. HTML with JS click function in the cart.liquid file <a @click="removeFromCart(item)" class="product-remove">remove</a> removeFromCart function in my CartForm.js file removeFromCart(item){ let productInfo = this.cart.items.reduce( (accumulator, target) => ({ ...accumulator, [target.variant_id]:

Shopify cart update not working with axios

假装没事ソ 提交于 2020-12-27 06:15:42
问题 I am trying to permanently remove product items from my cart, but the function i created only only removes the data from the DOM and upon browser resfresh, reappears. Here is what i have done so far. HTML with JS click function in the cart.liquid file <a @click="removeFromCart(item)" class="product-remove">remove</a> removeFromCart function in my CartForm.js file removeFromCart(item){ let productInfo = this.cart.items.reduce( (accumulator, target) => ({ ...accumulator, [target.variant_id]:

Shopify - Redirecting user after Activate Account form is submitted

家住魔仙堡 提交于 2020-12-06 03:03:54
问题 By default, when users Activate their account in a Shopify store, they are redirected to their account page. I'd like to change the destination of that redirect to another page in the Shopify store. I've successfully done this for the Customer Login page to prevent redirection to the account page using a hidden input field for checkout_url, as described in this Shopify support post: http://support.shopify.com/customer/portal/articles/313065-is-it-possible-to-be-redirected-to-a-special-page

Shopify - Redirecting user after Activate Account form is submitted

╄→гoц情女王★ 提交于 2020-12-06 03:02:50
问题 By default, when users Activate their account in a Shopify store, they are redirected to their account page. I'd like to change the destination of that redirect to another page in the Shopify store. I've successfully done this for the Customer Login page to prevent redirection to the account page using a hidden input field for checkout_url, as described in this Shopify support post: http://support.shopify.com/customer/portal/articles/313065-is-it-possible-to-be-redirected-to-a-special-page

How do I loop through all the products of a store using Liquid (Shopify)?

蓝咒 提交于 2020-12-01 12:08:42
问题 I can't. I know. Shopify imposes a limit when it comes to the number of products one can loop through on a page. The current limit is 50. Actually, this is not true . One can loop through all the products of a store using liquid : {% paginate collections["all-products"].products by 10000 %} {% for product in collections["all-products"].products %} {% comment %}looping through all 10000 products{% endcomment %} {% endfor %} {% endpaginate %} In the above example, if a store has up to 10000