shopify

How do I display all of my products on my home page using Shopify and Liquid?

笑着哭i 提交于 2019-12-08 07:59:30
问题 Is there a simple snippet of Liquid markup I can use on my index.liquid page (home page) to display all of the products that I have and make each of those images a link to the respective product's information page? 回答1: Most themes display a collection on their home page. Go with that functionality, don't add code. For your home page collection to include all products in your store, make it a smart collection with a condition such as Product Price > 0. If you have more than 50 products in

Shopify API, unable to create order

此生再无相见时 提交于 2019-12-08 06:49:23
问题 I created private application on my test shop and I am trying to create simple order via the Shopify API following the instructions found here: http://docs.shopify.com/api/order#create I am using the last example, and sending POST request to admin/orders.json with this in the body of the request: { "order": { "line_items": [ { "quantity": 1, "variant_id": 500775053 } ] } } 500775053 is a valid variant id. The response I'm getting is: { "errors": { "line_items": [ "must have at least one line

Shopify Customized Search using external services

前提是你 提交于 2019-12-08 06:45:55
问题 My situation: we have a Shopify store, we also have a search engine implemented and hosted on AWS. We need to use that search engine instead of the default /search on our Shopify store. Ideally, when users try to search something, their query (and potentially some other stuff like attribute selectors/checkboxes on the front end) will be passed to our search engine. Then after the result is back, they will be rendered at the front end. My Question: how should I do this? Option 1: modify the

How to print the cart items,remove cart items in shopify ios sdk?

情到浓时终转凉″ 提交于 2019-12-08 05:43:42
问题 Hi I'm using Shopify ios sdk for my e-commerce app.I created login,signup and even list out the products in table view.I need to view products in my cart.So far I found only buyCart.clear; in shopify which clears all the cart item. I tried to print cart items by BUYProductVariant *variant = cartArray[i]; but it produces error.I struck here and don't know how to proceed further. Can any one help me to solve this and thanks in advance. 回答1: This is how you get BUYProduct from BUYCart BUYCart

XML parser using shopify webhooked line-items

主宰稳场 提交于 2019-12-08 02:41:34
问题 I am using shopify webhook to update my sql server's 'qty' field when order updated, below is my php code ?php $xmlData = fopen('php://input' , 'rb'); while (!feof($xmlData)) { $xmlString .= fread($xmlData, 4096); } fclose($xmlData); $xml = new SimplexmlElement($xmlString); file_put_contents('orders/order' . '.xml', $xmlString); $dom = new DomDocument(); $dom->load('orders/order.xml'); $itemList = $dom->getElementsByTagName('line-item'); foreach($itemList as $item) { $sku=''; $qty=''; foreach

Nodejs - Expressjs - Verify shopify webhook

☆樱花仙子☆ 提交于 2019-12-07 21:40:04
问题 I am trying to verify the hmac code sent from a shopify webhook on a dev environment. However shopify will not send a post request for a webhook to a non live endpoint, so I am using requestbin to capture the request and then use postman to send it to my local webserver. From shopify documentation, I seem to be doing everything right and have also tried applying the method used in node-shopify-auth verifyWebhookHMAC function. But none of this has worked so far. The codes are never a match.

Shopify post Ajax add to cart success message on Cart page

南楼画角 提交于 2019-12-07 20:33:40
问题 I'm building an online store using Shopify and have come across some jQuery/Ajax code in the default template that I would like to modify for my needs. function addToCartSuccess (jqXHR, textStatus, errorThrown){ $.ajax({ type: 'GET', url: '/cart.js', async: false, cache: false, dataType: 'json', success: updateCartDesc }); window.location = "/cart"; $('.add-cart-msg').hide().addClass('success').html('Item added to cart! <a href="/cart" title="view cart">View cart and check out »</a>').fadeIn(

Write custom search app in shopify

…衆ロ難τιáo~ 提交于 2019-12-07 20:06:35
问题 I need to implement our own custom product search in Shopify, but I have been unable to find out how exactly to do this. I am not talking about the template which shows the search result, but we need to write custom code to decide exactly which products should be shown on the search page, and their order. I can see there are a lot of apps out there which provides a custom search result/order so I guess it is possible to do, I was just unable to find any documentation about it. I already have

Shopify Customized Search using external services

試著忘記壹切 提交于 2019-12-07 14:51:26
My situation: we have a Shopify store, we also have a search engine implemented and hosted on AWS. We need to use that search engine instead of the default /search on our Shopify store. Ideally, when users try to search something, their query (and potentially some other stuff like attribute selectors/checkboxes on the front end) will be passed to our search engine. Then after the result is back, they will be rendered at the front end. My Question: how should I do this? Option 1: modify the theme code, inject some javascript to call the search engine (Possible, but messy) Option 2: write an app

How can I create a matching HMAC value to verify a Shopify WebHook in .NET?

送分小仙女□ 提交于 2019-12-07 10:13:39
问题 I have set up an endpoint to receive webhook requests from Shopify. The requests from Shopify include an HMAC header that is created from a shared secret key and the body of the request. I need to calculate the HMAC on my server and match it to the value in the request header to ensure that the request is authentic. I can't seem to create the appropriate mechanism in .NET to create a matching HMAC value. My algorithm at this point is as follows: public static string CreateHash(string data) {