0

Question

When you link to a product on Ali Express, it just links to the general product page, not the specific product variant (colour, size, etc).

How can one set the URL parameters of an Ali Express product page so the product variant is selected?

Example

This product page links to a product with variants of the following parameters:

{colour, length}

5A USB C to USB Type C Cable...

https://www.aliexpress.com/item/1005002964689678.html

Ali Express item without variant selected

But when you click one of the colour and one of the length variants, the URL doesn't change.

When clicking through to this product page from a Search Result Page (SRP) (3rd result from Ali Express Search: usb+cable, it seems that the important URL parameter that gets set is the pdp_ext_f parameter, as seen here:

5A USB C to USB Type C Cable...: (product variant selected)

https://www.aliexpress.com/item/1005002964689678.html
    ?pdp_ext_f=%7B%22sku_id%22%3A%2212000023061487047%22%7D

Ali Express item with product variant selected

Which, when decoded, shows this value:

pdp_ext_f={"sku_id":"12000023061487047"}

Followup Question

How does one figure out the value of the JSON key sku_id, in the URL parameter: pdp_ext_f, to select a particular product variant on a product page?

1 Answer 1

0

Answer

The easiest way to figure out the sku_id, is to click the "Buy Now" button, and extract it from the URL parameters on that buy page:

Instructions

  1. Open and Ali Express product page, such as:

    5A USB C to USB Type C Cable... (https://www.aliexpress.com/item/1005002964689678.html)

  2. Click the "Buy Now" button (don't worry, it won't actually buy anything)

  3. Extract the skuId parameter value from the resultant page URL

  4. Press Back on your browser to go back to the product page of the item

  5. Clean the Ali Express product page URL by ensuring there are no URL parameters (delete ? and everything after it, which will be after the .html in the URL)

  6. Add the URL parameter and value to the end of the clean product URL by pasting this to the end of the URL, replacing SKU_ID_VALUE with the value extracted earlier:

?pdp_ext_f=%7B"sku_id":"SKU_ID_VALUE"%7D
  1. Press enter to load the modified URL, and notice that the product variant is selected

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.