App reviews, troubleshooting, and recommendations
I have a requirement where the delivery methods should come from my own nodejs backend, and locations will also come from my nodejs backend whenever 'pickup in store' or 'ship to pickup point.' is selected. As far as I know, pickup points and delivery methods need to be set in the admin panel.In the delivery and shipping checkout UI extensions i didn't get anything about this .
My question is: Is this even possible? If yes, what would be the solution and any reference would help me .
Yes, it is possible to use your own Node.js backend to provide custom delivery methods and locations for options like "pickup in store" or "ship to pickup point" during checkout. However, Shopify currently does not allow full customization of delivery options directly through the Delivery and Shipping Checkout UI Extensions. These extensions are designed primarily for UI modifications within the Shopify checkout process, not for overriding delivery logic. That said, here’s how you can approach the solution:
1-Use Shopify's APIs to Integrate Your Backend: Shopify's Carrier Service API (available for Shopify Plus or Advanced plans) allows you to provide custom delivery options from your backend. When customers reach the shipping step, Shopify will send a request to your Node.js backend, and you can respond with delivery rates and options dynamically based on their input.
2-Manage Pickup Points via Metafields: If you want "pickup in store" or "pickup point" options, store those pickup locations as Metafields in your products or locations. Your Node.js backend can fetch these metafields using Shopify's Admin API and return them as options when customers select pickup.
3-Custom Logic for Pickup Points in Node.js: Your backend can manage custom logic for calculating available pickup points or delivery methods. For instance:
4-Checkout UI Extensions for Display Customization: While you cannot override Shopify's delivery logic using Checkout UI Extensions, you can use them to customize the way your custom delivery methods or pickup options are displayed during checkout. For example, you can display additional details like pickup times or instructions.
Here’s an example Node.js endpoint for the Carrier Service API to provide dynamic delivery options:
const express = require('express');
const app = express();
app.use(express.json());
app.post('/custom-shipping', (req, res) => {
const { destination } = req.body.rate;
const rates = [
{
service_name: "Pickup in Store",
service_code: "PICKUP",
total_price: 0, // Free pickup
currency: "USD",
},
{
service_name: "Ship to Pickup Point",
service_code: "SHIP_PICKUP",
total_price: 500, // $5.00 shipping fee
currency: "USD",
},
];
// Send response back to Shopify
res.json({ rates });
});
app.listen(3000, () => console.log('Server running on port 3000'));
If you need any other assistance, feel free to reply and I will try my best to respond.
Best regards,
Daisy
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024