Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 3 years ago

E-commerce-sneakers-website HTML CSS JS mobile-first

PhoenixDev22•16,850
@PhoenixDev22
A solution to the E-commerce product page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello community , This my second attempt doing this challenge. As I wasn't happy about how I did this project before. I started doing it from scratch. I had learnt a lot. I had a challenging time with making the shopping cart inner Html using JavaScript . For me, It turned much better from the first try. If you have any suggestions about best practices and any missing things please do leave a feedback. Thanks in advance.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Devmor•470
    @devmor-j
    Posted about 3 years ago

    Hey, great job on completing this challenge. This is a tough one and takes a moderate amount of time to reach perfection.

    overall looks great and one thing I noticed with the cart logic is that user might manually enter a negative value in input element. This logic could cause some problems in the back-end (store or payment system). I suggest maybe wrapping that section inside a form element could be a good solution which enforce user to enter numbers above zero and prevents sending data without criteria met.

    Another thing which affects user experience is that hovering on navigation items (like men, about, ...) must exactly be on the text itself but it would be easier to select if hover effect appears just close enough.

    To be precise I mean you could add padding directly on ul instead of nav. I think converting nav padding style to margin would avoid css break due to refactor.

    Overall I really liked your solution and there are no critical issues in my opinion.

    Keep it up and happy coding :) good luck!

    Marked as helpful
  • Kaung Zin Hein•720
    @K4UNG
    Posted about 3 years ago

    Hey! It looks good! Great job on the challenge. I like the little popup that appears after clicking the checkout button. Here are a few things I noticed:

    • When I add items to cart, instead of reseting the number of items, you should add onto the existing amount. Also when I add item with no amount selected, the modal becomes blank so you should also prevent users from adding 0 items if you decide to keep the current adding method without increasing the amount of items.
    • When I delete the items, the amount indicator doesn't disappear. If I had two items in cart, even if I deleted them, the indicator is there still displaying 2.
    • For the transitions, I think you should make them a little faster. It wouldn't matter too much here but, for bigger projects you should keep your transitions point on to not negatively affect the user experience. For me, I use somewhere around 200ms or less for general transitions.
    • Lastly for the cart modal, instead of moving it from outer screen when clicked, you could move upwards just a little and accompany it with a fade animation. That way you can have a more natural loading animation.

    Great work and Happy Coding!

    Marked as helpful

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub