Is there a way to get shipping information and available shipping methods on the Product Detail Page in Shopify? - shopify

We implemented a new shipping method in our shop. This method isn't available for all Products. Now we want to create a notification on the product detail pages(pdp), where the shipping method is available. Is it possible to get the available shipping methods on the pdp?
It should look something like this:
if shippingMethods contains newShippingMethod
<div class="notifivcation">

Shipping details have nothing to do with products from a Shopify perspective. If you have come up with a way to assign shipping methods to products, then that is excellent for you! Obviously, if you figured that out, then figuring out how to display shipping methods with products would be a lesser challenge.
Mostly, shipping methods are the domain of checkout in Shopify parlance. Only in checkout would shipping methods be available, and even then, if you wanted to show/hide them based on the product, you could really only hope to do that with Plus.
Unless you know more, and Shopify has really adopted a per product shipping methodology (feel free to post a link if true), you're not going to go anywhere with that unless you use Plus and script the checkout.

Related

Shopify changing product price for variation by app

I am a shopify partner, I am trying to get around the the variant limits of shopify by coding an app and also because my client has a complicated formula for calculating the price. I don't have a problem with the part that adds the information for my variants to the order, however when I want to modify the price based on the user selection, it doesn't seem an easy task to do.
I came across couple of apps which does the same thing by adding a new product or variation which is not optimal for my use case, is there any app that does the job without adding extra information to the database, if so, how?
Qualified Yes
Unfortunately, Shopify doesn't give us a lot of options to edit prices of items dynamically. Here are the two options that I know of that will allow you to adjust the price of a product directly - however, both have limitations.
Using Shopify Script Editor
If you're working with a Shopify Plus merchant, you can use the Shopify Script Editor to dynamically adjust the prices of products, provided that the direction you adjust is down. You cannot increase the price of a product using the script editor - so for your use case, the list price would have to be the most expensive possible price that the item sells for, which you would then discount appropriately using the app.
Using draft orders
Using an app, you can use Shopify's Draft Order API to create an order with custom discounts and/or create completely custom items that are independent of the products set up in the product database.
The basic flow for this is that when the customer clicks 'checkout' you halt the normal navigation, send the cart contents to your app, create a draft order with the appropriate pricing, then supply the front-end code with the draft-order checkout/invoice URL so that you can send the customer there instead of the normal checkout. This has several limitations, however, including that prices of existing products can only be discounted, not increased, and the fact that Shopify will not allow a customer to use discount codes on a draft order invoice - once an order is set up this way, Shopify's assumption is that all prices are final.
Disclaimer: Sorry if someone sensible doesn't like a response with a link :) I'm not related to this app I'm just a user.
On a project with complex pricing, we use the app Wholesale Pricing Discount by Wholesale Helper we liked because is easy to import multiple pricing by-product and relate it by customer.
this app does not multiply the products, they use customer tags. maybe that can give you some guidance.
An important rule on Shopify is you can't increase the price by API on an order, you can just reduce i

Prestashop price edit on checkout

I'm not a Prestashop expert but a customer asked me if there is a way to change the price of individual products during checkout (he has a private ecommerce reserved only for his resellers so all the thing would be under control). I wanted to ask someone more experienced then me if this is at least feasible, if Prestashop (1.7) allows such a change; I tried to search for good among the modules on the store but I did not find any. Thank you.
There are specific prices on prestashop which allow you to define personalized prices for the product according to certain parameters.
Nothing to do with the webservice, but the doc is not very complete and they are not explained on the webservice doc, but you can find them from your back office.
https://devdocs.prestashop.com/1.7/webservice/resources/specific_prices/

Shopify - New order using the Shopify API - how to know tax and shipping?

We have built an e-commerce web application (Node backend, Vue frontend). We process the payment using Stripe, but many brands have asked us if the order and inventory control can be done in Shopify. We are trying to figure out the best way integrate a payment module into Shopify so that the brand can manage the fulfilment and inventory through Shopify.
It seems we should use the Order API to create an order and mark it as paid. But how do we know that the product is in stock, and what are the cost for shipping and tax from Shopify when creating the order? I think we can use the Product API to get inventory levels, but where is the shipping and tax endpoints?
If I understand the Order API correctly, we need to tell Shopify what are the shipping costs and tax costs, when a new order is created. Is that right? How could we possibly know those figures? Seems like there should be an endpoint to calculate shipping costs and get a product's tax rates so that we can then pass those figures back into the Order API. Am I missing something?
I thought maybe we are supposed to create an order that has financial_status: pending first to get shipping and tax rates back (does it even give you those?), then update the order to either cancel_reason: customer or cancel_reason: inventory if those rates are too expensive and the order is declined? But surely we need to know what shipping methods are available to the customer in order to tell Shopify which one to use, right? Or does it by default choose the cheapest one when creating an order?
Notes:
We know the customers shipping address
We don't know where the product is warehoused (Shopify does I think)
We don't know the weights or dimensions of the product (Shopify does I think)
This answer is a little bit late, but i hope, i can help others that are struggling with the same issue.
First i would recommend to set up all Shipping Rates and Taxes in Shopify. There are plenty of manuals to achieve this:
https://help.shopify.com/manual/taxes#general-process-to-set-up-taxes
https://help.shopify.com/manual/shipping/rates-and-methods/calculated-rates
After this there are different possibilities to calculate your shipping and tax cost.
Your shipping cost can you get via the active_shipping API, which can be found here:
https://github.com/Shopify/active_shipping
Or the following Shopify Application: https://apps.shopify.com/boxify
However, you may need to know size and storage location for theese solutions.
The taxes can you get via the country in the Admin API, there is a specific key-value pair for this:
https://help.shopify.com/api/reference/country
I hope that's enough information to get closer to solving the issue, for at least someone.

Switch the shipping rate dynamically in Shopify

I'm planning a new Shopify project, and the site requires a different shipping cost depending on the postal area of a postcode (e.g. SE1, N7). The plan was to manually add different shipping options inside of Shopify, then AJAX GET /cart/shipping_rates.json, and manually filter to the correct shipping rate by matching the name to postal area.
But my question is -- is there any way to carry over this shipping method to the Checkout as a selected option, and hide the Shipping Method drop-down from the checkout to prevent them choosing a different the shipping cost?
... Or, ideally, is there a way for me to directly override shipping costs through the API?
I don't know of any onboard functionality, which can facilitate this.
But there is a quite hacky workaround, that I use to filter the shipping rates in the checkout page.
Through the "Additional Google Analytics Javascript" field you can sneak a JS on every page of the shop, including the checkout. Here you can basically manipulate the shipping rates as you like.
In your case, the code must be aware of the shipping_address zip code. You can try to set a cookie on the first checkout page and then read the same cookie on the second.
Unfortunately, this isn’t possible with Shopify’s existing checkout.

Applying a discount code to a specific product in Shopify

I've been working on setting up a Shopify store. One major feature they don't have built in is being able to provide a discount to a specific product, even though it looks like people have been requesting it since 2008!
Does anyone have any idea how this could be accomplished with their API?
Thanks!
Shopify allows you to offer product-specific discounts. On your Shopify Admin / Dashboard go to Discounts. Click on Add a discount:
On the Discount type section make sure to choose the Specific product from the dropdown:
Click on Save and you're all set. On your discounts list you'll see the generated discount with the conditions along with the product name:
Unfortunately, the Shopify API doesn’t offer product-specific discounts yet. It’s definitely in the pipe, but the feature is not available yet.