What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

First Time Questions

First Time Questions

nucleo
Shopify Partner
6 0 1

Hello, we are working on an app to integrate becool couriers to shopify.

 

First time making a shopify app, but i cannot find information/examples on the following

 

- Handling App settings like becool apikeys and if production or sandbox

- Adding a Shipping Provider that can be picked on orders

- Add a button to the order's list 'more actions' to lodge the order

- Update Order Tracking Number and tracking information

- handle webhooks from becool so we can update the order as delivered

 

Can somone please provide information on these aspects as i am unable to find information on these points

 

We have decided to use PHP

 

Thank you for any assistance that you can provide

Replies 8 (8)

garyrgilbert
Shopify Partner
431 41 186

There is a course on Udemy that currently costs €14.99. It might not use php, but all the important stuff would be covered there.

 

https://www.udemy.com/share/104iSU3@wh2ep3V9WpRCxOJWIxXoNrRsrG8ueuDgRKpBcoW6YSFWc6fHo2spldBZMWJpEur5...

 

Cheers,

 

Gary

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

1080
Shopify Partner
301 9 65

@nucleo  Hi , 
based on your stack you can find the sample repo  https://github.com/Shopify/shopify-app-template-php php boilerplate from the official shopify  github.

1 - you need to get input from user or you can mange the using via login and get the API key from the becool you can show the list of key or create new one and show the mode like production or sandbox from the API source becool.  based on becool you can manage those things.


-  here you need to consume api for mange your shipping provide.  https://shopify.dev/docs/api/admin-rest/2023-01/resources/carrierservice 



-  you can manage the button into the shopify admin UI and get connected with your app using the app extensions  https://shopify.dev/docs/apps/app-extensions/list 

- add or  Update Order Tracking  use the order custom lineitems  https://shopify.dev/docs/apps/fulfillment/order-management-apps/order-editing#add-a-custom-line-item 

- for store front side you need to show the tracking info in order page you need use the  Theme app extension https://shopify.dev/docs/apps/online-store/theme-app-extensions 


-  handle webhooks from becool so we can update the order as delivered first you need to setup secure webhook listener in app. based on you can add your business logics. here more guide reference link .    https://shopify.dev/docs/apps/webhooks/configuration/https  and order https://shopify.dev/docs/api/admin-rest/2023-01/resources/webhook#event-topics   

I hope this answer you help full.

nucleo
Shopify Partner
6 0 1

hello trying to use the extension that is an admin link, getting it to call the following code

 

```


Route::get('/api/becool/lodge', function (Request $request) {
/** @var AuthSession */
$session = $request->get('shopifySession'); // Provided by the shopify.auth middleware, guaranteed to be active

$client = new Rest($session->getShop(), $session->getAccessToken());
$order = \Shopify\Rest\Admin2023_01\Order::find($session, $request->get('id'));

$becool = new \App\Lib\BecoolUtil();

$response = $becool->lodgeShipment($order);


return response(print_r($response));

})->middleware('shopify.auth');

```

 

But i get the following error

 

Shopify\Exception\MissingArgumentException
Missing Authorization key in headers array
 
Please help

 

garyrgilbert
Shopify Partner
431 41 186

Sorry I am not familiar with the package you are using to make the authenticated requests to shopify.

 

Apparently, from the error message the headers are not being correctly set.

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
1080
Shopify Partner
301 9 65

@nucleo  have you using the same git repo i Suggested ?

nucleo
Shopify Partner
6 0 1
Yes i am
1080
Shopify Partner
301 9 65

@nucleo  you are missing the few of the steps. i was able to run the complete repo. 

nucleo
Shopify Partner
6 0 1

Thank you, for all your help i managed to work it out