shopify-template

upload image field on product page of shopify theme

帅比萌擦擦* 提交于 2021-01-29 21:33:46
问题 I want to add a field for my customers to upload an image when they will purchase a product or add to cart a product. When input type if file it allows to upload a photo but it does not work. Can anybody give me that solution? <div class="product-form__item product-form__item-uplpic"> <label for="photo">Upload Photo</label> <input required class="product-form__input required" id="photo" type="file" name="properties[Uploaded Image]"> </div> 回答1: You can definitely give your customers an

Shopify Customer's Order Page keeps redirecting back account page

浪尽此生 提交于 2021-01-29 16:38:41
问题 I am developing a Shopify theme. But when I want to navigate to customer's order pages, but I keep getting redirected back to the account page. Here is the link https://website.myshopify.com/account/orders. My order.liquid is placed under the customers folder in theme template folder. Does anyone knows whats causing this? 回答1: Make sure customers accounts are enabled on your store. 来源: https://stackoverflow.com/questions/62348535/shopify-customers-order-page-keeps-redirecting-back-account

Shopify trigger function on variant selection but don't override existing functionality

只愿长相守 提交于 2021-01-28 06:34:55
问题 I am using the 'Loft' theme on Shopify. When I select a variant on the product page, the them updates the SKU and the price to that variant I need more functionality than this, as I would like to show the dimensions of each variant using metafields. I have created a function and called it on variant select like this: jQuery(function($) { new Shopify.OptionSelectors('productSelect', { product: {{ product | json }}, onVariantSelected: selectCallback, enableHistoryState: true }); }); My function

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

Passing previously assigned variable in `{% for` block in Shopify

穿精又带淫゛_ 提交于 2020-03-26 04:02:26
问题 In blog-templte.liquid {% assign articleSortOrder = '' %} .... {% for article in blog.articles {{articleSortOrder}} %} got an error : Liquid syntax error: Unexpected character { in "article in blog.articles {{articleSortOrder}}" The intention is to pass the variable to sort the articles depending on some condition. Q: is how to make it work? 回答1: This is not a valid liquid code: {% for article in blog.articles {{articleSortOrder}} %} You can't pass a liquid inside a liquid, a.k.a {% {{ }} %}