Git Product home page Git Product logo

Comments (15)

gnikyt avatar gnikyt commented on September 2, 2024

Solved in v5.0.0

from basic-shopify-api.

demoskp avatar demoskp commented on September 2, 2024

Hi sorry to bother again, I tried it with the new code and I still don't seem to get the location header, it's not returned in the response again. Am I missing a step?

from basic-shopify-api.

gnikyt avatar gnikyt commented on September 2, 2024

It does a complete redirect and gets the code for you, no location header will exist at the point. Its following base Guzzle config.

from basic-shopify-api.

demoskp avatar demoskp commented on September 2, 2024

from basic-shopify-api.

gnikyt avatar gnikyt commented on September 2, 2024

No since Guzzle default redirects, and with the new fix to adjust that redirect URL, it will now properly work.

https://imgur.com/a/dIQ6tOw

It will simply split out the discount code.

If it does not be found, you will see this: https://imgur.com/a/zwVkqX9

from basic-shopify-api.

demoskp avatar demoskp commented on September 2, 2024

from basic-shopify-api.

demoskp avatar demoskp commented on September 2, 2024

When it doesn't find the code it returns exactly what you said which is "+"errors": "Not Found""

However when I try to get an existing code accessing the body return null.

I am not sure what the issue is in my case, I updated the BasicShopifyAPI.php file so I am not sure if there is something I am missing here.

from basic-shopify-api.

gnikyt avatar gnikyt commented on September 2, 2024

from basic-shopify-api.

demoskp avatar demoskp commented on September 2, 2024

$shop->api()->request('GET' , '/admin/discount_codes/lookup.json?code=example')->body;

What I mean is if a discount code actually exists on the store and I do the lookup it return null on the body. If that discount code does not exist on that store then I get the errors": "Not Found"" as the body which is great.

The issue is when it should return the the discount code, the price rule and then rest like your example but in my case it doesn't.

from basic-shopify-api.

gnikyt avatar gnikyt commented on September 2, 2024

from basic-shopify-api.

demoskp avatar demoskp commented on September 2, 2024

Tried that as well, it still returns null for the body.

from basic-shopify-api.

gnikyt avatar gnikyt commented on September 2, 2024

Found the issue! Requires some rework... reopening.

from basic-shopify-api.

gnikyt avatar gnikyt commented on September 2, 2024

v5.1.0 should have this all fixed up now.

from basic-shopify-api.

demoskp avatar demoskp commented on September 2, 2024

from basic-shopify-api.

gnikyt avatar gnikyt commented on September 2, 2024

Good to hear!

from basic-shopify-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.