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

Jamie D. commented on Testing Controllers in a Rails 5 App Using 'shopify_app' Gem

$
0
0

Hey Alec,

I would recommend creating an issue in shopify_app to generate a discussion about best practices for testing – this could almost certainly be useful for other developers!


Pay it forward by John Sawyer

$
0
0

I am trying to build a 'pay-it-forward' feature for a private app where a customer can elect to pay $50 towards the next customer's purchase. All of the "Auto Discount" type apps are centered around giving discounts based on rules within the transaction like the number of items in the cart or the total purchase amount. I am trying to figure a way to communicate a rule across transactions.

Sending a webhook to my rails app to let it know when 'Customer A' has elected to pay-it-forward is no problem. The trouble comes when trying to apply $50 in discount (or even in gift card) toward the next transaction. When using the ruby gem I can call up the last Checkout, but when attempting to save an updated Checkout object, I get errors related to authorization.

All searches around applying discounts or adding a partial payment keep leading back to the reference page for Checkouts but this seems to indicate that to touch a cart or a checkout, I must build a partner app and use Oauth (as opposed to the private app I have built for just my store), or use the JavaScript Buy SDK, which seems to be centered around building a seperate front end.

Thanks in advance for any insight you can provide.

New app is 404ing on Shopify mid-process? by Ryan M

$
0
0

Hello everyone,

 

Hoping someone can shed some light here. Basically, I created a new app and it's authenticating successfully - but during the next to last redirect that finally takes the user to the app inside Shopify's iframe, it 404s. It's a different 404 too, like if you change one letter in the hash/guid/whatever, it shows the usual 404 page.

Anyone know what could be causing this? All of our other apps work fine, it's just the latest 3 that aren't working properly.

Our app store page is here: https://apps.shopify.com/some-manufacturer-latest-test

If you try to install that, you'll notice it stops at: https://[store].myshopify.com/admin/apps/2ccde32ffbcbee762dce730ffe2202b1/app/dashboard

In our other apps, that redirects to the final page and the user is logged in, such as here: https://apps.shopify.com/air-waves-apparel

