Back to Documentation
Dropshipping Module

How to Link Supplier Products to Existing Store Products

Learn to link supplier products in IHASHOP while preserving catalog content, mapping variants and checking sales safeguards.

How to link supplier products?

IHASHOP Dropshipping 1.0.0 lets administrators link supplier products to existing catalog records without creating new shop products. Product identity and content remain. New product creation is separate. This guide follows the reviewed source code.

Eligible source and store products

UrunYayinServisi::bagla accepts staged, ready or requires_mapping sources with null missing_since and no active link. Category mapping is not required because the existing shop product has its own category. The shop product must not be trashed or actively linked. Active and inactive products are eligible; no status filter applies. A product cannot have two simultaneous active supplier links. Missing or archived sources are ineligible.

Search and select in admin

Open Marketplace > Dropshipping Product Publishing (/secure/dropshipping/product-publishing). Select supplier and candidate, then choose Link to existing product. Search by SKU or name with at least two characters. DbMagazaUrunOkuyucu searches product and variant SKU across the eligible catalog. Name search covers the newest 2000 eligible products. Default results are 20; service maximum is 50.

Percent and underscore are literal, not wildcards. Select a product; changing it clears mappings. Confirm Link. Success shows mapped variant count. Entitlement, Seller role and admin permission are required.

Variant mapping rules

Source variants must belong to the source product and not be missing or archived. Target variants must belong to the selected shop product, not be trashed or actively linked. A target cannot be selected twice. The system does not automatically verify color or size equivalence; administrators must check physical equivalence. Partial mapping is allowed. Leaving a source variant unmapped creates no link.

At least one mapping is required when source variants exist; otherwise ESLESME_BOS. Foreign variants or duplicate targets produce ESLESME_GECERSIZ. A variantless source can link but its product link starts VAT-blocked.

Preserve existing catalog content

The linking transaction inserts only ds_product_links and ds_variant_links and sets ds_supplier_products.state to active. Links record origin matched, state active, decision maker and time. products and product_variants remain unchanged. Price, stock, SKU, name, descriptions, images, category and SEO content are preserved. No content completion is called. This differs from origin created.

Preservation applies to linking itself; later real stock sync or administrator price application can change values. Unmapped shop variants do not automatically lose existing stock or storefront visibility.

VAT and sales safeguards

The latest price snapshot per mapped source variant is selected by observed_at then ID. Non-null tax_included and vat_verified_at of the snapshot-producing connection allow its link to start open; otherwise blocked/vat_unverified. Product link starts open only with at least one mapping and all mapped variant links open. Unmapped source variants are excluded from this aggregate.

This initial check does not guarantee price margin or actual inventory safety. Linking does not zero existing shop stock. VAT block alone does not mean immediate storefront sales prevention. For active products check VAT, prices and inventory separately.

GiyimDepom and Luxstoree examples

Illustrative GiyimDepom source has M and L, existing MAG-GD-01 has M and L. Map both; existing 250 TRY price and stock 3 each remain. Luxstoree source has S and M, existing MAG-LX-02 has only M. Map M, leave S unlinked. Existing 320 TRY price and stock 4 remain. Even an unmapped source category can link to an eligible existing product. Unverified VAT blocks the relevant links.

These are not live products or prices; administrators verify identity and equivalence.

GiyimDepomLuxstoreeMAG-GD-01MAG-LX-02M → M; L → LM → M; S → —250 TRY320 TRY

Transaction safety and tests

Source row is locked FOR UPDATE. A second link to the same source returns ZATEN_BAGLI. Shop eligibility is read without locks; unique ds_plink_magaza_uq and ds_vlink_magaza_uq prevent competing sources from claiming the same target. Unique violation yields YAYIN_CAKISMASI and rollback. This lock does not prevent normal catalog edits.

MevcutUruneBaglaTest covers only three DS tables written, core product/variant JSON equality, partial mapping, empty and foreign mapping rejection, trash, duplicate links, VAT, closed module, Unicode search, older SKU among 2100 filler products and UI flow. Existing tests were not rerun. Verify mappings, sales blocks and actual stock separately.

Related guides

Frequently asked questions

Is category mapping required?

No; existing product linking is separate.

Do price and inventory change?

Not during linking; later actions are separate.

Must all variants be mapped?

No; at least one is required if source variants exist.

Can one product have two suppliers?

Not two simultaneous active links.

Does a VAT block immediately zero shop stock?

No; linking does not write core inventory.

How to Open Dropshipping Products for Sale

Frequently asked about this

No; existing product linking is separate.