Closed jazaval closed 5 months ago
Worked for me!
Worked for me, too. Thank you!
@ahertel any ETA on this? It would be great to have this in the upstream repository.
@jazaval I just tried this out on a macbook and it mostly worked as expected. After a refresh I happened to be near the laptop for it was displaying a new delivery slot, but for some reason the script didn't trigger any sound or notification of the new slot. Does the script take an additional refresh of the page with the same slot showing to notify the user? Just pointing this out in case it's unintended behaviour due to these prime now support changes.
@nikkiam this is an expected behavior, but only if there's a slot available in the very first loop of the script. This is a side effect of using the restartCheckout
function to obtain the correct merchantID
for the cart, which only happens at the end of the first loop.
This PR:
How:
merchantId
in the slot delivery page URL that is populated once you click "Proceed to checkout" from the generic cart URL at https://primenow.amazon.com/cart.if
statement enablingrestartCheckout
to click the "Proceed to checkout" button, which then sets the variableprime_now_merchant_specific_slot_url
to the custom, merchant-specific URL that contains the available slot listings (example: https://primenow.amazon.com/checkout/enter-checkout?merchantId=A7D2T2JJFZOBQ&ref=pn_sc_ptc_bwr)prime_now_merchant_specific_slot_url
insteadslot_site_url
and the delivery slot parsing works as expected.