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

What is the right way to add / update product options? by Moshe Levine

$
0
0

Hi,

I'm trying to change or add product options via the API with no success.
I created a new product on my dev store and then tried to do the simplest thing - change the name of the first (default) option:

PUT /admin/products/1196937156.json

{
    "product": {
        "id": 1196937156,
        "options": [
            {
                "id": 1487251524,
                "product_id": 1196937156,
                "name": "Color",
                "position": 1
            }
        ]
    }
}

But the response was:

{
    "product": {
        "id": 1196937156,
        "title": "My Sample Product",
        "body_html": "",
        "vendor": "Green Brothers Playground",
        "product_type": "",
        "created_at": "2015-08-20T13:28:06+03:00",
        "handle": "product",
        "updated_at": "2015-08-20T13:40:07+03:00",
        "published_at": "2015-08-20T13:27:00+03:00",
        "template_suffix": null,
        "published_scope": "global",
        "tags": "",
        "variants": [
            {
                "id": 4402236356,
                "product_id": 1196937156,
                "title": "Default Title",
                "price": "0.00",
                "sku": "",
                "position": 1,
                "grams": 0,
                "inventory_policy": "deny",
                "compare_at_price": null,
                "fulfillment_service": "manual",
                "inventory_management": null,
                "option1": "Default Title",
                "option2": null,
                "option3": null,
                "created_at": "2015-08-20T13:28:06+03:00",
                "updated_at": "2015-08-20T13:28:06+03:00",
                "requires_shipping": true,
                "taxable": true,
                "barcode": "",
                "inventory_quantity": 1,
                "old_inventory_quantity": 1,
                "image_id": null,
                "weight": 0,
                "weight_unit": "g"
            }
        ],
        "options": [
            {
                "id": 1487251524,
                "product_id": 1196937156,
                "name": "Title",
                "position": 1,
                "values": [
                    "Default Title"
                ]
            }
        ],
        "images": [],
        "image": null
    }
}

I also tried to add new options with no success.
I also tried to add them manually and then change their names - with no success whatsoever.

Any ideas of what could be wrong?

Thanks


Guide me to make an inventory manager by Benny

$
0
0

Hello,

This is been urking me for the past two days as I set my business. I need a solution that will allow me to remove discontinued items, and make sold out not visible, and return previously sold out items to availiable. I don't do any numerical inventory. The variables are only available or not.

So, I've messed with unsuccessfully trying to set up ruby on rails on my linux system to try out some github code. Do any of you do this as your solution? I can only imagine the pain of connecting to shopify's api with webhooks.

Most of this was new to me yesterday, but I'm committed to avoiding the $50+ per month charge for some of the apps with this functionality (I see why Shopify won't make a good inventory manager available... $$$ cha-ching! Which is unfortunate for their customers.)

So, I have also been looking into doing scripting with google spreadsheets. It seems you can push data to shopify's api.

Please let me know what you're doing. Let's help eachother out!

-Ben

Shayne commented on Guide me to make an inventory manager

$
0
0

Hi Ben. Shopify already has a pretty good system for marking untracked products as hidden or visible. What kind of workflow are you imagining, and what kind of manual intervention would be required from the store owner using your app?

Shayne commented on Issue setting up Shopify CLI

Shayne commented on Is there a way to add items to the shopify store programtically?

Shayne commented on What is the right way to add / update product options?

$
0
0

Hi Moshe. Your request looks fine, any chance you could post the API key of your app or your store URL so I could take a look at the logs?

BBG commented on Guide me to make an inventory manager

Shopify loading App Proxy duplicates page content by Pritam Roy

$
0
0

Hi , I am trying to serve App Proxy content via load Script into a shopify store.

I have created an index.html file loaded on an Amazon S3 server and set content type to application/liquid.

If I go to shopname/apps/proxy I get my div inserted into the shopofy layout and some content.
But my app is just a div which I want to insert into every page of the store.
Here are two approaches I've tried- 

$('body').load('/apps/proxy');

No matter which page I am on it automatically redirects me to home page.

If I try to do 

$('body').append('div id="myDiv">/div>');

$("#mydiv").load('/apps/proxy');

It duplicates the content of the page 

What I am failing to understand why is the entire shop layout being dispayed , I am sure it is my lack of understanding as to how shopify UI works, but I only want my form to be displayed into a div as a part of proxy.


Julien Heller commented on Get local URL of Application Proxy, even if shop owner changes it

$
0
0

