View Requirements
1. Create a directory in your application called `view` [1 Mark].
2. In Assignment 1, there were three main pages; the page for choosing the category,
the page for choosing the product, and the page that displayed the cart.
There was also a file that was used to add a header to each page [1 Marks].
i. Move these four files into the `view` directory.
ii. For the first three files, remove any line that `includes` or `requires` the original file that
handled inventory data in Assignment 1.
3. Convert the homepage from Assignment 1 to a View [8 Marks]. Use the below hints:
i. Rather than calling the `get_categories` function to generate the dropdown list of categories,
instead use the data read by the controller in the `choose_category` action.
ii. Rather than using the next page as the `action` for the form,
instead have the form submit to the controller.
iii. For each category in the dropdown list, add a `value` attribute to the `option` tag, equal to
that category’s $id. This way, the form will submit the category’s id, rather than its name.
iv. Add a hidden input tag to the form, whose name is `controller_action`, and whose value is
`choose_products`. This will tell the controller what action to load (see above).
4. Convert the second and third pages from Assignment 1 to Views [12 Marks].
Some of the above hints also apply to these Views, although the exact steps are different on
each page; e.g., on the second page, the hidden `controller_action` input tag will have the value
`cart`, not `choose_products`.