Code Monkey home page Code Monkey logo

book-heaven-pp5's Introduction

πŸ’« About Me:

I have a deep passion for both cars and programming.

Code never lies, comments sometimes do

πŸ’» Tech Stack:

CSS3 HTML5 JavaScript Markdown Python Heroku AWS Bootstrap jQuery Django GitHub Flask MySQL Adobe Photoshop GIT

πŸ“Š GitHub Stats:



πŸ† GitHub Trophies


book-heaven-pp5's People

Watchers

 avatar

book-heaven-pp5's Issues

USER STORY: Checkout functionality MS4

As a User I want to be able to complete the checkout process for my shopping cart so that I can purchase the items I've added to my cart

Acceptance Criteria:

  • Given I'm on the checkout page, when I review my cart contents, then I should see a summary of items in my cart, including their names, quantities, prices, and total cost.
  • Given I need to provide my delivery and billing information, when I enter this information, then I should see fields for full name, email, phone number and shipping address
  • Given my order total meets or exceeds the "FREE DELIVERY" threshold, when the delivery cost is calculated, then it should be displayed as €0.

Tasks:

  • Create checkout app and order models.
  • Create a checkout page that displays cart's content
  • Implement a form to collect and validate user's billing and delivery information
  • Implement the logic to determine the delivery cost based on the amount spent.
  • Implement the logic to calculate the order total.

USER STORY: Stripe integration MS4

As a user, I want to be able to securely make payments using Stripe so that I can complete my purchases on BookHeaven with confidence.

Acceptance Criteria

  • Given I am a logged-in user and I have added products to my cart, When I proceed to the checkout process, Then I should be presented with the option to enter my payment information, including credit card details.
  • Given I am a logged-in user and I have entered valid payment information, When I complete the checkout process, Then my payment should be securely processed through Stripe, and I should receive a confirmation of my order.
  • Given I am a logged-in user and I have entered invalid payment information, When I attempt to complete the checkout, Then I should see error messages indicating that my payment details are invalid or incomplete.
  • Given I am a logged-in user, When I complete the checkout process, Then I should be able to view the order confirmation with details of the products I've purchased and the total amount paid.

Tasks:

  • Sign up for a Stripe account and obtain the necessary API keys.
  • Integrate the Stripe payment processing library into the BookHeaven project.
  • Design and implement the frontend template for the checkout page, including a form for entering payment information.
  • Implement the logic to securely handle and process payments through Stripe when the user completes the checkout.
  • Implement error handling for invalid payment information, displaying relevant error messages.
  • Design and implement the order confirmation page or notification, displaying order details and a confirmation message.

BUG: Discount code case sensitivity

Bug Description
The bug allows the creation of identical code due to case sensitivity. The code is considered unique and is then added to the database. When the code is applied the application returns 2 results and breaks the application

Steps To Reproduce
Go to Django admin or admin panel on front end. Create a code with the name test. Create another code with the name TEST. Add item into the cart and apply discount test on checkout. The application returns an error.

MultipleObjectsReturned at /cart/add_discount/

Solution

USER STORY: Submit testimonial MS6

As a user, I want to be able to submit a testimonial about my overall experience with the website so that I can provide feedback and share my positive experiences on BookHeaven.

Acceptance Criteria

  • Given I am a user visiting the website, When I navigate to the "Submit Testimonial" page or section, Then I should see a testimonial submission form.
  • Given I am a user and I access the testimonial submission form, When I fill in the required fields, including my name, email (optional), and my testimonial, Then I should be able to submit the form.
  • Given I am a user and I successfully submit a testimonial, When I complete the submission process, Then I should receive a confirmation message, and my testimonial should be recorded for display on the website.

Tasks:

  • Design and implement the "Submit Testimonial" page or section on the website, featuring a testimonial submission form.
  • Create a form with fields for the user's name, email (optional), and their testimonial.
  • Create a database model for storing testimonials, including the user's name, email, testimonial, and a timestamp.
  • Implement the logic to record and store user testimonials upon successful submission.
  • Design and implement the "Testimonials" page or section, displaying user testimonials.

DEV TASK: Complete Documentation MS8

Describe Task
Complete Documentation

Tasks:
Add the following sections to readme:

  • Overview
  • Project Goals
  • UX
  • The Strategy Plane
  • The Ideal User
  • Site Goals
  • Agile Planning
  • Epics
  • User Stories
  • The Skeleton Plane
  • Wireframes
  • Database Schema
  • The Scope Plane
  • The Structure Plane
  • The Surface Plane
  • Features
  • Future Features
  • Design
  • Colour Scheme
  • Typography
  • Imagery
  • Technologies Used
  • Languages Used
  • Frameworks and Tools Used
  • Libraries Used
  • Testing
  • Deployment
  • Credits
  • Acknowledgements

