Back to Documentation
Dropshipping Module

How Does the Dropshipping Stock Safety Buffer Work?

Learn IHASHOP Dropshipping stock safety buffer, reserve differences, valid settings and stock calculations.

What is the stock safety buffer?

IHASHOP Dropshipping 1.0.0 subtracts a fixed quantity from reported supplier stock. The safety buffer aims to reduce overselling risk between source changes and store updates. It is not a supplier reservation. This guide follows reviewed b817b5d9 source.

Settings and valid values

golge_tampon is stored per supplier in ds_suppliers.settings. StokYazimAyari::tampon and GolgeStokRaporu use the same acceptance rules. Integers from 0 through 100000 and digit-only strings are accepted. Examples 5, '005' and '100000' are valid. Negative, fractional, whitespace-padded, boolean, null or out-of-range values become 0. Missing settings also become 0. No error or warning is emitted; previous valid value is not retained.

Percentage, product and variant buffers were not found.

Shadow calculation

GolgeStokHesabi calculates S = max(0, K − T). K is stored source stock and T buffer. Reservations are excluded: R_YOK. Missing source, blocked variant link or null stock targets zero. Trash or unreadable core has no calculated target. stats.golge.ayar records buffer and calculation version. Shadow calculation writes no shop stock. Apply can still modify source records and sales blocks. Preview produces no shadow report.

Real stock and reservations

StokYazici reads buffer via StokYazimAyari::tampon and passes it to each active variant link for that supplier. StokKarari calculates S = max(0, K − T − R). R is net order reserve; buffer is fixed policy, reserve comes from actual allocations. DbStokOkuyucu counts pending and qualifying forwarded net allocations. Forwarded reservations may require reconciliation. Buffer does not replace reserve.

Conflict or freshness checks can prevent target writing. stats.stok.ayar records buffer and decision version.

Admin limitations

Marketplace > Dropshipping Suppliers (/secure/dropshipping/tedarikciler) supports enabling real stock and returning to shadow. No independent buffer input, save action or public buffer API was found in reviewed source. Calculation support does not imply admin editing support. Mode switching preserves other settings. Do not edit settings directly via SQL; request authorized configuration or development support.

GiyimDepom and Luxstoree examples

Illustrative GiyimDepom T=5, Luxstoree T=3. Low stock: GiyimDepom K=2 R=1, shadow 0 real 0; Luxstoree K=4 R=2, shadow 1 real 0. Medium: GiyimDepom K=30 R=4, shadow 25 real 21; Luxstoree K=20 R=4, shadow 17 real 13. High: GiyimDepom K=100 R=12, shadow 95 real 83; Luxstoree K=200 R=15, shadow 197 real 182. Open links and other checks passing are assumed. These are not live data or default settings.

GiyimDepomLuxstoree2 − 5 − 1 → 04 − 3 − 2 → 030 − 5 − 4 = 2120 − 3 − 4 = 13100 − 5 − 12 = 83200 − 3 − 15 = 182

Choosing a buffer safely

Consider feed intervals, demand rate, shared supplier inventory and data errors when choosing a buffer. This is operational advice, not an automatic product feature. Large buffers may reduce sales opportunities; zero provides no extra cushion. The same buffer applies per linked variant, not once per total product stock. Incoming null may preserve old stock; buffer cannot guarantee freshness. Conflict preserves external stock.

A zero target does not guarantee a write.

Existing tests

GolgeModTest lines 183–205 expect buffer 2, source 5, target 3 and reported buffer 2. Lines 208–223 check source 2 and buffer 5 yielding zero. StokDefteriTest lines 503–517 expect source 10 minus buffer 2 and reserve 1 to yield 7, and zero for closed gates. Comprehensive invalid-buffer boundary tests were not found; acceptance rules were read directly from code. Tests were not rerun.

Check report settings, actual inventory and sales state.

Related guides

Frequently asked questions

Is buffer a percentage?

No; fixed units.

What is the default?

Zero units.

Does buffer replace reserve?

No; real mode subtracts both.

Can admin edit it?

No editing action was found in reviewed version.

What happens to invalid values?

They are evaluated as zero.

How Do Dropshipping Order Stock Reservations Work?

Frequently asked about this

No; fixed units.