Merging variants (Baselinker โ WooCommerce)
In many stores each product size lands separately โ a dozen "copies" of the same shirt or trousers instead of one product with a size selector. It looks unprofessional, makes buying harder and clutters the catalog. We built a solution that merges these loose sizes into one clean grouped product, tidies the names and automatically fetches photos from the manufacturer โ with no manual work.
How it works โ step by step
Subiekt โ Baselinker
Stock from the warehouse flows into Baselinker, which is the source of truth for products, stock levels and prices.
Each size separate
The integration moves every size to the store as a separate, "raw" product โ hence the duplicates.
Automatic merging
The system recognizes which items are the same model and merges them into one product with a size selector.
Tidying names
It unifies and cleans the product names โ readable for the customer and correct for SEO.
Manufacturer photos
It automatically finds and attaches the official photos from the manufacturer's site.
A clean grouped product
The store is left with one tidy product with sizes instead of a dozen copies.
What you get
Convenient buying
The customer picks a size within one product instead of wandering through duplicates.
A tidy catalog
No more dozens of copies of the same model โ the store looks professional.
Photos without uploading
The system fetches the official manufacturer photos to the right products on its own.
Zero manual work
Merging, names and photos happen automatically, including for new stock.
Works continuously
Every new delivery is merged and tidied without human involvement.
Better SEO
Readable names and one product instead of duplicates make for a cleaner store for Google.
Details
Where the loose sizes come from
Stock travels from the warehouse software (Subiekt) to Baselinker, and from there to WooCommerce. At this stage each size reaches the store as a separate, simple product โ that is the standard of this integration. Our solution steps in further along: it takes those loose items and organizes them into finished grouped products.
How we recognize what to merge
The system detects which items belong to the same model (by a stable fragment of the name) and recognizes different size formats โ from "waist ร length" in jeans, through letter sizes (M, XL), to ranges (38โ42). As a result it merges exactly what should go together.
Where the photos come from
The product identifier is at the same time the official manufacturer code โ the system uses this to automatically find and fetch the right photos from the manufacturer's site and attach them as the thumbnail and gallery. The product looks complete right away.
Two cooperating engines: one groups the variants, the other fetches the photos. Both are batched and resumable โ they work in portions, staying within the host time limits.
Variant grouping (wc-variant-linker)
Simple products are turned into variable parents. The family key is the stable first token of the name (HEAD) โ a bespoke workaround after the integration started pushing EAN-13 as the SKU and broke grouping by SKU. The engine recognizes 5 size patterns (including "WW LL", "00 XL", "38-42") and works in batches: scan_new detects new simple products, create_variants builds the families.
Photo matching (bs-image-linker)
The 9-digit Baselinker ID is at the same time the official manufacturer SKU (the URL on eu.wrangler.com / eu.lee.com ends with that number). The engine builds a queue (cdn_prepare), fetches photos in batches with a ~60 s time budget and resumption (next_offset), distinguishes "not on the CDN" (placeholder) from a network error and can clear placeholders once the photos appear.