USER STORY: Remove products MS5

As an administrator, I want to be able to remove products from the website so that I can manage the product catalog on BookHeaven.

Acceptance Criteria

  • Given I am an administrator, When I log in to the admin dashboard, Then I should have access to a dedicated "Remove Product" page or section.
  • Given I am an administrator and I access the "Remove Product" page, When I select a product from the list of available products and confirm the removal action, Then the selected product should be removed from the product catalog.
  • Given I am an administrator and I remove a product, When I complete the removal process, Then I should see a confirmation message indicating that the product has been successfully removed from the catalog.
  • Given I am an administrator and I remove a product, When I navigate to the product listing page, Then I should verify that the removed product is no longer listed.

Tasks:

  • Design and implement the "Remove Product" page or section in the admin dashboard.
  • Create a list of available products for administrators to choose from.
  • Implement the logic to confirm and execute the removal of the selected product from the product catalog.
  • Implement a confirmation message or notification upon successful product removal.

USER STORY: Add product to cart MS4

As a user, I want to be able to add products to my shopping cart so that I can conveniently review and purchase multiple items at once on BookHeaven.

Acceptance Criteria

  • Given I am a logged-in user, When I browse the list of products on the website, Then I should see an "Add to Cart" button or link next to each product.
  • Given I am a logged-in user and I click on the "Add to Cart" button or link for a product, When I do so, Then the product should be added to my shopping cart and I should see a success message.
  • Given I am a logged-in user and I have added products to my cart, When I navigate to the "My Cart" page or section, Then I should be able to view the list of products I have added along with their quantities.

Tasks:

  • Design and implement the frontend template for the product listing, including an "Add to Cart" button or link.
  • Implement the logic to add products to the user's shopping cart when they click "Add to Cart."
  • Implement django messages to provide feedback to the user when an item is added to cart.
  • Design and implement the frontend template for the "My Cart" page or section.
  • Implement the logic to display the user's shopping cart on the "My Cart" page.

USER STORY: Pagination MS2

As a User I want to be able to browse through a large list of products in the bookshop so that I can view all books in an organised way

Acceptance Criteria:

  • Given I am on the bookshop's homepage or a products page with a large number of products, When I scroll down to the bottom of the page or click a page navigation link, Then I should be able to view the next page of products.

  • Given I am on a page with multiple pages of products, When I click on a specific page number or use navigation links (e.g., "Next" and "Previous"), Then I should be directed to the corresponding page displaying a different set of products.

Tasks:

  • Set up the backend logic to retrieve products from the database and paginate them based on the page size.
  • Design and implement the frontend pagination control, including buttons for navigating to the next, previous, and specific page numbers.
  • Implement backend logic to handle user interactions with the pagination control and display the corresponding products based on the selected page.
  • Ensure that the pagination control is displayed at the bottom of the products page, providing a user-friendly navigation experience.
  • Disable the next page button in the pagination control when the user is on the last page of products.
  • Disable the previous page button in the pagination control when the user is on the first page of products.

USER STORY: Apply discount codes MS4

As a user, I want to be able to apply discount codes to my orders so that I can enjoy savings and discounts on my purchases at BookHeaven.

Acceptance Criteria

  • Given I am a logged-in user and I have added products to my cart, When I navigate to the "My Cart" page or section, Then I should see a field where I can enter a discount code.
  • Given I am a logged-in user and I have added products to my cart, When I enter a valid discount code in the field and apply it, Then the cart total should be updated to reflect the discount, and the discount amount should be clearly displayed.
  • Given I am a logged-in user and I have applied a discount code to my cart, When I complete the checkout process, Then the applied discount should be reflected in the final order price.
  • Given I am a logged-in user and I have applied a discount code to my cart, When I enter an invalid or expired discount code, Then I should see an error message indicating that the code is not valid or has expired.

Tasks:

  • Design and implement the frontend template for the "My Cart" page, including a field for entering discount codes.
  • Implement the logic to display the user's shopping cart on the "My Cart" page, including the discount code field.
  • Create a database model for discount codes, including fields for code, discount amount, and expiration date(optional).
  • Implement the logic to validate and apply discount codes to the cart total.
  • Display the applied discount and the updated cart total in the cart view.
  • Implement the logic to update the final order price with the applied discount during the checkout process.
  • Implement error handling for invalid or expired discount codes, displaying relevant error messages.

USER STORY: View/ Edit My Profile MS3

As a registered user I want to be able to see my profile page so that I can update my information

