Products and Categories Part - I: By: Muhammad Zeeshan Ali
Products and Categories Part - I: By: Muhammad Zeeshan Ali
Products and Categories Part - I: By: Muhammad Zeeshan Ali
Part - I
By: Muhammad Zeeshan Ali
1
Products and Categories
• With a basic structure to our framework in place, we can
now start to think about the e-commerce aspects to it.
• How to structure content within the framework, including:
– Page structure
– Product structure
– Categories structure
2
Products and Categories …
• How to access and display products and categories with
models and controllers.
• How to design views to interact with our framework.
3
What we need
• Before we start building products and categories into our
framework, let's think about what information we need,
both to display to our customers and for the use of the
store administrator.
• To provide our customers with sufficient product
information, we need to inform them:
– name of the product
– detailed description of the product
– price of the product
4
What we need …
– photograph of the product
– additional images related to the product
– Weight
– cost of shipping
– Items in stock
5
What we need …
• From an administration perspective:
– reference number
– or ID number
– Stock Keeping Unit reference
– search engine friendly name
6
Product Information
• Taking into account what we have just discussed, at a
minimum we need to store the following information:
Data Description
9
Structuring Content within our Framework
• Most content displayed on any website or contained
within any web application has some common data.
• If we find this common data, and create an abstract
content type, then we will have a more flexible framework.
• This is because we could easily integrate additional
functionality to each of these content types without the
need for duplicating the functionality or the code.
10
Pages
• Pages are an essential type of content.
• Even if we were creating a website, which was just to be
an online store, we would still need some standard pages:
– contact details
– delivery information
– terms and conditions
– privacy policies
11
Pages …
• What data might we wish to store for pages?
Data Description
ID A reference for the framework to refer to the pages
Name The name of the page
A search engine friendly name for the page to be used in
S.E.F. Name URLs
A page heading, generally something we would store within
Heading an <h1> tag
A title of the page (displayed within the <title> tags of the
Title page)
Content The content for the page
Keywords Metadata for the page—keywords
Description Metadata for the page—description
12
Content
• Products and other advanced content types would need
more data, and we would extend the data stored for these
content types.
Data Description
ID A reference for the framework to refer to the content
Name The name of the content entity
A search engine friendly name for the content, for use within
S.E.F Name URLs
Content The content itself, for example page, product details, and
category description
Type The type of content this content entry is (for example page,
product,
category, and so on)
13
Content …
Order The order of the content within a group, for example pages in a menu
Parent The parent element for this entity, useful to indicate subproducts
and subpages
Meta keywords Metadata (keywords) for this content entity
Meta description Metadata (description) for this content entity
Date created The date the content entity was created
Creator The user who created the content
Active If the content is active (publicly visible) or not
Secure
If the content requires the user to log in to see it (doesn't take into
account fine-grained permissions)
14