The part of a PrestaShop to Shopify migration that goes wrong without an error is the price. PrestaShop keeps one tax-excluded base price per product, a price impact on each combination, and specific prices on top. Shopify wants one absolute price per variant. Ask the webservice to compute each one, then map attributes to options and redirect the old URLs.
Shopify’s migration guide has pages for WooCommerce, Wix, Squarespace and seven other platforms. PrestaShop is not among them (checked 27 November 2026), so the choice is a third-party app or the two APIs. The PrestaShop behaviour described here comes from the 9.2.1 source and docs, and the Shopify side uses Admin GraphQL API version 2026-10.
What does the PrestaShop webservice give you?
The webservice lives at /api/ and is off by default. Switch it on in the back office under Advanced Parameters, create a key with read access to the catalogue resources, and send that key as the Basic auth username with an empty password. The PrestaShop docs warn against putting the key in the URL.
Five resources carry a product that has combinations. products holds the name, the link_rewrite slug and the base price, which excludes tax. combinations holds one row per sellable variant with its own reference, ean13 and price. That second price is an impact, an amount added to the product’s price, so 0.000000 means the combination costs the same as the base. product_options are the attribute groups (Size, Colour), product_option_values are their values, and stock_availables holds quantities keyed by id_product_attribute.
Three details of the JSON output matter to a script. A translatable field such as name comes back as an array of {id, value} pairs unless you pass language=<id>, which turns it into a plain string. A list request returns only ids unless you add display=full or display=[field,field]. And a list with no matches is a bare [] with no resource key at all.
How do you get the price a customer actually pays?
Do not multiply it out yourself. Product::priceCalculation() starts from the base price (or a specific price’s fixed price), adds the combination impact, adds tax for the customer’s country, adds ecotax, subtracts the specific price reduction (an amount or a percentage), subtracts any group reduction, and then fires the actionProductPriceCalculation hook so an installed module can change the result. A migration script that reimplements those steps has to get the tax rule, the reduction type and its tax flag right, and it still cannot see what a module does in that hook.
The webservice will run that function for you. Add a price parameter with an alias of your choosing and the response gains a field of that name. On the combinations resource, PrestaShop fills in the product and combination ids itself, so two aliases on one list request return the current price and the pre-reduction price for every combination.
// Usage: node presta-to-productset.mjs <id_product> (Node 22 or later)
const { PS_URL, PS_KEY, PS_LANG = '1', SHOPIFY_LOCATION_ID } = process.env;
const auth = 'Basic ' + Buffer.from(`${PS_KEY}:`).toString('base64');
async function ps(resource, params = {}) {
const url = new URL(`/api/${resource}`, PS_URL);
url.search = new URLSearchParams({ output_format: 'JSON', language: PS_LANG, ...params });
const res = await fetch(url, { headers: { Authorization: auth } });
if (!res.ok) throw new Error(`${res.status} from ${url.pathname}`);
return res.json();
}
const anyOf = (ids) => `[${[...new Set(ids)].join('|')}]`;
const byPosition = (a, b) => a.position - b.position;
const same = (a, b) => String(a) === String(b);
const id = process.argv[2];
const { product } = await ps(`products/${id}`);
// Two aliases per combination: PrestaShop adds the impact, the tax and the reduction.
const { combinations = [] } = await ps('combinations', {
display: 'full',
'filter[id_product]': `[${id}]`,
'price[now][use_tax]': 1,
'price[now][decimals]': 2,
'price[was][use_tax]': 1,
'price[was][use_reduction]': 0,
'price[was][decimals]': 2,
});
if (!combinations.length) throw new Error(`Product ${id} has no combinations`);
const valueIds = combinations.flatMap((c) => c.associations.product_option_values.map((v) => v.id));
const { product_option_values: values } = await ps('product_option_values', {
display: '[id,id_attribute_group,name,position]',
'filter[id]': anyOf(valueIds),
});
const { product_options: groups } = await ps('product_options', {
display: '[id,public_name,position]',
'filter[id]': anyOf(values.map((v) => v.id_attribute_group)),
});
if (groups.length > 3) {
throw new Error(`Product ${id} uses ${groups.length} attribute groups, Shopify allows 3 options`);
}
const { stock_availables: stock = [] } = await ps('stock_availables', {
display: '[id_product_attribute,quantity]',
'filter[id_product]': `[${id}]`,
});
const input = {
title: product.name,
handle: product.link_rewrite,
descriptionHtml: product.description,
status: 'DRAFT',
productOptions: groups.sort(byPosition).map((group, index) => ({
name: group.public_name,
position: index + 1,
values: values
.filter((v) => same(v.id_attribute_group, group.id))
.sort(byPosition)
.map((v) => ({ name: v.name })),
})),
variants: combinations.map((c) => {
const now = Number(c.now);
const was = Number(c.was);
const level = stock.find((s) => same(s.id_product_attribute, c.id));
return {
sku: c.reference || null,
barcodes: c.ean13 ? [{ value: c.ean13 }] : [],
price: now.toFixed(2),
compareAtPrice: was > now ? was.toFixed(2) : null,
optionValues: c.associations.product_option_values.map((ref) => {
const value = values.find((v) => same(v.id, ref.id));
const group = groups.find((g) => same(g.id, value.id_attribute_group));
return { optionName: group.public_name, name: value.name };
}),
inventoryQuantities: [
{ locationId: SHOPIFY_LOCATION_ID, name: 'available', quantity: Number(level?.quantity ?? 0) },
],
};
}),
};
console.log(JSON.stringify({ input }, null, 2));
Set PS_URL, PS_KEY and SHOPIFY_LOCATION_ID (a gid://shopify/Location/... id) in the environment. PS_LANG is the id of the PrestaShop language to export. For a 23.90 base price at 20% VAT with a 20% specific price, the script prints "price": "22.94" and "compareAtPrice": "28.68". A combination with a 2.00 impact comes out at 24.86 and 31.08.
The request relies on several defaults. With no country, group or quantity in the alias, PrestaShop prices for the shop’s default country, the default customer group and a quantity of one, and the webservice never applies customer group reductions. The alias comes back lowercased and the value is a string with six decimal places. Pass decimals yourself, because the fallback is read from PS_PRICE_ROUND_MODE, which is a rounding mode and not a number of decimals.
use_tax has to match the Shopify store. A variant price includes tax only when “Include sales tax in product price and shipping rate” is selected under Settings > Taxes and duties, as Shopify’s tax guide describes. For a UK consumer store, select it and keep use_tax at 1. For a trade store that shows prices before VAT, leave it off and send 0.
The script’s output is the $input variable for productSet:
mutation ImportProduct($input: ProductSetInput!) {
productSet(synchronous: true, input: $input) {
product {
id
handle
variantsCount {
count
}
}
userErrors {
code
field
message
}
}
}
One version note. barcodes is new in 2026-10, where the reference marks the old barcode string as deprecated. On 2026-07 or earlier, send barcode: c.ean13 instead. The product arrives as a draft. The script stops on a product with no combinations, since that case takes its price from the products resource. Our productSet guide covers re-running the import without creating duplicates.
What does not map across?
Shopify allows three options per product and, since October 2025, 2,048 variants. The script throws on a fourth attribute group because the fix is a merchandising decision: merge two groups, split the product, or move a group that affects neither price nor stock into a line item property.
Specific prices are the bigger gap. The specific_prices resource scopes each row by id_group, id_country, id_currency, from_quantity and a from and to date, and the script captures one view of them: one unit, default group, default country, today. A reduction with an end date expires on its own in PrestaShop. The compare-at price you imported does not, so list the dated rows and give someone the job of removing them. Quantity breaks and group prices have to be rebuilt as Shopify discounts or B2B catalogs.
Features travel better. A product’s associations.product_features lists pairs of id and id_feature_value. Resolve them through the product_features and product_feature_values resources and write them as product metafields. Customisation fields (text_fields, uploadable_files) have no catalogue equivalent and become line item properties in the theme.
Which PrestaShop URLs need redirects?
The default product route changed between major versions. From classes/Dispatcher.php:
9.x {id}{-:id_product_attribute}-{rewrite}.html
8.2, 1.7.8 {category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html
A 9.x product lives at /1-hummingbird-printed-t-shirt.html, and an 8.2 shop puts the category in front. The id_product_attribute slot means a combination can have its own path, such as /1-2-hummingbird-printed-t-shirt.html. A shop with more than one language adds a prefix like /en/. Categories default to {id}-{rewrite} and CMS pages to content/{id}-{rewrite}.
Merchants can edit these routes, and an edited one is saved as a configuration value. Check before generating anything:
curl -g -u "$PS_KEY:" "$PS_URL/api/configurations?output_format=JSON&display=[name,value]&filter[name]=[PS_ROUTE_product_rule]"
-g stops curl reading the square brackets as a range. If a row comes back, build your paths from its value and not from the default.
A Shopify redirect maps one path to another, so you need one for the product path and one for each combination path that shows up in the old sitemap, Search Console or analytics. They count towards the limit of 100,000 redirects (20,000,000 on Plus), and a redirect only works from a URL that is otherwise broken. Our migration SEO checklist includes a script that tests every redirect after cutover.
Should you script a PrestaShop to Shopify migration or use an app?
For a few hundred products with flat pricing, we would try one of the PrestaShop migration apps in the Shopify App Store first and check twenty prices by hand afterwards, including everything on sale. We would script it when the shop has specific prices, when a module hooks the price calculation, or when the import has to be re-run several times before cutover.
Whichever route you take, test prices first. Pick ten products, including the one with the largest impact and one on promotion, and compare what will be imported with what the old storefront shows a logged-out visitor.
If most of the revenue depends on separate prices for many customer groups, do not set a migration date until that rebuild has been costed.
We build Shopify stores and migrate existing shops onto Shopify, products, customers and URLs included. Our Shopify development page explains how we work.