Acceptance Criteria:

  • Given I am a registered user, When I log in to my account, Then I should be able to access my profile page.
  • Given I am a registered user and I am on my profile page, Then I should see my personal information such as username, email, and address.
  • Given I am a registered user and I am on my profile page, When I update my information through the profile page, Then the changes should be saved and reflected on my profile.
  • Given I am a registered user and I am on my profile page, When I click on the "Edit Profile" button, Then I should be able to edit my information.
    -- Given I am a registered user and I edit my information on the profile page, When I submit the updated information, Then the changes should be saved and applied to my profile, and I should receive a confirmation message.

Tasks:

  • Define the url for the profile page
  • Create the view that renders the profile page.
  • Create the option to edit the profile details.
  • Create the view that handles the edit form.
  • Ensure there is an edit button on the profile page.

USER STORY: Adjust product quantity MS4

As a user, I want to be able to adjust the quantity of products in my shopping cart so that I can control the quantity of items I want to purchase on BookHeaven.

Acceptance Criteria

  • Given I am a logged-in user and I have added products to my cart, When I navigate to the "My Cart" page or section, Then I should be able to view the list of products I have added along with the ability to increase or decrease the quantity for each product.
  • Given I am a logged-in user and I have added products to my cart, When I increase or decrease the quantity of a product, Then the total cart price should update accordingly based on the adjusted quantities.

Tasks:

  • Design and implement the frontend template for the "My Cart" page, including quantity adjustment options for each product.
  • Implement the logic to display the user's shopping cart on the "My Cart" page, including the quantity adjustment feature.
  • Design and implement the quantity adjustment interface, including buttons or input fields for increasing and decreasing quantities.
  • Implement the logic to update the cart's total price when product quantities are adjusted.

BUG: Items can be added to cart even when they exceed the stock levels

Bug Description
If item has 5 units in stock, the user can add 5 units two times and have 10 in their cart which exceeds to available amount. Solution must be implemented either when adding items to cart or when proceeding to checkout

Steps To Reproduce
Add items to cart multiple times with stock levels within the range until it adds up above the current stock levels

Solution

BUG: Error on checkout if the item's quantity has been updated

Bug Description
During testing the checkout functionality, it was noted that if the item in the cart has been updated with new quantity then after submitting the payment form an error occurs 'can't multiply sequence by non-int of type 'decimal.Decimal'

Steps To Reproduce
Add item to cart and follow the checkout steps. After form submission the success page appears. Add another item to cart and update quantity. Follow the checkout steps. After submission error page appears.

Solution
The issue was in the checkout/views.py checkout view. item_quantity was not an integer and that was causing the issue.

USER STORY: Add products MS5

As an administrator, I want to be able to add new products to the website so that I can expand the product catalog on BookHeaven.

Acceptance Criteria

  • Given I am an administrator, When I log in to the admin dashboard, Then I should have access to a dedicated "Add Product" page or section.
  • Given I am an administrator and I access the "Add Product" page, When I fill out the required product information, including title, description, price, and other details, Then the new product should be created and added to the product catalog.
  • Given I am an administrator and I add a new product, When I complete the product addition process, Then I should see a confirmation message indicating that the product has been successfully added to the catalog.
  • Given I am an administrator and I add a new product, When I navigate to the product listing page, Then I should be able to view and verify the presence of the newly added product.

Tasks:

  • Design and implement the "Add Product" page or section in the admin dashboard.
  • Create a form for administrators to enter product information, including title, description, price, and other details.
  • Implement server-side validation to ensure the accuracy and completeness of product information.
  • Implement the logic to create and save new products to the product catalog.
  • Implement a confirmation message or notification upon successful product addition.

BUG: Genre doesn't display correctly on all products page

Bug Description
When products are refined by genre the name of the genre does not display the friendly name on the top of the page

Steps To Reproduce
Open the products page and refine by genre. Observe the genre name at the top of the page

Solution
In the all products template replace the genre name with friendly name

BUG: Total was calculated as integer

Bug Description
When adding items to cart the total was calculated as integer.

Steps To Reproduce
Add items to cart and observe the cart total

Solution
Fix the calculation of the total price in contexts.py by removing int() before book.product_price

USER STORY: Edit products MS5

As an administrator, I want to be able to edit existing products on the website so that I can update and manage the product catalog on BookHeaven.

Acceptance Criteria

  • Given I am an administrator, When I log in to the admin dashboard, Then I should have access to a dedicated "Edit Product" page or section.
  • Given I am an administrator and I access the "Edit Product" page, When I select a product from the list of available products, Then I should see a form pre-filled with the existing product information, including title, description, price, and other details.
  • Given I am an administrator and I edit an existing product, When I modify the product information and save the changes, Then the product details should be updated in the product catalog.
  • Given I am an administrator and I edit an existing product, When I complete the editing process, Then I should see a confirmation message indicating that the changes have been successfully saved.
  • Given I am an administrator and I edit an existing product, When I navigate to the product listing page, Then I should verify that the edited product displays the updated information.

