Class TProductMasterFo

Description

Manage the product master (a master contain 1 or more product slaves)

  • author: SimpliciWeb
  • version: $Id: t_productmaster_fo.class.php 924 2008-03-25 10:05:50Z nicolas_s $

Located in /core/internal_components/front_sites/t_product/t_productmaster_fo.class.php (line 64)


	
			
Variable Summary
Method Summary
 bool getAttributsForSelect (array $p_product_data, integer $p_force_ps_id,  &$r_array_result, array $r_array_result)
 bool getCountListForProductList (integer $p_ray_id,  &$r_count, [string $p_word = ""], integer $r_count)
 bool getDiscountProductCount ( &$r_result, array $r_result)
 bool getDiscountProductList ( &$r_result, integer $start, integer $end, array $r_result)
 bool getListForProductList (integer $p_ray_id,  &$r_result, [integer $p_limit_start = 0], [integer $p_limit_count = 0], [string $p_word = ""], [string $p_order_by = "title_asc"], array $r_result)
 bool getListForShoppingCartValidation (array $p_psl_ids,  &$r_result, array $r_result)
 bool getLittleDescriptionFo ( &$r_result, integer $p_pma_id, array $r_result)
 void getNbProductInDetailPage ( &$r_nb_product, integer $r_nb_product)
 bool getOthersProductsSamePage (integer $p_page_id, integer $p_pma_id,  &$r_result, array $r_result)
 bool getWithTProductSlaveAndTAttribut (integer $p_pma_id,  &$r_result, [array $p_load_image_array = false], [bool $p_is_for_preview = 'NO'], array $r_result)
 bool isNotActiveId (integer $p_pma_id,  &$r_result_bool, bool $r_result_bool)
 bool isNotValidActive (string $p_value)
 bool isNotValidDescFull (string $p_value)
 bool isNotValidDescLittle (string $p_value)
 bool isNotValidDuration (string $p_value)
 bool isNotValidEndPeriod (string $p_value)
 bool isNotValidId (string $p_value)
 bool isNotValidPrice ( &$p_value_psl, string $p_value)
 bool isNotValidStartPeriod (string $p_value)
 bool isNotValidTitle (string $p_value, [bool $p_it_can_not_be_empty = true])
 bool xArrangeProductList ( &$r_result, result $p_productlist_sqlresult, array $r_result)
 bool xGetArrayMastersSlavesAndTAttribut (resource $r_db_res,  &$r_result, [bool $p_load_image_array = false], array $r_result)
 bool xGetDiscountProduct ( &$r_result, [string $p_action = "LIST"], [integer $p_start = 0], [integer $p_end = 0], array $r_result)
Variables
DbConnexion $m_db_connexion = NULL (line 163)

Database Connexion object

integer $m_nb_product_in_detail_page_from_same_page = 10 (line 218)

Number of products in detail page from same page

integer $m_nof_discount_product_in_link = 2 (line 224)

Set number of discount product in link

Format $m_object_format = NULL (line 199)

Format Object

TAttributFo $m_object_tattribut = NULL (line 187)

TAttributFo Object

TPictureTProductSlave $m_object_tpicture = NULL (line 181)

TPictureTProductSlave Object

TProductMasterFo $m_object_tproductmodifier = NULL (line 193)

TProductMasterFo Object

TProductSlaveFo $m_object_tproductslavefo = NULL (line 175)

TProductSlaveFo Object

TPageFo $m_object_trayfo = NULL (line 211)

TPageFo Object

TTvaTypeFo $m_object_ttvatype = NULL (line 205)

TTvaTypeFo Object

siteInformation $m_site_information = NULL (line 169)

SiteInformation Object

string $m_stock_not_define = "not_define" (line 71)

Value for not define stock

string $req_count_with_slave_attribut_by_ray = "" (line 107)

SQL Request : Select with slave attribut by page

string $req_count_with_slave_attribut_by_ray_by_word = "" (line 113)

SQL Request : Select with attribut by page and word

string $req_get_discount_list = "" (line 149)

SQL Request : Get all product with valid discount

string $req_get_little_desc = "" (line 156)

SQL Request : Get Little description

string $req_get_product_for_shoppingcart_validation =
"SELECT psl_id, psl_tax_included_price, psl_stock, pma_id, pma_dty_id, pma_tty_id
FROM t_productslave, t_productmaster
WHERE pma_id = psl_pma_id
AND pma_active='YES'
AND psl_id IN %s;"
(line 125)

SQL Request : Get product for shopppingcart validation

string $req_get_stock =
"SELECT psl_pma_id, MIN(psl_stock), COUNT( psl_id )
FROM t_productmaster
LEFT JOIN t_productslave ON psl_pma_id = pma_id
WHERE pma_id IN %s
GROUP BY psl_pma_id;"
(line 137)

SQL Request : Get stock for product master

string $req_select_exist = "" (line 77)

SQL Request : Select exist

string $req_select_other_product_same_page_by_ray = "" (line 119)

SQL Request : Select other product same page by page

string $req_select_with_slave_attribut = "" (line 83)

SQL Request : Select with slave attribut

string $req_select_with_slave_attribut_by_ray = "" (line 95)

SQL Request : Select by with slave attribut by page

string $req_select_with_slave_attribut_by_ray_by_word = "" (line 101)

SQL Request : Select with slave attribut by page and word

string $req_select_with_slave_attribut_for_preview = "" (line 89)

SQL Request : Select with slave attribut for preview

Methods
Constructor TProductMasterFo (line 254)

Constructor, init the requests and objects

TProductMasterFo TProductMasterFo ()
getAttributsForSelect (line 1127)

