Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

ECommerce Product Page using JavaScript

@LesleyWesley

Desktop design screenshot for the E-commerce product page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hey guys!

I'm pretty proud of how this project turned out for the most part. I would've liked to make the cart so that after the first time you added to it, any subsequent presses of the "Add to cart" button added to the total, rather than just making the total whatever was in the number input, but I couldn't get the functionality to work right for some reason. As usual, I'm totally open to any suggestions on how to improve!

Community feedback

@Haybuka

Posted

hi,good job.. you could try modellling the result you want,then recreate that using document.createElement (its best to save it as a function so its reusable). This create element will then build your cart data whenever add to cart is clicked. to make validation easy,the data on the product right can be made as a form, that way you can easily validate before you send to cart. I hope you understand, would be better explaining via a voice note i guess... good work thouigh

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord