Class Products

Description

Products class

  • author: DevilDev

Located in /products/Products.php (line 8)

ModelAbstract
   |
   --Products
Variable Summary
Method Summary
static Products getInstance ()
array addDelivery (string $delivery_name)
array addParam (string $param_name)
int addReviews (array $post)
array addUnit (string $unit_name)
array addValue (string $value_name,  $param_id)
void createParamsTree ( $params)
string createProductLines ([string $url = ''], [boolean $returnArr = false])
string findProduct ()
void getAllParams ()
string getAmenitiesHtml (int $product_id)
void getParametersByProductId ( $product_id)
object product getProductById (int $pid)
string loadAdminFormHtml ()
string loadAdminHtml ()
void loadBrandsMenu ()
string loadCalendarHtml ([string $date = null], [int $category_id = null], [boolean $ajax = false])
void loadCompareHtml ()
string loadDetailSlider ([int $deny_product_id = null], [int $count = 10])
string loadLikeHtml (int $count, [int $product_id = null], [int $reise_type = null], [int $col = 4], [boolean $return = false])
string loadMapPoints (int $product_id)
void loadNewProductsHtml ([ $limit = null])
string loadParamHtml (array $product, [boolean $param_only = false], [boolean $pdf = false])
void loadProdcutsByCategoryHtml ( $categories, [ $count = 10])
string loadProductDetail (int $product_id)
void loadProductsByBrand ( $brands)
string loadProposition ([int $count = 4])
string loadReviewsHtml (array $product, [boolean $return_form = false])
string loadSliderHtml (array $product, [boolean $pdf = false])
string loadTopProductsHtml (int $count)
void loadTrash ([ $cnt = false])
void removeById ( $id)
void SessionToDb ()
void _init ()
Variables
static Products $_instance = null (line 15)

Singleton instance

  • access: protected
mixed $addition_blocks = array() (line 19)
  • access: public
mixed $product = false (line 21)
  • access: public
mixed $tabs = array() (line 17)
  • access: public
Methods
static method getInstance (line 31)

Returns an instance of Products

Singleton pattern implementation

  • return: Provides a fluent interface
  • access: public
static Products getInstance ()
addDelivery (line 2800)

Save delivery name in database

  • return: or boolean
  • access: public
array addDelivery (string $delivery_name)
  • string $delivery_name
addParam (line 2713)

Save parameter

  • return: or boolean
  • access: protected
array addParam (string $param_name)
  • string $param_name
addReviews (line 1570)

Add new reviews in database

Incoming params:
cleanliness, comfort, location, service, quality, price, username, title, comment, evaluation, product_id

  • return: last insert id or false if error
  • access: public
int addReviews (array $post)
  • array $post
addUnit (line 2771)

Save value unit

  • return: or boolean
  • access: protected
array addUnit (string $unit_name)
  • string $unit_name
addValue (line 2741)

Save param value

  • return: or boolean
  • access: protected
array addValue (string $value_name,  $param_id)
  • string $value_name
  • $param_id
createParamsTree (line 2210)
void createParamsTree ( $params)
  • $params
createProductLines (line 1265)

Cretae html products lines for frontend

Allow variables:
$total - count products
$view - type views (table | list | cube)
$product_list - html all products
$pagination - current paginator
$canonical - html meta canonical
Incomming params:
$l - limit products per page
$pages - current page
$sort_name - sort products one by title
$q - search query one by title
$sort_price - sort products one by price $search_country - select products one by country $search_category - select product one by category

  • return: html
  • access: public
string createProductLines ([string $url = ''], [boolean $returnArr = false])
  • string $url
  • boolean $returnArr
findProduct (line 1533)

Create search form for products

Allow variables:
$search_day_count - select count days $search_date_from - select dates from $search_date_to - select dates to $form_action - string form actions

  • return: html
  • access: public
string findProduct ()
getAllParams (line 2185)
void getAllParams ()
getAmenitiesHtml (line 2352)

Create html amenities one by product id

  • return: html
  • access: public
string getAmenitiesHtml (int $product_id)
  • int $product_id
getParametersByProductId (line 2075)
  • access: public
void getParametersByProductId ( $product_id)
  • $product_id
getProductById (line 2622)

Load product one by id

  • access: public
object product getProductById (int $pid)
  • int $pid
loadAdminDeliveryHtml (line 2913)

Create html for admin delivery

  • return: html
  • access: public
string loadAdminDeliveryHtml ()
loadAdminFormHtml (line 149)

