Class TProductMaster

Description

Manage the product master (one product master can contain 1 or more product slaves)

  • author: SimpliciWeb
  • version: $Id: t_productmaster.class.php 725 2007-11-23 16:58:08Z stephanet $

Located in /core/internal_components/admin_sites/t_product/t_productmaster.class.php (line 57)


	
			
Variable Summary
Method Summary
 bool delete ( &$r_pma_id, integer $r_pma_id)
 bool deleteAlone ()
 bool get (integer $p_pma_id,  &$r_result, array $r_result)
 req_select_alone getAlone ( &$r_result, array $r_result)
 bool getCount (integer $p_page_id, string $p_word, string $p_action_method,  &$r_result, array $r_result)
 bool getListWithSlavesTAttributByRayIdAndOrWord (integer $p_page_id, string $p_word, string $p_action_method,  &$r_result, [integer $p_limit_start = 0], [integer $p_limit_count = 0], [string $p_order_by = "title_asc"], [string $p_cus_id = ""], array $r_result)
 bool getWithTProductSlaveAndTAttribut (integer $p_pma_id,  &$r_result, [bool $p_generate_input_name = false], [bool $p_load_image_array = false], array $r_result)
 bool insert ( &$r_pma_id, string $p_pma_active, string $p_pma_title,  &$p_pma_desc_little, string $p_pma_desc_full, integer $p_pma_tty_id, integer $p_pma_dty_id, date $p_pma_duration, date $p_pma_start_period, date $p_pma_end_period, integer $r_pma_id, string $p_pma_desc_little)
 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 isNotValidStartPeriod (string $p_value)
 bool isNotValidTitle (string $p_value, [ $p_it_can_not_be_empty = true])
 bool update (integer $p_pma_id,  &$p_array_db_values, array $p_array_db_values)
 bool updateDeliveryCost (integer $p_pma_id, integer $p_pma_dty_id)
 bool updateDeliveryCostToNewDeliveryCost (integer $p_pma_dty_id, integer $p_new_pma_dty_id)
 bool updateMinAvgMax (integer $p_pma_id)
 bool updateState (integer $p_pma_id, string $p_bool_is_active)
 bool updateTva (integer $p_pma_id, integer $p_pma_tty_id)
 bool xGetAll ( &$r_result_all, array $r_result_all)
 bool xGetArrayMastersSlavesAndTAttribut (resource $r_db_res,  &$r_result, [string $p_generate_input_name = false], [bool $p_load_image_array = false], [false $cupr_pmo_id_exist = false], array $r_result)
 bool xGetListPmaIdAloneWithSlavesTAttributByRayIdAndOrWord (integer $p_page_id, string $p_word, string $p_action_method,  &$r_result, [integer $p_limit_start = 0], [integer $p_limit_count = 0], [string $p_order_by = "title_asc"], array $r_result)
 bool xGetMinAvgMaxPrix (integer $p_pma_id,  &$r_min,  &$r_avg,  &$r_max, flaot $r_min, float $r_avg, float $r_max)
 bool _check ( &$r_resut_final, array $r_resut_final)
Variables
DbConnexion $m_db_connexion = NULL (line 195)

Database Connexion object

string $m_dynamique_part = "|DYN_REQU|" (line 64)

A marker to replace by parameters in requests

Format $m_object_format = NULL (line 232)

Format Object

TAttribut $m_object_tattribut = NULL (line 220)

TAttribut Object

TPictureTProductSlave $m_object_tpicture = NULL (line 214)

TPictureTProductSlave Object

TProductModfier $m_object_tproductmodifier = NULL (line 226)

TProductModfier Object

TProductSlave $m_object_tproductslave = NULL (line 208)

TProductSlave Object

TPage $m_object_tray = NULL (line 244)

TPage

TTvaType $m_object_ttvatype = NULL (line 238)

TTvaType

siteInformation $m_site_information = NULL (line 201)

SiteInformation Object

string $req_count = "" (line 161)

SQL Request : Count

string $req_count_by_action_method = "" (line 167)

SQL Request : Count by action method

string $req_delete = "" (line 125)

SQL Request : Delete

string $req_insert = "" (line 71)

SQL Request : insert

string $req_select = "" (line 137)

