OnClick Add To CheckOut Page

general-dev

#1

I need to create a javascript function that will add the products to the cart when the add to cart button is clicked. Here is link to my code: https://codepen.io/surajkay19/project/editor/AobxBO In the bmw5.html there is a button that says add to cart, when I lick on it, i want it to add to the checkout.html with the image showing and price. Please help


#2

I highly recommend using off-the-shelf software for shopping carts. Why make your own when others already did the work for you?

A quick search came up with many options: https://duckduckgo.com/?q=shopping+cart+software&t=ffab&ia=web

A tip: no one here will write your code for you. You'll need to make a serious attempt to research and start writing your code, then we'll be able to help you with your code when you get stuck and ask.


#3

Ah Car models. It's coming around to that time of the year again, huh..

https://www.w3schools.com/html/html5_webstorage.asp have a look at stuffing things into/retrieving things from a sessionStorage, if you need to do it yourself. Otherwise i'd agree with Steven that there are already-made shopping cart systems.


#4

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.