Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor functions in cart.js #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rdpfeifle
Copy link
Owner

@rdpfeifle rdpfeifle commented Jan 7, 2024

Summary

Refactor functions in cart.js to achieve better organization and a clearer separation between functionality and UI. This will enhance code readability, and maintainability, and potentially uncover opportunities to optimize or simplify the logic.

Acceptance criteria

  • Thoroughly review three key functions: addToCart, updateCartQuantity, and updateProductQty.
  • Refactor, delete, or separate the functionality/UI of these functions as necessary to improve clarity and efficiency.
  • Ensure all console.log() statements used for debugging are removed across the application before merging the pull request.
  • Test the refactored code thoroughly to confirm that the cart functionality remains intact and efficient.
  • Document any significant changes or decisions made during the refactoring process.

Related issue

closes #28

Additions

  • Created a function that formats the numeric price as USD currency.

@rdpfeifle rdpfeifle self-assigned this Jan 7, 2024
Copy link

netlify bot commented Jan 7, 2024

Deploy Preview for vanilla-js-store-f62b9a ready!

Name Link
🔨 Latest commit 8112e94
🔍 Latest deploy log https://app.netlify.com/sites/vanilla-js-store-f62b9a/deploys/659ab08a767c360008ec83ce
😎 Deploy Preview https://deploy-preview-33--vanilla-js-store-f62b9a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Functions in cart.js for Improved Organization
1 participant