Back to Documentation
Dropshipping Module

How to Open Dropshipping Products for Sale

Learn to open IHASHOP products for sale, resolve VAT and price blocks, and verify stock and storefront activation.

How to open products for sale?

IHASHOP Dropshipping 1.0.0 opens products for sale by changing sale_state on active links between source and shop. state=active means the link exists; sale_state=open means link sales permission. Store product activation is separate. This guide follows the reviewed source code.

Administrator action

Open Marketplace > Dropshipping Product Publishing (/secure/dropshipping/product-publishing). Select supplier and created or linked product. Review the blocked reason and choose Open sales when eligible. Confirmation states that stock is not written. UrunYayinServisi::satisiAc checks module and Seller gate, locks the active product link FOR UPDATE within a transaction. It evaluates blocked active variant links first, then product link.

Remaining blocked variants prevent opening a blocked product link. Eligible links become open and sale_block_reason clears. Result counts acilan and kalan; partial success is possible. The UI acilabilir check requires all blocks to qualify, so button visibility for partial situations is not guaranteed. Already open links are not rechecked.

Resolve VAT blocks

For vat_unverified, varyantKdvBelli selects the latest price snapshot by observed_at then ID. Both tax_included and vat_verified_at of the snapshot-producing connection must be non-null. Verification of another connection is insufficient. Marking VAT alone may leave snapshot inclusion unknown; successful Apply may be needed. If snapshot inclusion is already known, verifying its connection may suffice.

Product VAT block requires at least one active variant link and no remaining blocked variants. Variantless links remain blocked. Already open variants are not rechecked for VAT. Tax rate is separate.

Price and trash blocks

For margin_violation and price_unverifiable, fiyatBloguAcilabilir evaluates current price and stored cost. Price must meet the floor and be verifiable. However, maliyet_yok is also accepted; do not treat missing cost as safe. Apply suggested price is a separate action. For store_trashed, the relevant shop record must no longer be in trash. Unknown reasons remain blocked.

Each link is evaluated by its recorded reason, not every safety gate. CopTarayici can block open links during Apply for trash or VAT. Trash takes priority; existing reasons remain. Preview only counts. Restoration or verification does not automatically reopen links.

Stock conflicts and takeover

stock_conflict cannot be removed directly by Open sales. External stock changes can stop real stock writing. Take over stock clears the write trace and leaves stock_takeover blocked. A subsequent successful real sync must write zero and establish the trace. A stock_takeover variant can open when core_stock_written is non-null. A later real sync with fresh source may write positive stock.

StokKarari calculates zero target for blocked links, missing source or unknown stock. Open target is max(0, source stock - buffer - reserve). Core stock and ledger mismatch prevents writing. Zero-to-positive requires fresh source. Shadow mode only reports. Open sales does not write stock.

Storefront activation

New shop products start inactive with zero stock. Linking existing products preserves their status and inventory. An open link does not activate the product. Separately check catalog status, category, price, images, descriptions, variants and actual stock. After safe stock writing, activate using authorized catalog operations. For existing active products, a blocked DS link does not guarantee immediate storefront sales prevention.

Review source freshness, cost and VAT; do not rely solely on open status.

GiyimDepom and Luxstoree examples

Illustrative GiyimDepom product has two variant links and one product link blocked for vat_unverified. If connection is verified but tax_included remains null, expect 0 opened and 3 remaining. Successful Apply populating both snapshots, with no other blocks, may allow 3 opened and 0 remaining. Luxstoree example has one variant and one product link blocked for margin_violation. Cost 120 TRY, minimum 0%, price 100 TRY does not qualify.

Catalog price correction to 130 TRY may allow 2 links to open. Verified VAT inclusion is assumed. These are not live products or prices. Other block reasons are separate.

GiyimDepomLuxstoreevat_unverifiedmargin_violation0 / 3100 TRY → 130 TRY3 / 02 / 0

Existing tests and checks

UrunYayinTest expects 0/3 after marking alone, 3/0 after Apply, and 0/0 on repeat. Trash restoration and different snapshot connection ownership are tested. SatisFiyatiTest covers low price refusal and 2/0 after manual 130 TRY correction. CopTarayiciTest covers preservation of existing reasons and no automatic reopening. StokDefteriTest covers external write conflict, takeover and strict opening. Existing tests were not rerun.

Check link state, cost and VAT, actual stock, product activation and storefront purchasability.

Related guides

Frequently asked questions

Does Open sales activate the shop product?

No; it changes DS link sales state only.

Is VAT marking alone sufficient?

No; the relevant snapshot must also contain VAT inclusion.

Can stock conflict reopen directly?

No; controlled takeover and real sync are required.

Does Open sales write stock?

No; stock synchronization is separate.

Are all safety gates rechecked?

No; evaluation follows the recorded block reason.

How to Manage Dropshipping Sales Blocks

Frequently asked about this

No; it changes DS link sales state only.