COIT12204 Web Site Design Assignment 2 Guide – Part 2

Note:

Add a slash before the nav routes in the _Layout.cshtml file otherwise you may get an exception when changing pages

  • href=”/Home”>Home</a></li>
  • href=”/Catalogue”>Products</a></li>

Also add a slash before the css and also the image paths at the top if you haven’t done this already

i.e. <link rel=”stylesheet” href=”/css/style.css”>

Product Details Page
  • Add a ProductDetails() method to the catalogue controller
  • Pass one parameter into the ProductDetails method which will be int productId
    • We will set up the route for this in a soon to pass the product id to the controller
  • Retrieve the product from the database. For the LINQ command use the code below (from Listing 8.25 which uses product id to fetch the product)
  • Watch the case for the product id variable and database field in the method parameters and LINQ

Product product = repository.Products

    .FirstOrDefault(p => p.ProductID == productId);

  • Pass the product to the view
  • Add a corresponding ProductDetails view to the catalogue view folder
  • The model for the view will be of type Product
    • Add the body (excluding header and footer) from the single-product.html template file provided and copy it into the view
    • Populate the page using the product model that was passed in
      • Don’t forget the image. Check the catalogue page for the format
      • Also add a slash here before img

src=/img/product/@Model.Image

Open from the Catalogue Page
  • Next, we need to open the product details page when the product image is clicked in the catalogue page. For this we need to pass the product id of the image clicked
  • We could set up a route to the product details method in startup.cs and pass the product id

app.UseEndpoints(endpoints => {

    endpoints.MapControllerRoute(“ProductDetails”, “Product/{productID}”,

        new { Controller = “Catalogue”, action = “ProductDetails” });

    endpoints.MapDefaultControllerRoute();

});

  • However, it is easy to use a tag helper in the Catalogue controller as we did before
    • Note that the route name does not have to have any association with the controller and method names so you can name it anything meaningful

[Route(“Product/{productId}”)]

public IActionResult ProductDetails(int productId)

    Add the link to the Catalogue Product Image                   
  • Add a link around the product image in our partial view for the image click
  • Use the route above and pass the product id in the route

            <a href=”/product/@Model.ProductID”>

                <img …>

         </a>

Test
  • The product details page should now open when an image is clicked and display the products details for that product
Cart
  • You can follow Listing 8.13 to 9.6 as a guide for the cart
  • However, the cart is something universal and is reasonably portable so you may copy the cart files from SportsStore. Still, you should check this against the text
    • Copy the shopping cart class and the session cart classes from the Models folder
    • Create the Infrastructure folder in the root
      • Copy SessionExtensions.cs to this folder
    • Create the Pages Folder
    • From the Pages folder copy the _CartLayout.cshtml, _ViewImports.cs, _ViewStart.cs and Cart.cshtml and Cart.cshtml.cs files
  • Be careful to change to your namespace
Startup.cs
  • See Listing 8.13, Listing 8.21 and Listing 9.3 to update the startup configuration for Razor Pages, Sessions, HTTPContext and Cart as a service
Test
  • Open the cart page using the URL below and check that the page is displayed
  • Note that the cart will be empty
Add to Cart Button
  • In the Product Details page, we wrap the quantity and Add to Cart button in a Form (based on Listing 8.21) so we can add items to the cart
  • Above the product_count div, insert the code for the start of the form

<form asp-page=”/Cart” method=”post”>

   <input type=”hidden” name=”productId” value=”@Model.ProductID”/>

  • Below the submit button, close the form

       <input type=”hidden” name=”returnUrl”

           value=”/Catalogue />

   </form>

Test
  • Test the add to cart. It should add one item to the cart each time the Add to Cart button is pressed
  • The remove item should delete an item from the cart
  • The Continue Shopping button should return you to the Catalogue page
Note
  • I have provided less guidance for the items below which may require you to do a little research
Cart Layout
  • You will need to copy the main layout for the cart layout and alter as required
  • You will need to remove the footer
    • or add a margin on the top of the footer to create a gap below the buttons
Product Quantity
  • The SportsStore cart page only added a single item per click, but we need to add the quantity from the spin control. Fortunately, the template markup has the value as a text input named quantity. For this you will need to modify the OnPost method
Test
  • Test the add to cart. The quantity set should be added to the product quantity in the cart
Cart Nav
  • Add the Cart icon button onClick event to open the cart
Cart Icon
  • Change the number beside the cart icon in the header to reflect the total number of items in the cart. For this you can inject the Cart into both controllers and use the ViewBag or create a component as in the Sports Store.

Complete all other items in the specification and marking criteria.

  • Note that you may change the text on the Sale button