SQL Request : Select

string $req_select_alone = "" (line 143)

SQL Request : Select one

string $req_select_min_avg_max = "" (line 149)

SQL Request : Select min average max

string $req_select_pmaid_alone_with_slave_attribut_by_ray = "" (line 183)
string $req_select_pmaid_alone_with_slave_attribut_by_ray_by_action_method = "" (line 187)
string $req_select_with_slave_attribut = "" (line 155)

SQL Request : Select with slave products and attributs

string $req_select_with_slave_attribut_by_ray = "" (line 173)

SQL Request : Select with slaves and attribut by page

string $req_select_with_slave_attribut_by_ray_by_action_method = "" (line 179)

SQL Request : Select with slaves and attribut by page and by method

string $req_update = "" (line 77)

SQL Request : Update

string $req_update_deliverycosts = "" (line 95)

SQL Request : Update deliverycosts

string $req_update_deliverycosts_in = "" (line 101)

SQL Request : Update deliverycosts (in)

string $req_update_deliverycosts_to_new = "" (line 107)

SQL Request : Update deliverycosts to new

string $req_update_min_avg_max = "" (line 131)

SQL Request : Update min average max

string $req_update_sate = "" (line 83)

SQL Request : update state

string $req_update_sate_in = "" (line 89)

SQL Request :

string $req_update_tva = "" (line 113)

SQL Request : Update tva

string $req_update_tva_in = "" (line 119)

SQL Request : Update tva in

Methods
Constructor TProductMaster (line 253)

Constructor, init the requests and objects

TProductMaster TProductMaster ()
delete (line 1086)

Delete a product master and change r_pma_id to 0

  • return: TRUE on error
bool delete ( &$r_pma_id, integer $r_pma_id)
  • integer $r_pma_id
  • &$r_pma_id
deleteAlone (line 1064)

Delete alone

  • return: TRUE on error
bool deleteAlone ()
get (line 1570)

Get one

  • return: TRUE on error
bool get (integer $p_pma_id,  &$r_result, array $r_result)
  • integer $p_pma_id
  • array $r_result
  • &$r_result
getAlone (line 1042)

Get product master with no product slave

req_select_alone getAlone ( &$r_result, array $r_result)
  • array $r_result
  • &$r_result
getCount (line 1145)

Get count

  • return: TRUE on error
bool getCount (integer $p_page_id, string $p_word, string $p_action_method,  &$r_result, array $r_result)
  • integer $p_page_id
  • string $p_word
  • string $p_action_method
  • array $r_result
  • &$r_result
getListWithSlavesTAttributByRayIdAndOrWord (line 1330)

Get product master with slaves, attributs by page

  • return: TRUE on error
bool getListWithSlavesTAttributByRayIdAndOrWord (integer $p_page_id, string $p_word, string $p_action_method,  &$r_result, [integer $p_limit_start = 0], [integer $p_limit_count = 0], [string $p_order_by = "title_asc"], [string $p_cus_id = ""], array $r_result)
  • integer $p_page_id
  • string $p_word
  • string $p_action_method
  • array $r_result
  • integer $p_limit_start
  • integer $p_limit_count
  • string $p_order_by
  • string $p_cus_id
  • &$r_result
getWithTProductSlaveAndTAttribut (line 1493)

Get a product master with slaves and attributs

  • return: TRUE on error
bool getWithTProductSlaveAndTAttribut (integer $p_pma_id,  &$r_result, [bool $p_generate_input_name = false], [bool $p_load_image_array = false], array $r_result)
  • integer $p_pma_id
  • array $r_result
  • bool $p_generate_input_name
  • bool $p_load_image_array
  • &$r_result
insert (line 503)

Insert a product master

pma_id will contain the new pma_id for the product master

  • return: TRUE on error
bool insert ( &$r_pma_id, string $p_pma_active, string $p_pma_title,  &$p_pma_desc_little, string $p_pma_desc_full, integer $p_pma_tty_id, integer $p_pma_dty_id, date $p_pma_duration, date $p_pma_start_period, date $p_pma_end_period, integer $r_pma_id, string $p_pma_desc_little)
  • integer $r_pma_id
  • string $p_pma_active
  • string $p_pma_title
  • string $p_pma_desc_little
  • string $p_pma_desc_full
  • integer $p_pma_tty_id
  • integer $p_pma_dty_id
  • date $p_pma_duration
  • date $p_pma_start_period
  • date $p_pma_end_period
  • &$r_pma_id
  • &$p_pma_desc_little
