I have created a page where I have images of some items like product1, product2, product3 etc. All the products are configurable products. Below that I have added a custom block for cart. Which contains list of all the above products(there are only 3 products I want to add) (see below)
Product1 $39 x 1 = $39
Product2 $25 x 1 = $25
Product3 $30 x 1 = $30
TOTAL $94
When I click on the image of the product, it will redirect to product, there are some attributes with quantity to select and one add to cart button. Now when I click on Add to Cart button I want the product price and quantity is added to its appropriate place. Suppose I selected product2 and 3 quantity the cart look like
Product1 $0 x 0 = $0
Product2 $25 x 3 = $75
Product3 $0 x 0 = $0
TOTAL $75
I am able to do till redirecting to products, but not able to do the next part that Add to Cart. I want to know the steps and what functions I need to create in which files?