get attributs for select

$product_data est un tableau provenant de getWithTProductSlaveAndTAttribut par exemple

  • return: TRUE on error
bool getAttributsForSelect (array $p_product_data, integer $p_force_ps_id,  &$r_array_result, array $r_array_result)
  • array $p_product_data
  • integer $p_force_ps_id
  • array $r_array_result
  • &$r_array_result
getCountListForProductList (line 537)

Get count list for product list

  • return: TRUE on error
bool getCountListForProductList (integer $p_ray_id,  &$r_count, [string $p_word = ""], integer $r_count)
  • integer $p_ray_id
  • integer $r_count
  • string $p_word
  • &$r_count
getDiscountProductCount (line 1341)

Get discount product count

  • return: TRUE on error
bool getDiscountProductCount ( &$r_result, array $r_result)
  • array $r_result
  • &$r_result
getDiscountProductList (line 1354)

Get list od discount product

  • return: TRUE on error
bool getDiscountProductList ( &$r_result, integer $start, integer $end, array $r_result)
  • array $r_result
  • integer $start
  • integer $end
  • &$r_result
getListForProductList (line 657)

get list for product

  • return: TRUE on error
bool getListForProductList (integer $p_ray_id,  &$r_result, [integer $p_limit_start = 0], [integer $p_limit_count = 0], [string $p_word = ""], [string $p_order_by = "title_asc"], array $r_result)
  • integer $p_ray_id
  • array $r_result
  • integer $p_limit_start
  • integer $p_limit_count
  • string $p_word
  • string $p_order_by
  • &$r_result
getListForShoppingCartValidation (line 1269)

Retrieve attribut for product slave and master to validate shopping_cart product

  • return: TRUE on error
bool getListForShoppingCartValidation (array $p_psl_ids,  &$r_result, array $r_result)
  • array $p_psl_ids
  • array $r_result
  • &$r_result
getLittleDescriptionFo (line 1441)

Get little description.

Retrieve the little description for selected product master

  • return: TRUE on error
bool getLittleDescriptionFo ( &$r_result, integer $p_pma_id, array $r_result)
  • array $r_result
  • integer $p_pma_id
  • &$r_result
getNbProductInDetailPage (line 231)

Get number of product in detail page

void getNbProductInDetailPage ( &$r_nb_product, integer $r_nb_product)
  • integer $r_nb_product
  • &$r_nb_product
getNofDiscountProductInLink (line 244)

Get number of discount

integer getNofDiscountProductInLink ()
getOthersProductsSamePage (line 604)

Get others products same page

  • return: TRUE on error
bool getOthersProductsSamePage (integer $p_page_id, integer $p_pma_id,  &$r_result, array $r_result)
  • integer $p_page_id
  • integer $p_pma_id
  • array $r_result
  • &$r_result
getWithTProductSlaveAndTAttribut (line 864)

Get with product slaves and attributs

  • return: TRUE on error
bool getWithTProductSlaveAndTAttribut (integer $p_pma_id,  &$r_result, [array $p_load_image_array = false], [bool $p_is_for_preview = 'NO'], array $r_result)
  • integer $p_pma_id
  • array $r_result
  • array $p_load_image_array
  • bool $p_is_for_preview
  • &$r_result
isNotActiveId (line 1238)

Is not active id

  • return: TRUE on error
bool isNotActiveId (integer $p_pma_id,  &$r_result_bool, bool $r_result_bool)
  • integer $p_pma_id
  • bool $r_result_bool
  • &$r_result_bool
isNotValidActive (line 457)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidActive (string $p_value)
  • string $p_value
isNotValidDescFull (line 495)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidDescFull (string $p_value)
  • string $p_value
isNotValidDescLittle (line 485)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidDescLittle (string $p_value)
  • string $p_value
isNotValidDuration (line 525)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidDuration (string $p_value)
  • string $p_value
isNotValidEndPeriod (line 515)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidEndPeriod (string $p_value)
  • string $p_value
isNotValidId (line 447)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidId (string $p_value)
  • string $p_value
isNotValidPrice (line 1223)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidPrice ( &$p_value_psl, string $p_value)
  • string $p_value
  • &$p_value_psl
isNotValidStartPeriod (line 505)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidStartPeriod (string $p_value)
  • string $p_value
isNotValidTitle (line 468)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidTitle (string $p_value, [bool $p_it_can_not_be_empty = true])
  • string $p_value
  • bool $p_it_can_not_be_empty
xArrangeProductList (line 749)

Transform a sql result for a product list to an arranged product list with discount applied

  • return: TRUE on error
bool xArrangeProductList ( &$r_result, result $p_productlist_sqlresult, array $r_result)
  • array $r_result
  • result $p_productlist_sqlresult
  • &$r_result
xGetArrayMastersSlavesAndTAttribut (line 914)

Arrange master, slaves and attribut to a beautifull array :)

  • return: TRUE on error
bool xGetArrayMastersSlavesAndTAttribut (resource $r_db_res,  &$r_result, [bool $p_load_image_array = false], array $r_result)
  • resource $r_db_res
  • array $r_result
  • bool $p_load_image_array
  • &$r_result
xGetDiscountProduct (line 1368)

Get count or list of valid product discount product

  • return: TRUE on error
bool xGetDiscountProduct ( &$r_result, [string $p_action = "LIST"], [integer $p_start = 0], [integer $p_end = 0], array $r_result)
  • array $r_result
  • string $p_action
  • integer $p_start
  • integer $p_end
  • &$r_result

Documentation generated on Tue, 25 Mar 2008 15:37:07 +0100 by phpDocumentor 1.3.2