Tasks:

  • Design and implement the "Edit Product" page or section in the admin dashboard.
  • Create a list of available products for administrators to choose from.
  • Implement the logic to pre-fill a form with the existing product information.
  • Implement server-side validation to ensure the new form is valid.
  • Implement the logic to save and update product details.
  • Implement a confirmation message or notification upon successful product editing.

USER STORY: Product's author view MS2

As a User I want to be able to view detailed information about a product's author, including their name, a short biography, and a list of books available for sale on the website so that I can learn more about the author and explore their other works.

Acceptance Criteria:

  • Given I am on the bookshop's homepage or a product detail page, When I click on the name of the product's author, Then I should be directed to an "Author Profile" page.

  • Given I am on the "Author Profile" page, When I view the page, Then I should see the following information about the author:

  1. The author's name
  2. A short biography or description of the author
  3. A list of books by the author that are available for sale on the website
  4. For each book in the list, display the book's title, cover image, and price
  • Given I am on the "Author Profile" page, When I click on the title or image of a book by the author, Then I should be directed to the "Single Product View" page for that book, where I can view more details and potentially make a purchase.

  • Given I am on the "Author Profile" page, When I click on the "Go Back" button, Then I should be directed back to the previous page (e.g., the product detail page or the homepage).

Tasks:

  • Create a Django view for displaying an author's profile.
  • Define a model for authors in your Django project, including fields for the author's name and biography.
  • Update the product model to include a foreign key relationship with the author model to associate products with their respective authors.
  • Implement URL routing for the "Author Profile" page.
  • Create a template for displaying author profiles with the necessary information (name, biography, list of books).
  • Retrieve and display the list of books by the author on the author profile page.
  • Add links to navigate to the "Single Product View" for each book in the list.
  • Implement a "Go Back" button to allow users to navigate back to the previous page.

USER STORY: Mailchimp Newsletter MS7

As a user, I want to sign up for newsletters on the website so that I can keep up with updates and deals.

Acceptance Criteria

  • Given I am a user, When I visit the website, Then I should see a clear and accessible option to subscribe to newsletters on the homepage or footer.
  • Given I am a user, When I submit the subscribe form with my email, Then I should see confirmation message.

Tasks:

  • Create an account on Mailchimp website.
  • Copy the code for the form into the footer
  • Test that the form works correctly

USER STORY: Home page MS1

As a user I can visit the home page so that I can identify the purpose of the website

Acceptance Criteria:

  • Given that I visit the website, When I access the home page, Then I expect it to be visually appealing and easy to navigate
  • Given that I visit the website on a mobile device, When I navigate to the home page, Then I expect it to be responsive and adapt to different screen sizes.
  • Given that I visit the website, When I access the home page, Then I expect to be able to view products listed for sale

Tasks:

  • Create appealing hero section, which is responsive on all devices
  • Create cards to display products on the home page

USER STORY: Product review MS2

As a an authenticated user I want to be able to add a review for a book product so that I can share my feedback and experiences with other potential buyers

Acceptance Criteria:

  • Given I am a logged-in customer, When I am viewing a product's detail page, Then I should see a section where I can add a review.
  • Given I am viewing the product's detail page and the review section, When I provide the following information for my review:
  1. A title for my review
  2. A rating (e.g., on a scale of 1 to 5 stars)
  3. The text of my review

And I submit my review, Then my review should be added to the list of reviews for that product.

  • Given I am viewing the product's detail page, When I submit an empty review form, Then I should see an error message indicating that the review cannot be empty, and my review should not be added.

  • Given I am viewing the product's detail page and have submitted a review, When I view the list of reviews for that product, Then I should see my review in the list along with my username (or a display name) and the date of submission.

Tasks:

  • Create a Django model for product reviews, including fields for title, rating, text, and a foreign key relationship to the product.
  • Implement authentication to ensure only logged-in users can submit reviews.
  • Create a form for users to submit reviews, including fields for title, rating, and text.
  • Add a section for displaying product reviews on the product detail page.
  • Implement form validation to ensure that required fields are filled out.
  • Write a view function to handle the submission of reviews, validate user input, and save reviews to the database.
  • Display reviews on the product detail page, including the reviewer's username or display name and the review date.

USER STORY: Sort products by name and price

As a user I want to be able to sort the list of available products by name and price so that I can easily find books that match my interests

Acceptance Criteria:

  • Given I am on the bookshop's "All Products" page, When I navigate to a product sort dropdown menu, Then I should see a list of available sorting options to choose from.
  • Given I am on the bookshop's "All Products" page, When I select a specific sorting option from the list, Then the list of displayed products should be filtered to include only products that belong to the selected sorting category.

