You are on page 1of 14

Products and Categories

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

ID A reference number for the framework to reference the


product

Name The name of the product

Search Engine A search engine friendly name for the product to be


Friendly Name displayed in URLs.

Description A detailed description of the product

SKU A stock keeping reference (usually supplier's reference, or


for integration with stock keeping systems)
7
Product Information …

Price The cost of the product

Stock The number of these products which are currently in stock

Primary image An image of the product

Additional images A number of additional images which are displayed as thumbnails


and then toggled into the place of the main page
8
Category Information
• We need to be able to contain our products within categories, so
what information would we need to collect for our categories?
Data Description

ID A reference number for the framework to reference

Name the category

Description The name of the category


Search Engine
Friendly A detailed description of the category
A search engine friendly name for the category, to be used
Name for display within URLs.

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

You might also like