Another vote to fix this problem. I think I may just put a warning on my app that says the app will break if they change the proxy URL.

I understand the rationale of allowing the store owner to set their own URL, but for some apps this doesn't make sense. The app developer should be able to toggle on/off whether the store owner can change it or not.

HunkyBill commented on Get local URL of Application Proxy, even if shop owner changes it

$
0
0

@Lucas, this is not a server side problem. It is all about the client. If the merchant changes the prefix, the client-side JS is useless. 

So either Shopify informs an App of this change, so the App can then adjust the JS (clunky), or Shopify does away with a feature I bet NO ONE uses. Who really cares what the prefix is. My guess is that its a "You think they might need this, but they really don't" legacy. 

Benny commented on Guide me to make an inventory manager

$
0
0

I have over 20,000 skus. And I upload them with a csv with no inventory number. I need to be able to edit everything with .csv file. I can't go filtering for parameters to change varients. I am given different .csv files from my supplier that tell me the sku of the product, and what has changed.

Here are my tasks.

So weekly, to update inventory, I would have to upload a csv that says what products are discontinued/sold out, and what products have been resupplied.

Monthly, I have to upload new products, and change prices of existing products.

Also, I need a solution to updating tags to make subcategories. Currently I just have product type, and it would be too cumbersome to individually update all tags. So I was thinking i need reupload my entire inventory after adding the tags with excel.

Any solutions? Or a better explanation of how to do these tasks with shopify?

Thanks,

Benny

 

 

Go Frugal Technology commented on Is there a way to add items to the shopify store programtically?

The variant Default Title already exists by Vamsi

$
0
0

I am trying to update the inventory_quantity of an item. But the API returns me an "The variant Default Title already exists error"
Here is the body
 

{
  "product": {
    "id": 1202316036,
    "title": "cricket bat for",
    "variants":[
        {
            "inventory_quantity": 500
        }
    ]
  }
}

Here is the error

{
  "errors": {
    "base": [
      "The variant 'Default Title' already exists."
    ]
  }
}

I am sure that headers, URL and PUT is specified correctly, because I am able to update the title of the item

Maarten van Grootel commented on The variant Default Title already exists

$
0
0

You need to include the ID of the variant you are trying to edit. So the JSON becomes:

{
  "product": {
    "id": 1202316036,
    "title": "cricket bat for",
    "variants":[
        {
            "id": XXXXXXXX,
            "inventory_quantity": 500
        }
    ]
  }
}

"updated during" filter? by finoptimal-dev

$
0
0

I'm building a private accounting-related app for my client and want to be able to identify transactions that transpire between two dates, let's say 4/1/2015 and 4/30/2015.

Even if I search for orders with created_at_min=4/1/2015 and updated_at_max=4/30/2015, I'm missing orders that were CREATED BEFORE 4/1/2015, UPDATED DURING that interim period, and then updated again AFTER 4/30/2015. So if there's a partial refund in the range and then another partial refund after the end of the range, I won't find out about the first partial refund unless I query ALL orders, grab ALL the transactions from those orders, and inspect their dates.

I believe I have to do it this way because one can only access transactions through the order that contains them. 

I can streamline this a little bit by filtering (for dates outside the range) by financial_status, looking only for refunded, partially_paid, and partially_refunded orders and then inspecting the dates of every transaction in there, but it still seems less efficient than being able to query by transaction date.

Is there a better way to filter by transaction date that what I'm describing?


Tracking A Query String Passed to a Shopify Site by John Fischer

$
0
0

Hi there,

I am working on keeping track of customers as they use my shopify site. If a query string is passed to my shopify site via the url, is there any way to parse that information and save it throughout a user's shopping and checkout experience?  Ideally, this information would then be included in the data transmitted via web hooks.  Is this possible?

Thanks in advance for you help!

Moshe Levine commented on What is the right way to add / update product options?

$
0
0

Hi Shayne,

API key of my app: 4a283b0082ceb61bb33d6836adcaa6af
My dev shop URL: green-brothers-playground.myshopify.com

Thanks

Create Order via API not decreasing inventory, NEED HELP by Andres Salgado

$
0
0

Hi,
I created an order but the product's stock didn't decrease. 

The product Inventory policy is set as "Shopify tracks this product's inventory"

I need to know if there's something missing on the request to create the order

Thanks!

Shayne commented on Create Order via API not decreasing inventory, NEED HELP

Andres Salgado commented on Create Order via API not decreasing inventory, NEED HELP

Viewing all 25503 articles
Browse latest View live


Latest Images

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