Tasks:

  • Create a sorting dropdown menu on the "All Products" page.
  • Add options for sorting by name and price in the dropdown.
  • Create back-end logic to handle sorting products by name and price.
  • Implement sorting based on the user's selected sorting option.

USER STORY: Search Products MS2

As a User I want to be able to search for products in the bookshop by entering keywords so that I can quickly find specific books or topics of interest

Acceptance Criteria:

  • Given I am on the bookshop's homepage or any product listing page, When I enter keywords or phrases into a search input field and click the "Search" button, Then I should be directed to a search results page displaying a list of products that match the search query.

  • Given I am on the search results page, When I view the page, Then I should see a list of products that match the search query, including:

  1. The book's title
  2. The book's author
  3. The book's cover image
  4. The book's price
  • Given I am on the search results page, When I click on a product from the search results, Then I should be directed to the "Single Product View" page for that book, where I can view more details and potentially make a purchase.

  • Given I am on the search results page, When I enter a search query that yields no results, Then I should see a message indicating that there are no products matching the search query.

Tasks:

  • 1. Create a Django view for handling product searches.
  • 2. Define a search input field and a search button in the project's templates.
  • 3. Implement URL routing for the search results page.
  • 4. Write a view function that retrieves and displays products matching the search query.
  • 5. Create a template for displaying search results, including product details.
  • 6. Add links to navigate to the "Single Product View" for each book in the search results.
  • 7. Implement handling for cases where the search query yields no results, displaying a relevant message.

USER STORY: User Password Reset MS3

As a registered user I want to be able to reset my password so that I can regain access to my account in case I forget my password

Acceptance Criteria

  • Given I am a registered user, When I am on the login page, Then I should see a "Forgot Password" link.
  • Given I am a registered user and I click on the "Forgot Password" link, When I am redirected to the password reset page, Then I should see a form where I can enter my email address to initiate the password reset process.
  • Given I am a registered user and I enter my email address on the password reset page, When I submit the form, Then I should receive an email with instructions on how to reset my password.
  • Given I am a registered user and I enter a new password on the password reset page, When I submit the form, Then my password should be successfully reset, and I should receive a confirmation message.

Tasks

  • Implement forgot password link on the login page.
  • Create url for reset password, email sent, enter new password and password changed successfully
  • Create templates for reset password, email sent, enter new password and password changed successfully

USER STORY: User account registration MS3

As a user I want to be able to register an account so that I can have access to all functionality of BookHeaven.

Acceptance Criteria

  • Given I am an unregistered user, When I visit the website, Then I should see a prominent "Sign Up" button on the navigation menu.
  • Given I am an unregistered user and I click on the "Register" or "Sign Up" button, When I am redirected to the registration page, Then I should see a form with fields to enter my desired username, email address, and password.
  • Given I am an unregistered user and I fill in the registration form with valid information, When I submit the form, Then I should be redirected to a "Registration Successful" page
  • Given I am a registered user, When I log in with my credentials, Then I should have access to all the functionalities of BookHeaven, such as saving books to my Wishlist and viewing my past orders.

Tasks:

  • Design and implement the frontend template for the navigation menu, including a "Sign Up" button.
  • Install and configure django-allauth
  • Create a registration form template provided by django-allauth for user account registration.
  • Implement URL routing to direct users to the registration page.
  • Configure email confirmation and account activation settings provided by django-allauth.
  • Design and implement the frontend template for the "Registration Successful" page or notification.

USER STORY: Edit my reviews

As a an authenticated user I want to be able to edit my reviews for a book product so that I can manage and maintain the accuracy and relevance of my feedback

Acceptance Criteria:

  • Given I am a logged-in user, When I am viewing a product's review section, Then I should see my reviews with an option to edit the review.
  • Given I am viewing a product's review section, When I click on the edit button, Then I should be redirected to a page to edit my review.
  • Given I am on the edit review page, When I edit my review, Then I should see a button to submit my updated review.
  • Given I am on the edit review page, When I submit my updated review, Then I should see a clear message indicating if the action was successful.

Tasks:

  • Create a template to render the edit review form.
  • Create a view to display the edit view page and handle the submission of the form.
  • Redirect the user to the product page while displaying clear message on the success or fail of the action.

USER STORY: Admin dashboard MS5

As an administrator, I want to have access to an admin dashboard so that I can monitor and view simple statistics related to the orders made on BookHeaven.

Acceptance Criteria

  • Given I am an administrator and I log in , When I access the dashboard, Then I should be able to view a summary of statistics related to the orders made on BookHeaven, including the total number of orders and total revenue.
  • Given I am an administrator and I log in to the admin dashboard, When I access the dashboard, Then I should be presented with clear and visually pleasing data representations, such as charts or graphs, to help me quickly understand order trends.