isNotValidActive (line 418)

Parameter Integrity checker

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

Parameter Integrity checker

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

Parameter Integrity checker

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

Parameter Integrity checker

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

Parameter Integrity checker

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

Parameter Integrity checker

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

Parameter Integrity checker

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

Parameter Integrity checker

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

update a product master

  • return: TRUE on error
bool update (integer $p_pma_id,  &$p_array_db_values, array $p_array_db_values)
  • integer $p_pma_id
  • array $p_array_db_values
  • &$p_array_db_values
updateAllMinAvgMax (line 946)
  • deprecated: empty function ?!
void updateAllMinAvgMax ()
updateDeliveryCost (line 797)

Update deliverycost id for a product

  • return: TRUE on error
bool updateDeliveryCost (integer $p_pma_id, integer $p_pma_dty_id)
  • integer $p_pma_id
  • integer $p_pma_dty_id
updateDeliveryCostToNewDeliveryCost (line 765)

Update deliverycost id to new deliverycost id

  • return: TRUE on error
bool updateDeliveryCostToNewDeliveryCost (integer $p_pma_dty_id, integer $p_new_pma_dty_id)
  • integer $p_pma_dty_id
  • integer $p_new_pma_dty_id
updateMinAvgMax (line 957)

Update min, averag, max price for a product

  • return: TRUE on error
bool updateMinAvgMax (integer $p_pma_id)
  • integer $p_pma_id
updateState (line 895)

Update sate for a product

  • return: TRUE on error
bool updateState (integer $p_pma_id, string $p_bool_is_active)
  • integer $p_pma_id
  • string $p_bool_is_active
updateTva (line 846)

Update the TVA product

  • return: TRUE on error
bool updateTva (integer $p_pma_id, integer $p_pma_tty_id)
  • integer $p_pma_id
  • integer $p_pma_tty_id
xGetAll (line 1535)

Get all the products

  • return: TRUE on error
  • access: private
bool xGetAll ( &$r_result_all, array $r_result_all)
  • array $r_result_all
  • &$r_result_all
xGetArrayMastersSlavesAndTAttribut (line 1618)

Format array to an array with master, slaves and attribut

  • return: TRUE on error
  • access: private
bool xGetArrayMastersSlavesAndTAttribut (resource $r_db_res,  &$r_result, [string $p_generate_input_name = false], [bool $p_load_image_array = false], [false $cupr_pmo_id_exist = false], array $r_result)
  • resource $r_db_res
  • array $r_result
  • string $p_generate_input_name
  • bool $p_load_image_array
  • false $cupr_pmo_id_exist
  • &$r_result
xGetListPmaIdAloneWithSlavesTAttributByRayIdAndOrWord (line 1221)

Get a product with slaves attribut

  • return: TRUE on error
  • access: private
bool xGetListPmaIdAloneWithSlavesTAttributByRayIdAndOrWord (integer $p_page_id, string $p_word, string $p_action_method,  &$r_result, [integer $p_limit_start = 0], [integer $p_limit_count = 0], [string $p_order_by = "title_asc"], array $r_result)
  • integer $p_page_id
  • string $p_word
  • string $p_action_method
  • array $r_result
  • integer $p_limit_start
  • integer $p_limit_count
  • string $p_order_by
  • &$r_result
xGetMinAvgMaxPrix (line 1010)

Get min, average, max price for a product

  • return: TRUE on error
bool xGetMinAvgMaxPrix (integer $p_pma_id,  &$r_min,  &$r_avg,  &$r_max, flaot $r_min, float $r_avg, float $r_max)
  • integer $p_pma_id
  • flaot $r_min
  • float $r_avg
  • float $r_max
  • &$r_min
  • &$r_avg
  • &$r_max
_check (line 1777)

Check integrity

  • return: TRUE on error
bool _check ( &$r_resut_final, array $r_resut_final)
  • array $r_resut_final
  • &$r_resut_final

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