Comments (6)
Hi Ronard,
Once the store installs your app, the shop domain and an API token will be stored in the shops database table. You can use this token to access the shop's data using the Shopify Admin API. Here's a link: https://help.shopify.com/api/reference
This package does all of the heavy lifting and now you can focus on your app requirements. Hope this helps.
from laravel-shopify.
In your controller you can go like this:
$shop = ShopifyApp::shop();
// If you want to know what is the current store url
echo($shop->shopify_domain);
// If you want to get all the products
$response = $shop->api()->request('GET', '/admin/products.json');
$products = $response->body;
from laravel-shopify.
Hello @brianakidd @mabrodeur,
Thank you for the response it helps a lot.
from laravel-shopify.
Done. Thank you.
from laravel-shopify.
Hi guys, appreciate your help please.
I am trying to do the same thing but my $shop object is null. I followed exactly the statements provided by @mabrodeur.
I also added the line:
use \OhMyBrew\ShopifyApp\Facades\ShopifyApp;
at the top.
Do I need to somehow initialize the $shop object myself or am I missing something here?
from laravel-shopify.
@pasartap Did your shop pass through the auth route? (try clicking on the app again in admin and make sure the auth path in Shopify App settings points to /authenticate)
$shop = ShopifyApp::shop();
after including the facade should load the shop.
Can you spit out what session('shopify_domain')
value is? See if its filled or empty?
Also, is this route you're accessing using the auth.shop
middleware?
from laravel-shopify.
Related Issues (20)
- CSRF token mismatch error in POST call using Ajax HOT 1
- Osiset\ShopifyApp\Exceptions\MissingAuthUrlException HOT 4
- 17.2 In the package in which I am facing the problem 302 status, I send the request or delete the error value, this is a problem facing HOT 3
- App must set security headers to protect against clickjacking && App must verify the authenticity of the request from Shopify. HOT 10
- rest api HOT 6
- There was an error opening your app in the Shopify admin. Your embedded app is loading an invalid URL (17.2) HOT 21
- shopify appuinstalljob problem HOT 2
- Scope Re-approval HOT 2
- Missing host parameter on getConfig(api_key) call HOT 1
- ORDER_TRANSACTIONS_CREATE Webhook not register on shopify HOT 3
- No authenticated user or shop domain error on command call HOT 1
- How to update webhook URL's for old stores? HOT 2
- Alpine.js/Livewire and Power-Grid Authentication redirect hangup HOT 1
- MissingAuthUrlException (Missing auth url) HOT 3
- The app not works on https://admin.shopify.com HOT 22
- Auth:user->name and utils Issues while Upgrading v12.x to v17.x HOT 2
- "Shopify App Outdated" but running latest app bridge, osiset, etc HOT 29
- Approving recurring billing throws SignatureVerificationException using BLADE frontend_engine config HOT 8
- upgrading and downgrading plan got issue first time.. HOT 1
- App Extension Set up Issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-shopify.