Tasks:

  • Design and implement the admin dashboard, displaying order statistics, including the total number of orders and total revenue.
  • Implement data visualization tools to present order statistics graphically, such as charts or graphs.
  • Secure the admin dashboard to ensure that only authorized administrators can access it.

USER STORY: Connect database and media storage MS1

As a developer I can connect database and media storage so that the user's stored data is stored successfully

Tasks:

  • install required packages
  • Configure Django's settings to connect to database.
  • Configure setting for ElephantSQL
  • Configure settings for static files
  • Configure AWS settings
  • Configure Django's settings to connect to AWS.
  • Create superuser and run migrations.
  • Test database and media storage (test model may be required)

USER STORY: Remove product from cart MS4

As a user, I want to be able to remove products from my shopping cart so that I can adjust my order before making a purchase on BookHeaven.

Acceptance Criteria

  • Given I am a logged-in user and I have added products to my cart, When I navigate to the "My Cart" page or section, Then I should be able to view the list of products I have added along with a "Remove" button for each product.
  • Given I am a logged-in user and I have added products to my cart, When I click on the "Remove" button for a product, Then the product should be removed from my cart.
  • Given I am a logged-in user and I have removed a product from my cart, When I return to the "My Cart" page, Then the product should no longer appear in the list of items, and the total cart price should update accordingly.
  • Given I am a logged-in user and I have removed a product from my cart, When I visit a product's detail page, Then I should see an "Add to Cart" button or link, allowing me to add the product back to my cart if desired.

Tasks:

  • Design and implement the frontend template for the "My Cart" page, including a "Remove" button for each product.
  • Implement the logic to display the user's shopping cart on the "My Cart" page.
  • Design and implement the "Remove" button for each product in the shopping cart.
  • Implement the logic to remove products from the user's cart when they click "Remove."
  • Implement the logic to update the cart's total price when products are removed.

BUG: Pagination URL

Bug Description
When using the pagination, every time a page number is added to the url.

Steps To Reproduce
Open page with products with pagination. Change pages and observe the url

Solution
Refactor the html code to ensure the link is replaced and not added to when a page is changed

USER STORY: Single product view MS2

As a user I want to be able to view detailed information about a single product so that I can make an informed decision before purchasing

Acceptance Criteria:

  • Given I am on the bookshop's homepage or "All Products" page, When I click on a product's title or image, Then I should be redirected to a "Single Product View" page.

  • Given I am on the "Single Product View" page, When I view the page, Then I should see detailed information about the selected product, including:

  1. The book's title
  2. The book's author
  3. The book's cover image
  4. The book's price
  5. A brief description of the book's content
  6. Options for selecting the quantity to purchase
  7. An "Add to Cart" button
  • Given I am on the "Single Product View" page, When I click on the "Go Back" button, Then I should be directed back to the previous page (e.g., the "All Products" page or the homepage).

Tasks:

  • Create a Django view for displaying a single product's details.
  • Create a template for the "Single Product View" to render the product's information.
  • Implement URL routing for the "Single Product View" page.
  • Ensure that clicking on a product's title or image from the homepage or "All Products" page redirects to the "Single Product View."
  • Include the necessary product information (title, author, cover image, price, description) in the product detail template.
  • Implement a "Go Back" button to allow users to navigate back to the previous page.

USER STORY: Refine products by category

As a user I want to be able to ** refine the list of available products by selecting a specific category** so that I can easily find books that match my interests

Acceptance Criteria:

  • Given I am on the bookshop's homepage or "All Products" page, When I navigate to a product category section or dropdown menu, Then I should see a list of available product categories to choose from.

  • Given I am on the bookshop's homepage or "All Products" page, When I select a specific category from the list, Then the list of displayed products should be filtered to include only products that belong to the selected category.

  • Given I am on the bookshop's homepage or "All Products" page, When I select a category that has no associated products, Then I should see a message indicating that there are no products in the selected category.

  • Given I am on the bookshop's homepage or "All Products" page, When I select a category, Then I should have the option to clear the category filter and view all products again.

Tasks:

  • Define the product category model in the Django project.
  • Populate the database with various product categories (e.g., Fiction, Non-fiction, Mystery, Science Fiction, Romance, etc.).
  • Add a product category field to the product model to associate each product with a category.
  • Update the product views to filter products based on the selected category.
  • Create a template for displaying the list of available product categories.
  • Implement a dropdown menu for selecting product categories on the homepage or "All Products" page.

USER STORY: View other user’s testimonials MS6

As a user, I want to be able to view testimonials submitted by other users so that I can read about the experiences and feedback of fellow users on BookHeaven.

Acceptance Criteria

  • Given I am a user visiting the website, When I navigate to the "Testimonials" page or section, Then I should see a collection of testimonials submitted by other users.
  • Given I am a user on the "Testimonials" page or section, When I read the testimonials, Then I should see the user's name, their testimonial, and the date of submission displayed clearly.

