Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all 25503 articles
Browse latest View live

Zac commented on Maximum characters in metafield

$
0
0

Heya Jason, got this all working in an alternative method.

But product data, funnily enough. Loading information via Shopify directly didn't give us the specific information we needed without doing multiple calls to get a complete record - and that started getting large.

We ended up throwing our cut down data into a JSON array and storing it in the theme's assets.


Adam Robson commented on Update Metafield Values

$
0
0

For anyone interested, managed to get this working (updating the metafield) by using the following:

{
  "metafield": {
    "namespace": "custom_fields",
    "key": "warehouse_location",
    "value": "2345",
    "value_type": "string"
  }

and using POST to:

https://MY-SHOP/admin/products/PRODUCT-CODE/metafields.json

Hope the information helps someone else.

Shopify Android Sdk-How to get product quantity? by mahmoud wahba

$
0
0

Hello there,

I'm building a mobile application for my website in shopify

but i can't get the remaining quantity of each product.

is there a function that achive what i want in shopify sdk?

thanks.

Stas [99rabbits] commented on Integration: Create new account via API and authentication

Jason commented on Maximum characters in metafield

$
0
0

For massive slabs of JSON that's a far more sensible idea.
Glad to hear you've got a working model.

Filter on update type for recently-updated products? by Realtime Despatch

$
0
0

We have a WMS system that uses the Shopify API as a client.

Amongst other things, it updates inventory levels (by using variant PUTs), and pulls product details down. It is interested in recently updated products, so includes an 'updated_at_min' parameter in a periodically-invoked products GET request.

However, any product whose inventory has been updated for any of its variants is returned, even if this is the only update. This leads to unnecessary traffic between the systems, as our WMS then pulls the product again to find out details of the update.

Is there any way to avoid this, for example providing a filter as to the type of update a product has undergone, when specifying the 'updated_at_min' parameter?  (I could see no API option for this.)

I understand that an alternative solution would be to use product web-hooks, but because of limitations on the webhook URL (i.e. it cannot contain any identification of the product being updated), this doesn't work with our current architecture, without further development.

Many thanks,

Matthew

Encode Decode BuyCart Object by Nabeel Ahmed

$
0
0

I want to store BuyCart Object in NSUserDefault and then retrive back in to BuyCart Object. I am unable to encode and decode it properly.

I am using this funcation for encoding buyCart.jsonDictionaryForCheckout() and got this in json

({
"line_items" = (
{
price = 55;
quantity = 2;
"requires_shipping" = 1;
title = "Fresh Without Shell (500g)";
"variant_id" = 20325638465;
},
{
price = 109;
quantity = 3;
"requires_shipping" = 1;
title = "Fresh without Shell";
"variant_id" = 18464205953;
}
);
})

can you tell me how i can decode if this is the proper way as lot of info has been lost.

Controlling the checkout process by Tony

$
0
0

Is it possible to control the checkout process from begining to end via the API? I see many apps such as PayWhirl and a few other apps. I want to create an app that has complete control over the actual credit card order page. Is this possible for someone like myself with a developer/partner account to create and use and possibly sell? I see in the documentation there are instructions for submitting credit card numbers through the API and return results but I see on various places on the boards shopify telling customers you cannot modify this stage of the checkout process so I am getting conflicting information

 

 


Brent Gulanowski commented on Shopify Android Sdk-How to get product quantity?

$
0
0

Sorry, no. The inventory count is not available through the SDK API.

Brent Gulanowski commented on IOS SDK practical usage

$
0
0

Hello Bruno,

Version 1.x of the SDK does not support customers. Version 2.0, on the develop branch, does. We will release to master soon, and release updated docs at the same time. Version 2 is a significant change, so please review the code before jumping in.

If you want to persist the user's cart, you will have to do that yourself. You can convert the cart into JSON  to save to disk. On app resume, create a new cart and initialize it with the JSON.

If you create a checkout token, you may wish to re-use that, to avoid creating abandoned checkouts. The token is created by Shopify when you POST the checkout the first time. You may want to keep the cart and checkout in sync. The easiest way is to recreate the checkout from the cart, and then set the token on it, and then update the checkout on Shopify.

It is up to your app to decide when to re-use a checkout, and when to discard it and create a new one. Usually when the user empties the cart completely, you would probably want to delete your locally saved cart and checkout token.

Chi commented on Develop Offiste payment method to intergarate into Shopify

$
0
0

Thanks Jordan.

x_gateway_reference: Unique reference for the authorization issued by the payment processor.

How can I know my x_gateway_reference?

William commented on [Help needed] Validation function for add to cart form submission

$
0
0

Bump...

Did you figure this out yet?

Zeeshan Mahmood commented on [Help needed] Validation function for add to cart form submission

$
0
0

Nope, but we did manage to pin down the root cause of the issue. This issue is because of the fact that some themes have their own submission function bound to form submit, so when our validation function is called and fails, the themes form submit function passes and just continues. Essentially, you would need to hunt down the listeners added by the theme and modify them to run your own validation function first (google chrome network monitor + element inspector makes hunting them down really easy). Some themes will work out of the box for this, whereas others will not.

The default theme that the shop is loaded with requires you to hunt down their on submit function and modify it, whereas Brooklyn (another free shopify theme) does not. With brooklyn our validation function works almost as needed (included below), it still has the issue where someone can go $('#AddToCartForm').submit() and bypass the validation. 

<script>
jQuery("form[action='/cart/add'] [type=submit]").on("click", function(e) {
   // Validations here
   if (valid) {
      return true;
   } else {
      return false;
   }
});</script>

Returning false does stop the form fom being submitted, however as I mentioned above $('#AddToCartForm').submit() will still let the form be submitted.

Fees charged by Shopify via API by Eden Corbin

$
0
0

I'm looking to get information on the fees charged to our company (store owner) by Shopify for a particular order. I may have missed it but I didn't see this data in Order or Fulfillment. Where can I find this fee data?

Bulk Updating Order Status from Void to Paid by Eli Rubel

$
0
0

Hey there everyone - I recenetly did a huge inport from Magento to Shopify via Cart2Cart during which 40k old orders were imported. 

The problem is that they were all imported under the status of "Void" when they should all be "Paid." This obviously messes with all of our dashboards and reporting. 

Do any of you have experience bulk editing this field? I'd like to mark all orders as "Paid" (which you can do one by one if you mark it as "cash recieived" but would be way to slow for 40k orders). 

I also need to make sure when I do this it doesn't email all the customers :) 

Thanks for your help!


Update Product Price and Qty via API by Adam Robson

$
0
0

Hoping someone can tell me what I'm doing wrong here. I'm simply wanting to update the price and quantity of a product using the API. Our products do not have variants. I have tried the following but both return a (422) Unprocessable Entity error. 

{
    "product": {
        "id": "7050337351",
        "variants": [{
            "price": "12.34",
            "inventory_quantity": "87654"
        }]
    }
}

also tried:

{
    "product": {
        "id": "7050337351",
        "price": "12.34",
        "inventory_quantity": "87654"
    }
}

The JSON is being sent via PUT to: 

/admin/products/7050337351.json

but returns a (422) Unprocessable Entity error

Sending custom metafields with Javascript SDK on checkout. by Walter Dumlao

$
0
0

Just as the title says. Can you send custom metafields with Javascript SDK on checkout?

Example: I was able to prepopulate first name, last name, email addres, etc by doing something like this below:

https://checkout.shopify.com/233423423/checkouts/1fe9462c86ac1190c8dcf1b53019646f?
    checkout[email]=me@email.com&
    checkout[shipping_address][first_name]=Walter&
    checkout[shipping_address][last_name]=Dumlao&
    checkout[shipping_address][address1]=123 Fake Street&
    checkout[shipping_address][address2]=Side&
    checkout[shipping_address][city]=City&
    checkout[shipping_address][country]=Canada&
    checkout[shipping_address][province]=Ontario&
    checkout[shipping_address][zip]=N1EJ7L&
    checkout[reduction_code]=code

Walter Dumlao commented on Sending custom metafields with Javascript SDK on checkout.

$
0
0

I would love to assign an order with a customer that lives on my website external to Shopify store.

Requiring app install on the primary/custom domain of a store by Arvind Krishnan

$
0
0

Hello - We are building a Shopify app for our platform, called Swym Relay. One requirement we are trying to mandate for the app install is for the user to install it on their custom domain, as opposed to their myshopify.com domain (we require this becasue of how the platform is implemented). When I try to test the app on a custom domain I've created, Shopify seems to always refer to my original myshopify.com domain - I get the following error when I try this:

"The store URL you entered is not correct. Please try entering it again."

Further, when I try to access the Admin module by referring to my custom domain, i.e. http://<customdomain.com>/admin, that always redirects to the store.myshopify.com/admin address. I suspect that this is part of the problem.

Is this the expected/documented behavior? Any suggestions on how we can get around this, short of letting the user install on the myshopify.com domain and then having them change the domain later? Is there a way during the install process to get the custom domain name?

Thanks for your help!

Login in mobile app using Mobile-Buy SDK android by PRAVEEN KUMAR

$
0
0

Hi,

Any idea, where I can find the sample which demonstrates the customer login using mobile buy sdk.

In latest pre-release they have added customer login support :

https://github.com/Shopify/mobile-buy-sdk-android/releases/

But I can't find the updated sample related to same as they have mentioned in the release notes. Also, does mobile-buy sdk for android provides search functionality?

Any pointers would be helpful.

Viewing all 25503 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>