Anyone know what could be causing this? Any Shopify admins have better access to logs that could help (a 404 isn't much to go off of)?

Any and all help is appreciated!

 

Additional Note:

If I remove the javascript that redirects the app to be an iframe app, it works fine (removed the ShopifyApp.init / ShopifyApp.ready function calls, and it proceeds to operate as a regular app, just not in an iframe like it's supposed to and like every other one of our apps does that's using the exact same code).

 

Thanks,

Ryan

Ryan M commented on New app is 404ing on Shopify mid-process?

$
0
0

Nevermind guys, I had an idea while writing this post and it turns out my idea of the issue fixed it. I forgot to enable it to load inside Shopify's iframe under the Extensions tab, it wasn't as obvious as the old UI.

 

/resolved

Jordan commented on Bundles with Price Rules API possible?

$
0
0

Hey Sven, 

No way yet for automatic behaviour of discounting at checkout. Currently, price rules require the use of a discount code at checkout. This is something that is on our roadmap, but I don't have much insight into how or when this sort of feature will be released.

 

- Jordan

Adding line item properties with Ajax by Zigmo

$
0
0

Good Evening,

I'm using ajax to add several SKUs (Custom Bundle) to the cart from a custom page with a single button.   

What I would like to do next is add a text field where the customer can name the "Customer Bundle".  

I've followed this tutorial and have successfully implemented it on the Product page.

https://help.shopify.com/themes/customization/products/get-customization-information-for-products

 But it did not give any hint on how to do this from a custom page.

I see that this:

<input type="text" id="Custom_Bundle" name="properties[Custom Bundle]" />

works when submitting the form.

How would I do this in ajax simultaneously for all SKUs coming from a custom page?

      function AjaxAdd(id, qty, bundle_name)
    {
        $.ajax({
            type: 'POST',
            url: '/cart/add.js',
              data: { quantity: qty, id: id },
              properties: { 'Custom_Bundle' : bundle_name },
            async:false
        });
    }

Thanks

-Zigmo

nilanjan2306 commented on Implement Shopify in iOS app written in Swift

$
0
0

Hi Dima,

I have downloaded the swift project from github,but getting error in graphql.swift class,is there any way to solve it.

another queries I have, by using which Api I will get my all catagories and sub-catagories.

Thanks,
Nilanjan

Zigmo commented on Bundles with Price Rules API possible?

$
0
0

I'm in the middle of building a similar page.  It's a calculator that estimates the QTY of 3 SKUs needed for the customer. The "add to cart" button adds everything with one click.

 I used an APP to do the discount.  It's free as long as you only need one discount configuration.  It's called "Discount Pricing by Booster Apps"

By chance are you doing anything with "line item properties" to label the 3 SKUs when added to the cart from the page? That is where I'm hung up on.  Can't find a way do to it via Ajax.


Jono commented on Expose the timeline through an API?

$
0
0

+1 please, planning to upload photos of my fulfilled packages using the API.

Query range exceeds available data by maticl

$
0
0

Hi,

we are using Shopify QL for our app and we have serious problems with it. 

For example:

SHOW total_sessions OVER day(timestamp) AS day FROM visits SINCE 2017-06-01 UNTIL 2017-07-30 ORDER BY day ASC

This one works without any problems.

SHOW total_sessions OVER day(timestamp) AS day FROM visits SINCE 2017-03-01 UNTIL 2017-04-30 ORDER BY day ASC

This one is not working. The only thing that is different is month in both dates. i thought the problem appears because of no data for that period. So I ran next query.

SHOW total_sessions OVER day(timestamp) AS day FROM visits SINCE 2017-12-01 UNTIL 2017-12-30 ORDER BY day ASC

And it works. It works for future dates. Of course it returns 0 for every day but it works. Then I tried something else. I changed UNTIL date to date of the first query. I thought it won't work but actually it did.

SHOW total_sessions OVER day(timestamp) AS day FROM visits SINCE 2017-03-01 UNTIL 2017-07-30 ORDER BY day ASC

I tried with two stores. Both have the same problem. I noticed that if UNTIL date is before 2017-05-03 it won't work.

Another example:

Query:

SHOW total_sessions OVER day(timestamp) AS day FROM visits SINCE 2017-04-01 UNTIL 2017-04-30 ORDER BY day ASC

Response:

{"query":null,"message":"query range exceeds available data","line":"","tag":"range","code":0,"params":{"lwm":"2017-04-20T00:00:00-04:00","since":"2017-04-13T00:00:00-04:00"}}

I noticed parameter lwm 2017-04-20. So i ran another query:

SHOW total_sessions OVER day(timestamp) AS day FROM visits SINCE 2017-04-20 UNTIL 2017-04-30 ORDER BY day ASC

Everything after 2017-04-20 works. 

Conclusion:

If SINCE is after 2017-04-19 it works.

OR

If UNTIL is after 2017-05-02 it works.

Shop: maticl-dev.myshopify.com

Why is this happening?

Thank you.

Best Regards

Create Order and redirect customer to the shopify checkout by fonsitest Admin

$
0
0

Hi,

Is it possible to create an Order with customer details, address, delivery etc... and then redirect the customer from my locally hosted cart to my shopify-checkout?

Basically the idea is that the customer would be creating the basket with all the details in my homepage, once he presses on the "Go to payment" button, I was planning create the Order with the Admin API and once the order is created I redirect the customer to the checkout where he can see his address filled and can choose how to pay. Once the payment is successful I would receive a OK from shopify (with a web-hook or similar, I suppose) and would send a thank you email etc...

I'm wondering if this is possible and how. I mean is it better with the Admin API or the Storefront? I'm a little bit confused ;)

Thank you

Sven Schmidt commented on Bundles with Price Rules API possible?

$
0
0

@Jordan, that's a bummer. 

@zigmo, I am not doing anything with  "line item properties".