Tasks:

  • Design and implement the "Testimonials" page or section on the website to display a collection of user-submitted testimonials.
  • Create a layout that presents user testimonials with their names, the testimonial content, and submission dates.
  • Ensure the "Testimonials" page or section is accessible to all users and provides a smooth reading experience.
  • Populate the "Testimonials" page with sample testimonials for initial presentation and testing.

USER STORY: Navigation MS1

As a User I can navigate through the website so that I can access different sections efficiently

Acceptance Criteria:

  • Given that I am on the website, When I access the navigation bar, Then I expect it to be prominently displayed at the top of the webpage.
  • Given that I click on any link in the navigation bar, When I click the link, Then I am promptly redirected to the corresponding page without any delays or errors.
  • Given that I access the website from different devices, When I view the navigation bar, Then I can effortlessly navigate through it, as the navigation bar is designed to be responsive

Tasks:

  • Design the navigation bar
  • Ensure the navigation bar is fully responsive
  • Ensure all links in the navigation bar redirect to the correct page.

USER STORY: Initial Django Setup MS1

As a developer I can setup a new Django project so that I can create the project's structure

Tasks:

  • Install Django through the package manager
  • Create new project with the name Book Heaven
  • Create the first app and add it to settings.py
  • Create env.py file to hide the secret keys
  • Add env.py to .gitignore so that the secret keys stay private

USER STORY: Initial deployment MS1

As a developer I can deploy the application early so that I can confirm that the initial setup is working and can continue testing the application during development

Tasks:

  • Create new app on Heroku
  • Add all secret keys to config vars
  • Create requirements.txt file
  • Create Procfile
  • Deploy to Heroku and test if the application runs with no errors

USER STORY: User Login MS3

As a user, I want to be able to log in to my account so that I can access my personalized features and make purchases on BookHeaven.

Acceptance Criteria

  • Given I am a registered user, When I visit the website, Then I should see a "Log In" button on the navigation menu.
  • Given I am a registered user and I click on the "Log In" button, When I am redirected to the login page, Then I should see a form with fields to enter my username or email address and password.
  • Given I am a registered user and I enter valid login credentials, When I submit the login form, Then I should be successfully logged in to my account and redirected to my profile page or the landing page.
  • Given I am a registered user and I enter invalid login credentials, When I submit the login form, Then I should receive an appropriate error message indicating that the login attempt was unsuccessful.
  • Given I am a logged-in user, When I navigate to the website, Then I should have access to all my personalized features, such as viewing my Wishlist and order history.
  • Given I am a registered user When I am logged in, Then I should see logout button in the navbar instead of Login

Tasks:

  • Design and implement the frontend template for the navigation menu, including a "Log In" button.
  • Create a login form template for user authentication.
  • Implement URL routing to direct users to the login page.
  • Design and implement the frontend template for the "Login Successful" page or notification.
  • Test the login process to verify that users can successfully log in with valid credentials.

USER STORY: Delete my reviews

As a an authenticated user I want to be able to delete my reviews for a book product so that I can manage and maintain the accuracy and relevance of my feedback

Acceptance Criteria:

  • Given I am a logged-in user, When I am viewing a product's review section, Then I should see my reviews with an option to delete the review.
  • Given I am viewing a product's review section, When I click on the delete button, Then I should see my review being deleted with a clear message.

Tasks:

  • Create a form with delete button, visible to super users and users who created the review in the template
  • Create the view to handle the process of deleting a review.
  • Display clear feedback message to the user based on the success or fail of the action.

USER STORY: SEO Implementation MS7

As a website owner, I want to improve the website's search engine optimization (SEO) so that the website can rank higher in search engine results and attract more organic traffic.

Acceptance Criteria

  • Given I am the website owner, When I optimize the website's meta tags, including title tags and meta descriptions, Then I should ensure they are relevant, unique, and compelling for each page.
  • Given I am the website owner, When I research and select relevant keywords for the website's content, Then I should strategically incorporate these keywords into the content, headings, and image alt text.
  • Given I am the website owner, When I create and implement a robots.txt file, Then I should ensure that the website's pages are accurately controlled for crawling and indexing by search engines based on the directives in the robots.txt file.

Tasks:

  • Optimize meta tags, including title tags and meta descriptions, for each page.
  • Conduct keyword research and strategically incorporate keywords into the website's content and structure.
  • Optimize images and ensure efficient code for improved page loading speed.
  • Create and implement a robots.txt file with specific directives to control search engine crawling and indexing of the website's pages accurately.

BUG: When item is not on sale anymore the sale price is displayed

Bug Description
When a book is on sale, the new price is displayed to the user. However, if the admin changes the on_sale to False then the book still has the on sale price