Create html form for admin edit product

  • return: html form
  • access: public
string loadAdminFormHtml ()
loadAdminHtml (line 980)

Create html all products for admin module

Allow variables:
$news_lines - html all products
$pagination - current pagonator

  • return: html
  • access: public
string loadAdminHtml ()
loadAdminProductRequestsHtml (line 1613)

Create admin html for requests from users

Allow variables:
$sub_lines - html lines requests
$pagination - html current paginator
Incoming params:
$limit - limit requests per page
$pages - current page

  • return: html
  • access: public
string loadAdminProductRequestsHtml ()
loadAllParamsAsSelect (line 2164)
  • access: public
void loadAllParamsAsSelect ()
loadBrandsMenu (line 2629)
  • access: public
void loadBrandsMenu ()
loadCalendarHtml (line 59)

Create calendar html

Allow variable:
$year - current year
$month - current month name
$td - all columns for table
$calendar_html - html calendar

  • return: calendar html
  • access: public
string loadCalendarHtml ([string $date = null], [int $category_id = null], [boolean $ajax = false])
  • string $date
  • int $category_id
  • boolean $ajax
loadCompareHtml (line 2996)
  • access: public
void loadCompareHtml ()
loadDetailSlider (line 2831)

Create html product slider

Allow variables:
$slider_lines - html all slider lines

  • return: html
  • access: public
string loadDetailSlider ([int $deny_product_id = null], [int $count = 10])
  • int $deny_product_id
  • int $count
loadLikeHtml (line 2403)

Load likes products

Allow variables:
$like_lines - html all product lines

  • return: html
  • access: public
string loadLikeHtml (int $count, [int $product_id = null], [int $reise_type = null], [int $col = 4], [boolean $return = false])
  • int $count: count load
  • int $product_id: ignore product id
  • int $reise_type: load by category
  • int $col: count cols for separate
  • boolean $return: return only lines withod container
loadMapPoints (line 1983)

Create html script for map points

  • access: public
string loadMapPoints (int $product_id)
  • int $product_id
loadNewProductsHtml (line 2485)
  • access: public
void loadNewProductsHtml ([ $limit = null])
  • $limit
loadParamHtml (line 2104)

Create html params lines for current product

  • return: html
  • access: public
string loadParamHtml (array $product, [boolean $param_only = false], [boolean $pdf = false])
  • array $product
  • boolean $param_only
  • boolean $pdf
loadProdcutsByCategoryHtml (line 2519)
  • access: public
void loadProdcutsByCategoryHtml ( $categories, [ $count = 10])
  • $categories
  • $count
loadProductDetail (line 1686)

Create html for detail views products in frontend

Allow all data for product
all variables match field name in products tables
$brand_line - html brand lines
$category_line - html category lines
$slider - full slider for current product
$params - html all params
$reviews - html all reviews
$reviews_form - html form add reviews

  • return: html
  • access: public
string loadProductDetail (int $product_id)
  • int $product_id
loadProductsByBrand (line 2558)
  • access: public
void loadProductsByBrand ( $brands)
  • $brands
loadProposition (line 2571)

Create html for top proposition

Allow variables:
$propositionHtml - html lines products

  • return: html
  • access: public
string loadProposition ([int $count = 4])
  • int $count: countload products
loadReviewsHtml (line 2253)

Create html reviews for current product

Allow variables:
$summ_reviews - summ ball $total_reviews - total count reviews $ceil_sum - rounded summ ball for icon star $reviews_lines - html all reviews

  • return: html reviews line or html form reviews
  • access: public
string loadReviewsHtml (array $product, [boolean $return_form = false])
  • array $product
  • boolean $return_form
loadSliderHtml (line 2023)

Create slider for current product

  • return: html
  • access: public
string loadSliderHtml (array $product, [boolean $pdf = false])
  • array $product: current product
  • boolean $pdf
loadTopProductsHtml (line 2882)

Create top products html

  • return: html or boolean
  • access: public
string loadTopProductsHtml (int $count)
  • int $count
loadTrash (line 2945)
  • access: public
void loadTrash ([ $cnt = false])
  • $cnt
removeById (line 2969)
  • access: public
void removeById ( $id)
  • $id
SessionToDb (line 3073)
  • access: public
void SessionToDb ()
_init (line 38)
void _init ()

Documentation generated on Fri, 19 Aug 2016 17:10:36 +0200 by phpDocumentor 1.4.3