hujjat / shopify-laravel-app Goto Github PK
View Code? Open in Web Editor NEWLaravel and Shopify App development Course code base.
Laravel and Shopify App development Course code base.
Hello sir,
I have created an admin Dashboard for the app following your tutorial. I created successfully a snippet file on the current Shopify theme using asset API. I can pass any HTML code as a snippet file value. This means I can pass any HTML or liquid code in the snippet file. That snippet file was created from my app.
I've added some settings fields for my app. And I can save data into my database.https://prnt.sc/vf6fjp
Now I want to create a REST API to show the data for the Shopify client store. I created an API route.https://prnt.sc/vf6cjs
For API I have created a Controller. https://prnt.sc/vf6dlu
On the controller for the API, I need to run a query based on the same customer ID and the same Shopify shop name to get data from my database. In my database, I saved customer id and shop Name, and product id.
Now, How can I get a Shopify shop name and customer ID in the laravel controller?
So, I can run a SQL query using Shopify shop name and customer-id to get data from my database.
I can easily manage JavaScript to get the name of Shopify Shop. Example: <script>Shopify.shop</script>
But how can I customer ID? The customer who logged in and saved the wishlist product.
Also, How can I write javascript in laravel controller or how can I access javascript value in the laravel controller?
I really need this assistance, I am trying to for the last few days. But I cannot find a solution.
Please sir help me
the code working fine when change to latest version of package getting the error
"name": "osiset/laravel-shopify", "version": "v12.1.0",
to
`
"name": "osiset/laravel-shopify",
"version": "v17.1.0",
`
ErrorException
Attempt to read property "name" on null (View: D:__..\Shopify-Laravel-App-master\resources\views\vendor\shopify-app\layouts\default.blade.php)
`
/* Code line */
shopOrigin: '{{ Auth::user()->name }}',
`
### One more Error on
` Osiset\ShopifyApp\Exceptions\MissingAuthUrlException
Missing auth url `
Hi,
When i tried to access any link in navbar other than "Dashboard" I'm getting below error
Trying to get property 'name' of non-object (View: /var/www/html/resources/views/vendor/shopify-app/layouts/default.blade.php)
Has anyone experiencing the same error? In the tutorial videos it works perfectly fine. I suspect this is something happening as the routes other than the "Dashboard" not in auth.shopify middleware.
Even after moving all the links in to a route group like below
Route::group([
'middleware' => ['auth.shopify']
], function() {
Route::view('/', 'dashboard');
Route::view('/products', 'products');
Route::view('/customers', 'customers');
Route::view('/settings', 'settings');
});
After making these changes and after app page load, I am only able to click any of two nav links. When I clicked on the third one it shows shopify App installation page (Enter your shopify domain to login > Install). If i enter the domain correctly it goes to 419 | Page expired.
I have tried three codebases running on docker with ngrok configured. And for the last time i tried to run codebase in this github repo. But still no luck.
Further I checked middleware AuthShopify.php in osiset/laravel-shopify module. I noticed $domain variable in handle function is of type Osiset/ShopifyApp/Objects/Values/ShopDomain in first two navbar link clicks and in the third click its type is Osiset/ShopifyApp/Objects/Values/NullShopDomain. I think there is an issue with the $request but couldn't find an exact cause.
Thanks!! :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.