Order Now
No Fields Found.
Universal Assignment (August 31, 2025) COIT12204 Web Site Design Assignment 2 Guide – Part 2. Retrieved from https://universalassignment.com/assignment-2-guide-part-2/.
"COIT12204 Web Site Design Assignment 2 Guide – Part 2." Universal Assignment - August 31, 2025, https://universalassignment.com/assignment-2-guide-part-2/
Universal Assignment June 22, 2022 COIT12204 Web Site Design Assignment 2 Guide – Part 2., viewed August 31, 2025,<https://universalassignment.com/assignment-2-guide-part-2/>
Universal Assignment - COIT12204 Web Site Design Assignment 2 Guide – Part 2. [Internet]. [Accessed August 31, 2025]. Available from: https://universalassignment.com/assignment-2-guide-part-2/
"COIT12204 Web Site Design Assignment 2 Guide – Part 2." Universal Assignment - Accessed August 31, 2025. https://universalassignment.com/assignment-2-guide-part-2/
"COIT12204 Web Site Design Assignment 2 Guide – Part 2." Universal Assignment [Online]. Available: https://universalassignment.com/assignment-2-guide-part-2/. [Accessed: August 31, 2025]

Please note along with our service, we will provide you with the following deliverables:

Please do not hesitate to put forward any queries regarding the service provision.

We look forward to having you on board with us.

Most Frequent Questions & Answers

Universal Assignment Services is the best place to get help in your all kind of assignment help. We have 172+ experts available, who can help you to get HD+ grades. We also provide Free Plag report, Free Revisions,Best Price in the industry guaranteed.

We provide all kinds of assignmednt help, Report writing, Essay Writing, Dissertations, Thesis writing, Research Proposal, Research Report, Home work help, Question Answers help, Case studies, mathematical and Statistical tasks, Website development, Android application, Resume/CV writing, SOP(Statement of Purpose) Writing, Blog/Article, Poster making and so on.

We are available round the clock, 24X7, 365 days. You can appach us to our Whatsapp number +1 (613)778 8542 or email to info@universalassignment.com . We provide Free revision policy, if you need and revisions to be done on the task, we will do the same for you as soon as possible.

We provide services mainly to all major institutes and Universities in Australia, Canada, China, Malaysia, India, South Africa, New Zealand, Singapore, the United Arab Emirates, the United Kingdom, and the United States.

We provide lucrative discounts from 28% to 70% as per the wordcount, Technicality, Deadline and the number of your previous assignments done with us.

After your assignment request our team will check and update you the best suitable service for you alongwith the charges for the task. After confirmation and payment team will start the work and provide the task as per the deadline.

Yes, we will provide Plagirism free task and a free turnitin report along with the task without any extra cost.

No, if the main requirement is same, you don’t have to pay any additional amount. But it there is a additional requirement, then you have to pay the balance amount in order to get the revised solution.

The Fees are as minimum as $10 per page(1 page=250 words) and in case of a big task, we provide huge discounts.

We accept all the major Credit and Debit Cards for the payment. We do accept Paypal also.

Popular Assignments

Assignment Help in St Albans, Melbourne

Introduction St Albans is a multicultural suburb located approximately 17 km north-west of Melbourne’s CBD. Known for its diverse community, vibrant shopping precincts, and residential charm, St Albans is a popular choice for students seeking affordable living with good access to educational institutions. Nearby universities and TAFE campuses include Victoria

Read More »

Assignment Help in Springvale South, Melbourne

