Pre-Loaded Shopping Cart for 1 Product Website

I am envisioning pre-loading the shopping cart with with 1 item when the homepage loads.

The homepage also contains a form to collect the user’s shipping address.

The page’s loading focus would surface a blinking cursor in the address field.

The address field would be using a 3rd party address verification tool, such as Smarty US Address Autocomplete.

Is this possible with SnipCart? If so, how?

TIA…

You should be able to achieve this with your own code for the homepage and once the user has entered the address and you have verified the address, use the Snipcart JavaScript API to set the customer info (e.g. the address) and add the product to the cart.

Here you can find info about adding the address to the customer object: Update customer info

Here you can find info about adding a product to the cart:
Add product to cart

If you need more guidance, feel free to ask at any time!

1 Like