konnektive-one 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "konnektive-one",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Konnektive / CheckoutChamp checkout engine \u2014 single-bundle (jQuery + sweetalert2). Load dist/engine.js with a data-config attribute pointing at your OPconfig.js.",
5
5
  "main": "dist/engine.js",
6
6
  "repository": {
package/readme.md CHANGED
@@ -49,10 +49,8 @@ PaymentEngine.init({
49
49
  servicePhone: '1-800-000-0000',
50
50
 
51
51
  // ZIP autofill + country filtering
52
- zipProvider: '', // '' = basic USPS lookup, 'google' = Google Places
53
52
  zipCityPlaceholder: 'City',
54
53
  zipFeedback: false,
55
- zipExtendedDropdown: false,
56
54
  countries: 'US', // 'all' | 'US' | 'US,CA'
57
55
  countriesExcept: '',
58
56
 
@@ -73,10 +71,34 @@ Only the `*_konnektive` ids (`pid_konnektive`, `pid_konnektive_ss`, `campaignID_
73
71
  `vid_konnektive`) are sent to the API. Display fields (`price`, `name`, `terms*`, …) are for
74
72
  your page scripts. `shippingID` is the Konnektive shipping profile.
75
73
 
74
+ ### Other init() keys worth knowing
75
+
76
+ | Key | Default | What it does |
77
+ |---|---|---|
78
+ | `urlPiiTransport` | `'session'` | How customer details cross the shipping → checkout hop. `'session'` parks them in `sessionStorage` and keeps them out of the URL. `'query'` restores the old native GET submit that put name/email/phone/address in the query string — a kill switch, not a feature. |
79
+ | `piiFields` | the `cShip*` / `cEmail` / `cPhone2` set | Fields withheld from the URL. A **denylist**: anything not listed passes through, so unknown affiliate/tracking params survive. Setting it **replaces** the default list — restate the defaults you still want. |
80
+ | `quickLeadOnBlur` | `false` | Two-page funnels only: keep a partial lead fresh on every shipping-field blur. One-page checkouts (`data-onePageCheckout="true"`) already do this. Opt-in because it issues a `/leads/import` per blur. |
81
+ | `pageExtension` | `'.html'` | Extension the engine puts on in-funnel links (`bonus2`, `thankyou`). **Set `''` on hosts that serve extensionless routes** (Cloudflare Workers Assets, Netlify, Vercel), or every navigation eats a redirect. |
82
+ | `passThruParams` | `clickid, msclkid, refd, trk` | Params forwarded past checkout to bonus/thankyou. Also **replaces** wholesale — restate the defaults. |
83
+
76
84
  ## 3. Config-dependent page scripts
77
85
 
78
- Scripts that read `getConfig()` **at load time** must wait for the config. Use
79
- `PaymentEngine.ready` (a Promise that resolves with the config) — keep the
86
+ Scripts that read `getConfig()` **at load time** must wait for the config. There
87
+ are two signals, and picking the wrong one fails silently:
88
+
89
+ | Your script… | Wait on |
90
+ |---|---|
91
+ | only reads `getConfig()` | `PaymentEngine.ready` |
92
+ | also reads a field `render()` builds — `#cBillProductIndex`, `#cShipCountry`, `#cShip*` (package/price summaries, `initTotalBox()`) | `PaymentEngine.rendered` |
93
+
94
+ `ready` resolves as soon as config loads, which is **before** `render()` has
95
+ built those hidden inputs. Using it for the second case gives you an empty form,
96
+ so the script silently falls back to defaults — the classic symptom is a
97
+ checkout summary rendering `$00.00`. When in doubt use `rendered`: it is strictly
98
+ later and settles on tracking pages too. Each has a matching DOM event
99
+ (`konnektive:ready`, `konnektive:rendered`).
100
+
101
+ Use `PaymentEngine.ready` (a Promise that resolves with the config) — keep the
80
102
  dependency visible in the page body:
81
103
 
82
104
  ```html