Steps To Reproduce
Add a book and list it on sale with sale price. Observe the price displayed to the user (the new price). Change the on_sale field to False. Observe the price displayed to the user, result - the new price.

Solution
Add to the save method in the Product model condition if the book is not on sale to change the sale price to 0.

USER STORY: Edit stock levels MS5

As an administrator, I want to be able to edit the stock levels of products so that I can manage inventory and ensure product availability on BookHeaven.

Acceptance Criteria

  • Given I am an administrator, When I log in to the admin dashboard, Then I should have access to a dedicated "Edit Product" page or section for editing product details, including the stock level.
  • Given I am an administrator and I access the "Edit Product" page, When I select a product from the list of available products and modify the stock level within the edit form, Then the stock level of the product should be updated in the product catalog.
  • Given I am an administrator and I edit the stock level of a product within the edit form, When I save the changes, Then I should see a confirmation message indicating that the changes have been successfully saved.
  • Given I am an administrator and I edit the stock level of a product within the edit form, When I navigate to the product listing page, Then I should verify that the edited stock level is displayed correctly.

Tasks:

  • Design and implement the "Edit Product" page or section in the admin dashboard, which includes an edit form for product details, including the stock level.
  • Create a list of available products for administrators to choose from within the edit form.
  • Implement the logic to pre-fill the edit form with the existing stock level of the product.
  • Implement the logic to save and update the stock level of products within the product model and the product catalog using the edit form.
  • Implement a confirmation message or notification upon successful stock level editing.

USER STORY: All products view MS2

As a user I want to be able to view a list of all available products in the bookshop so that I can browse and choose books to purchase

Acceptance Criteria:

  • Given I am on the bookshop's homepage, When I click on the "Browse All Products" link in the navigation menu, Then I should be directed to a page displaying a paginated list of all available products.

  • Given I am on the "All Products" page, When I scroll down, Then I should see a list of product cards, each containing:
    The book's title
    The book's author
    The book's cover image
    The book's price
    An "Add to Cart" button

  • Given I am on the "All Products" page, When I click on a product card, Then I should be directed to a product detail page where I can view more information about the selected product.

Tasks:

  • Create a Django view for displaying all products.
  • Create a template for the "All Products" page to render the list of products.
  • Create a product model in the database with fields for title, author, cover image, price, and other relevant information.
  • Implement pagination for the list of products to display a reasonable number per page.
  • Create a "Browse All Products" link in the navigation menu that points to the "All Products" view.
  • Ensure proper URL routing for the "All Products" page.
  • Implement and style the product cards on the "All Products" page.

USER STORY: Add/ remove products from wishlist

As a authenticated user, I want to be able to save books to my wishlist so that I can revisit and consider purchasing them later on BookHeaven.

Acceptance Criteria

  • Given I am a logged-in user, When I browse the list of products on the website, Then I should see a "Add to Wishlist" button or link next to each product.
  • Given I am a logged-in user and I click on the "Add to Wishlist" button or link for a product, When I do so, Then the product should be added to my wishlist.
  • Given I am a logged-in user and I have added products to my wishlist, When I navigate to the "My Wishlist" page or section, Then I should be able to view the list of products I have added.
  • Given I am a logged-in user and I have added products to my wishlist, When I visit a product's detail page, Then I should see a "Remove from Wishlist" button, allowing me to remove the product from my wishlist.
  • Given I am a logged-in user and I have added products to my wishlist, When I click on the "Remove from Wishlist" button for a product, Then the product should be removed from my wishlist.

Tasks:

  • Design and implement the frontend template for the product listing, including an "Add to Wishlist" button or link.
  • Create a database model to store the user's wishlist, including the product and the user's association.
  • Implement the logic to add products to the user's wishlist when the user clicks "Add to Wishlist."
  • Design and implement the frontend template for the "My Wishlist" page or section.
  • Implement the logic to display the user's wishlist on the "My Wishlist" page.
  • Design and implement the "Remove from Wishlist" button on the product detail page.
  • Implement the logic to remove products from the user's wishlist when they click "Remove from Wishlist."

BUG: Error when adding item to cart with quantity above stock level

Bug Description
This bug is related to calculating the amount of stock in the shopping cart with the quantity the user is trying to add. It throws an error cannot concatenate str and int objects.

Steps To Reproduce
If item has 4 units in stock, add to cart 2. Then attempt to add 3 more items to cart. The error cannot concatenate str and int objects. occurs

Solution
The issue was related to the fact that the cart values coming from the session are a string. Once converted to integer the issue was resolved

DEV TASK: Document Testing Process MS8

Describe Task
Document the testing process of the application to include:

  • Responsiveness
  • Browser Compatibility
  • Lighthouse
  • Code Validation
  • User stories
  • Features
  • Automated testing (Optional)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.