Promotions¶
Promotions are small blocks of content that can link through to other parts of this site. Examples include:
- A banner image shown on at the top of the homepage that links through to a new offer page
- A “pod” image shown in the right-hand sidebar of a page, linking through to newly merchandised page.
- A biography of an author (featuring an image and a block of HTML) shown at the top of the search results page when the search query includes the author’s surname.
These are modeled using a base promotion
model, which contains image fields, the link
destination, and two “linking” models which link promotions to either a page URL or a particular keyword.
Models¶
-
class
oscar.apps.promotions.models.
AbstractProductList
(*args, **kwargs)[source]¶ Abstract superclass for promotions which are essentially a list of products.
-
class
oscar.apps.promotions.models.
AbstractPromotion
(*args, **kwargs)[source]¶ Abstract base promotion that defines the interface that subclasses must implement.
-
class
oscar.apps.promotions.models.
AutomaticProductList
(id, name, description, link_url, link_text, date_created, method, num_products)[source]¶
-
class
oscar.apps.promotions.models.
HandPickedProductList
(*args, **kwargs)[source]¶ A hand-picked product list is a list of manually selected products.
-
class
oscar.apps.promotions.models.
Image
(*args, **kwargs)[source]¶ An image promotion is simply a named image which has an optional link to another part of the site (or another site).
This can be used to model both banners and pods.
-
class
oscar.apps.promotions.models.
KeywordPromotion
(*args, **kwargs)[source]¶ A promotion linked to a specific keyword.
This can be used on a search results page to show promotions linked to a particular keyword.
-
class
oscar.apps.promotions.models.
MultiImage
(*args, **kwargs)[source]¶ A multi-image promotion is simply a collection of image promotions that are rendered in a specific way. This models things like rotating banners.
-
class
oscar.apps.promotions.models.
OrderedProductList
(id, name, description, link_url, link_text, date_created, handpickedproductlist_ptr, tabbed_block, display_order)[source]¶
-
class
oscar.apps.promotions.models.
PagePromotion
(*args, **kwargs)[source]¶ A promotion embedded on a particular page.
-
class
oscar.apps.promotions.models.
RawHTML
(*args, **kwargs)[source]¶ Simple promotion - just raw HTML