Post Refund issues by Muzammal

$
0
0

Hello all,

I am writing an app which post refunds so I need to submit a refund request. but I am receiveing this error

 

[errors] => Array
(
[refund_line_items] => expected Hash to be a Array
)
 

here is my json data.

{
    "refund": {
        "restock": true,
        "notify": true,
        "note": "testing note",
        "shipping": {
            "amount": 0
        },
        "refund_line_items": [{
            "line_item_id": 8258966347,
            "quantity": 1
        }],
        "transactions": [{
            "parent_id": 8222353099,
            "amount": "0.30",
            "kind": "refund",
            "gateway": "manual"
        }]
    }
}

 

 

I am writing first time for shopify forum so please excume if I don't follow any rule at shopify forum.

Thanks

www.muzammalarif.com

 

gion commented on Getting 403 Forbidden when adding a product but the shop has every permission

$
0
0

Anybody?? I am waiting 10 days for an answer...

Dima Bart commented on Implement Shopify in iOS app written in Swift


Slightly Different Buy Button by Julian Finke

$
0
0

Hello everybody,

I'm quiet new to Shopify and its SDK, read and testet a lot already but got now more questions than before - I hope you guys can help me.

I'm desiging websites with webflow and I want to integrate shopify there. I managed already to implement the buy button but want to slightly change it - and I don't know how or if it's even possible!

Let's say I sell T-shirts, in different colors and sizes. Instead of the dropdown menu the buy button is offering, I would like my customers to select the product trough an image and then add it to the cart. 

Is there an easy way to have one buy button, that adds different products to the cart by changing some variables?

E.g. Customer is clicking on an image -> variable color is set to "green"

Customer is clicking on buy button -> add product to cart, depending on color and size variable

 

Hope that was easy explained!

jarroyo Logisfashion Desarrollo commented on Order fulfillment webhook is not triggering

$
0
0

Hi!!

The webhook we are subscribed is orders/fulfilled.

An example:
order_id = 5781393415
order_number = 2997

We fulfilled that example order but the webhook event is not triggering and our API did not received the call. We canceled it at the end, it is an example order.

Thanks!!

Creating orders with discounts applied by Darin

$
0
0

We're trying to create an order using the Orders API, and we want to apply one of our pre-existing discounts.

Suppose I've got a Discount Code "TEST" that is a $10 fixed_amount discount.

We've tried populating the 'discount_codes' field, but that demands a 'value', 'type', and 'name'. I should need to give a value and type for a pre-existing code.

When we submit that data anyway, then the Order appears in Shopify with a discount of that name, but A) it doesn't do the math on the total price and B) it does not get tracked as a use of my pre-existing code for the benefit of reporting, looks like a one-off code of the same name.

To solve A, we can populate the 'total_discounts' field on POST, but it still leaves problem B.

TL;DR: How do you create an order using the API that has a pre-existing discount applied?

Syncing Products,Customers,Shipping methods by Ramesh Dasari

$
0
0

Hi,

Can we import programatically items,customers,shipping methods from ERP system to shopify. Do we've any API's to do that ?

 

Thanks in Advance.

Test Shopify Payments through the API by jesushernandez

$
0
0

Hello,

I am currently trying to place some test orders (via the checkout API) and the checkout object I get comes with an empty (`null`) `shopify_payments_account_id`. Do you have any idea of what could be happening?

Here is a summary of the current setup:

  • using a development store
  • the development store is configured to use Shopify Payments, with Test Mode enabled
  • talking to the API using the access token obtained via a custom Sales Channel
  • our access token has the following scopes attached to it:
    • read_products
    • read_product_listings
    • read_collection_listings
    • write_checkouts
  • we are using the python bindings for the Shopify API
  • we are able to create a `Checkout` object (hence getting a valid token)
  • the orders are appearing under the `Abandoned` Orders section in our development store

Any help would be appreciated, as we are not sure if this is a configuration or a code issue.

Thanks,

Jesús

Viewing all 25503 articles
Browse latest View live


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