Introduction Springvale South is a peaceful suburb located approximately 27 km south-east of Melbourne’s CBD. Known for its residential charm, green spaces, and family-friendly environment, Springvale South is ideal for students seeking a quieter lifestyle while remaining connected to educational hubs. Nearby universities and TAFE campuses include Monash University (Clayton

Read More »

Assignment Help in Springvale, Melbourne

Introduction Springvale is a bustling multicultural suburb located approximately 22 km south-east of Melbourne’s CBD. Known for its vibrant community, diverse cuisines, and commercial precincts, Springvale attracts students seeking both cultural experiences and proximity to educational institutions. Nearby universities and TAFE campuses include Monash University (Clayton Campus), Deakin University (Burwood

Read More »

Assignment Help in Spotswood, Melbourne

Introduction Spotswood is a peaceful suburb located approximately 8 km south-west of Melbourne’s CBD. Known for its residential charm, local parks, and family-friendly atmosphere, Spotswood offers students a quiet and supportive environment for studying. Its proximity to educational institutions such as Victoria University (Footscray Park Campus), RMIT University, and TAFE

Read More »

Assignment Help in South Yarra, Melbourne

Introduction South Yarra is a prestigious inner-city suburb located just 4 km south-east of Melbourne’s CBD. Known for its upscale shopping precincts, cafés, cultural attractions, and vibrant nightlife, South Yarra attracts students seeking a dynamic urban lifestyle with excellent access to universities and TAFE campuses. Nearby institutions include RMIT University,

Read More »

Assignment Help in Southbank, Melbourne

Introduction Southbank is a vibrant inner-city suburb located just across the Yarra River from Melbourne’s CBD. Known for its arts and entertainment precinct, high-rise apartments, and cultural hubs, Southbank is home to students seeking a dynamic lifestyle close to universities and TAFE campuses. Nearby institutions include RMIT University, University of

Read More »

Assignment Help in South Morang, Melbourne

Assignment Help in South Morang, Melbourne Introduction South Morang is a thriving suburb located approximately 21 km north-east of Melbourne’s CBD. Known for its family-friendly atmosphere, modern residential developments, and excellent amenities, South Morang has become a popular choice for students seeking a peaceful yet well-connected study environment. With convenient

Read More »

Assignment Help in South Melbourne, Melbourne

Introduction South Melbourne is a vibrant inner-city suburb located just 2 km south of Melbourne’s CBD. Known for its historic architecture, bustling markets, trendy cafés, and proximity to the Arts Precinct, South Melbourne attracts students who want a lively urban lifestyle with easy access to universities and TAFE campuses. Nearby

Read More »

Assignment Help in South Kingsville, Melbourne

Introduction South Kingsville is a charming inner-west suburb located approximately 7 km south-west of Melbourne’s CBD. Known for its tree-lined streets, historic homes, and a close-knit community, South Kingsville offers students a calm and welcoming environment while remaining close to major educational institutions. Students in this suburb have easy access

Read More »

Assignment Help in Somerton, Melbourne

Introduction Somerton is an industrial and semi-residential suburb located approximately 22 km north of Melbourne’s CBD. Known for its convenient access to the Hume Freeway and Melbourne Airport, Somerton is ideal for students who prefer a quieter environment while being well connected to educational institutions across the city. Nearby universities

Read More »

Assignment Help in Skye, Melbourne

Introduction Skye is a growing suburb located approximately 38 km south-east of Melbourne’s CBD. Known for its residential estates, open green spaces, and family-friendly atmosphere, Skye is ideal for students who prefer a quieter lifestyle while remaining connected to the city and educational institutions. The suburb is well-linked by major

Read More »

Assignment Help in Seaholme, Melbourne

Introduction Seaholme is a charming bayside suburb located approximately 14 km south-west of Melbourne’s CBD. Known for its quiet streets, coastal parks, and proximity to Altona Beach, Seaholme offers students a peaceful study environment while remaining connected to the city. With easy access via public transport and major roads, students

Read More »

Assignment Help in Seddon, Melbourne

Introduction Seddon is a vibrant inner-west suburb located approximately 7 km west of Melbourne’s CBD. Known for its lively café culture, boutique shops, and historic architecture, Seddon combines a charming village atmosphere with convenient access to the city. Its proximity to Victoria University (Footscray Campus), RMIT University, and other TAFE

Read More »

Assignment Help in Seabrook, Melbourne

Introduction Seabrook is a coastal suburb located about 23 km south-west of Melbourne’s CBD. Known for its serene beaches, family-friendly environment, and green spaces, Seabrook offers students a peaceful setting while remaining well connected to educational institutions across Melbourne. Public transport and road access via the Princes Highway and nearby

Read More »

Assignment Help in Scoresby, Melbourne

Introduction Scoresby is a well-established suburb located about 28 km east of Melbourne’s CBD. Known for its mix of residential and commercial areas, Scoresby offers a peaceful and convenient lifestyle for students. The suburb is in close proximity to educational institutions such as Monash University (Clayton Campus), Swinburne University, and

Read More »

Assignment Help in Sandringham, Melbourne

Introduction Sandringham is a picturesque bayside suburb located approximately 16 km south-east of Melbourne’s CBD. Famous for its beautiful beaches, Sandringham Yacht Club, and relaxed coastal lifestyle, Sandringham is ideal for students seeking a serene study environment while remaining close to the city. The suburb has convenient transport links via

Read More »

Assignment Help in Sandhurst, Melbourne

Introduction Sandhurst is an upscale suburb located approximately 38 km south-east of Melbourne’s CBD. Known for its leafy streets, modern housing estates, and peaceful environment, Sandhurst is ideal for students seeking a calm residential lifestyle while maintaining access to educational institutions in Melbourne’s south-eastern corridor. With nearby transport links and

Read More »

Assignment Help in Roxburgh Park, Melbourne

Introduction Roxburgh Park is a vibrant and fast-growing suburb located around 23 km north of Melbourne’s CBD. Known for its multicultural community, modern residential developments, and family-friendly environment, Roxburgh Park has become a popular choice for students and young professionals alike. With excellent transport connections via the Roxburgh Park Train

Read More »

Assignment Help in Rowville, Melbourne

Introduction Rowville is a well-established suburb located around 27 km south-east of Melbourne’s CBD. Known for its family-friendly vibe, spacious parks like Stud Park Reserve, and excellent community facilities, Rowville offers students a balanced mix of suburban comfort and easy access to education hubs. With major roads such as the

Read More »

Assignment Help in Rosanna, Melbourne

Introduction Rosanna is a leafy and family-friendly suburb located about 12 km north-east of Melbourne’s CBD. Known for its green streets, Rosanna Parklands, and strong community atmosphere, it provides students with a calm environment while staying close to the city. The suburb is well connected by Rosanna Station and major

Read More »

Assignment Help in Ripponlea, Melbourne

Introduction Ripponlea is a charming inner-city suburb located just 8 km south-east of Melbourne’s CBD. Famous for the heritage-listed Rippon Lea Estate and its leafy residential streets, Ripponlea offers students a mix of cultural richness and convenient city living. With easy tram and train connections, students can travel effortlessly to

Read More »

Assignment Help in Ringwood North, Melbourne

Introduction Ringwood North is a leafy and family-friendly suburb located about 28 km east of Melbourne’s CBD. Known for its green streets, parks, and welcoming community, Ringwood North offers a peaceful residential lifestyle while remaining close to Melbourne’s educational and business hubs. With strong transport connections via nearby Ringwood Station

Read More »

Assignment Help in Ringwood East, Melbourne

Introduction Ringwood East is a peaceful residential suburb located around 25 km east of Melbourne’s CBD. Known for its leafy streets, friendly community, and excellent access to parks and schools, Ringwood East is ideal for students seeking a quieter lifestyle while still being close to Melbourne’s educational hubs. With its

Read More »

Assignment Help in Ringwood, Melbourne

Introduction Ringwood is a bustling suburb located around 25 km east of Melbourne’s CBD. Known for its leafy residential streets, modern shopping centres like Eastland, and easy access to the scenic Dandenong Ranges, Ringwood offers a great lifestyle for students and professionals. The suburb is well connected via Ringwood Station

Read More »

Assignment Help in Richmond, Melbourne

Introduction Richmond is one of Melbourne’s most iconic inner-city suburbs, located just 3 km east of the CBD. Famous for its lively café culture, bustling shopping streets like Bridge Road, and its thriving arts and sports scene, Richmond blends lifestyle and convenience perfectly. With excellent tram and train connections, students

Read More »

Assignment Help in Reservoir, Melbourne

Assignment Help in Reservoir, MelbourneIntroductionReservoir is a thriving suburb located just 12 kilometres north of Melbourne’s CBD. Known for its multicultural community, leafy parks, and welcoming neighbourhoods, Reservoir strikes the perfect balance between suburban comfort and city convenience. It is well-connected through trains, buses, and trams, making travel easy for

Read More »

Assignment Help in Parkville – Universal Assignment

Parkville, located just 3 km north of Melbourne CBD, is one of Melbourne’s most prestigious academic hubs. It is home to The University of Melbourne, Monash University (Pharmacy campus), and major research institutes like the Walter and Eliza Hall Institute and the Royal Melbourne Hospital precinct. With such a concentration

Read More »

Assignment Help in Oakleigh East – Universal Assignment

Oakleigh East, located about 17 km south-east of Melbourne CBD, is a peaceful and residential suburb in the City of Monash, known for its family-friendly environment and convenient access to shopping and educational facilities. With nearby institutions like Monash University, Holmesglen Institute, and TAFE Victoria, many students living in Oakleigh

Read More »

Assignment Help in Preston – Universal Assignment

Preston, located about 9 km north of Melbourne’s CBD, is a thriving multicultural suburb that attracts many university and TAFE students. With the presence of Melbourne Polytechnic (Preston Campus) and close proximity to La Trobe University (Bundoora campus) and RMIT University, Preston has a large student population. While the suburb

Read More »

Assignment Help in Point Cook – Universal Assignment

Point Cook, located around 25 km southwest of Melbourne’s CBD, is a fast-growing residential suburb in the City of Wyndham. Known for its modern housing estates, coastal beauty, and cultural diversity, Point Cook is also home to many university and TAFE students. With Victoria University, RMIT, Deakin University, and the

Read More »

Can't Find Your Assignment?