PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Data Fields
Product Class Reference

Public Member Functions

 Product ($id, $product_infos=null, $user_only_product_infos=false, $lang=null, $show_all_etat_if_admin=true, $vat_applicable=true, $show_all=false)
 Product::Product() More...
 
 set_configuration ($color_id=null, $size_id=null, $attributs_list=null, $reseller_mode=false, $format_attribut_description_for_database=false)
 Définit la configuration du produit, en tenant compte du statut revendeur ou non de l'utilisateur afin de stocker les bonnes valeurs dans configuration_size_price_ht et configuration_total_original_price_attributs_ht format_attribut_description_for_database est défini pour distinguer le cas où l'on veut sauvegarder dans la bdd ou pas. More...
 
 get_product_url ($add_get_suffixe=false, $html_encode=false)
 Product::get_product_url() More...
 
 get_color ()
 Product::get_color() More...
 
 get_possible_colors ()
 Product::get_possible_colors() More...
 
 get_size ($return_mode= 'name', $user_promotion_percentage=0, $with_taxes=true, $reseller_mode=false, $format=false, $add_tax_type_text=false)
 Product::get_size() More...
 
 get_possible_sizes ($return_mode= 'name', $user_promotion_percentage=0, $with_taxes=true, $reseller_mode=false, $format=false, $add_tax_type_text=false)
 Product::get_possible_sizes() More...
 
 get_possible_attributs ($return_mode= 'name', $get_configuration_results_only=false, $user_promotion_percentage=0, $with_taxes=true, $reseller_mode=false, $format=false, $add_tax_type_text=false, $get_attributes_with_multiple_options_only=true, $get_attributes_with_single_options_only=false, $filter_technical_code=null)
 Product::get_possible_attributs() More...
 
 get_product_references ()
 Product::get_product_references() More...
 
 get_product_brands ($return_array=true)
 Product::get_product_brands() More...
 
 get_product_options ()
 Product::get_product_options() More...
 
 get_product_main_picture ($display_pdf=false, $force_id_couleur=null)
 Check if a picture or a pdf exist in peel_produit_color and peel_produit and returns the first image file name if no picture for this product, it return 'false'. More...
 
 get_product_pictures ($display_pdf=false, $force_id_couleur=null, $only_return_first_picture=false)
 Check if pictures or pdf files exist in peel_produit_color and peel_produit and returns the array of these file names if no picture for this product, it return 'false'. More...
 
 get_supplier_price ($with_taxes=true, $format=false, $add_tax_type_text=false, $add_ecotax=true, $quantity=1)
 Product::get_supplier_price() More...
 
 get_original_price ($with_taxes=true, $reseller_mode=false, $format=false, $add_tax_type_text=false, $add_ecotax=true, $get_price_for_this_configuration=true, $quantity=1, $prices_whole_site_rebate_percentage=true)
 Product::get_original_price() More...
 
 get_final_price ($user_promotion_percentage=0, $with_taxes=true, $reseller_mode=false, $format=false, $add_tax_type_text=false, $quantity=1, $add_ecotax=true, $get_price_for_this_configuration=true, $add_rdfa_properties=false, $quantity_all_products_in_category=null)
 Prix final après application des réductions diverses, pour la quantité demandée (on renvoie le prix total, et non pas le prix unitaire) More...
 
 is_price_flash ($reseller_mode=false)
 Product::is_price_flash() More...
 
 is_code_promo_applicable ($id_categorie, $product_filter, &$found_cat, $cat_not_apply_code_promo=null)
 is_code_promo_applicable() More...
 
 get_promotion_by_product_filter ($reseller_mode=false)
 Récupère une éventuelle réduction définie dans la table code promo, avec nom vide (pour application automatique) et une définition de filtre produit, qui s'applique automatiquement en fonction du texte dans la référence et la description. More...
 
 get_promotion_by_user_offer ($quantity=1)
 Product::get_promotion_by_user_offer() More...
 
 get_all_promotions_percentage ($reseller_mode=false, $user_promotion_percentage=0, $format=false, $quantity=1, $quantity_all_products_in_category=null)
 Product::get_all_promotions_percentage() More...
 
 get_ecotax ($with_taxes=true)
 Product::get_ecotax() More...
 
 affiche_prix ($with_taxes=true, $reseller_mode=false, $return_mode=false, $display_with_measurement=false, $item_id=null, $display_ecotax=true, $display_old_price=true, $table_css_class= 'full_width', $display_old_price_inline=true, $add_rdfa_properties=false, $force_display_with_vat_symbol=null, $display_minimal_price=null)
 Product::affiche_prix() More...
 
 format_prices ($value_without_taxes, $with_taxes=true, $ecotax_quantity=1, $format=false, $add_tax_type_text=false, $add_rdfa_properties=false)
 Product::format_prices() More...
 
 get_supplier_name ()
 Retoune le nom du fournisseur connaissant son id. More...
 
 get_product_stock_state ($product_stock_infos=null)
 Renvoie l'état du stock pour ce produit sous forme de HTML. More...
 
 get_possible_categories ()
 Product::get_possible_categories() More...
 
 get_count_opinion ()
 permet de savoir le nombre d'avis pour le produit More...
 
 qrcode_image_src ()
 Récupère une image avec le QRCode. More...
 
 barcode_image_src ()
 Récupère une image avec le code barre au format EAN13. More...
 
 get_minimal_price ()
 Retourne le prix d'appel du produit, toutes réductions inclue. More...
 

Data Fields

 $id = null
 
 $technical_code = null
 
 $name = null
 
 $descriptif = null
 
 $description = null
 
 $meta_titre = null
 
 $meta_desc = null
 
 $meta_key = null
 
 $lang = null
 
 $poids = null
 
 $volume = null
 
 $position = null
 
 $display_price_by_weight = null
 
 $prix_barre = null
 
 $prix_barre_ht = null
 
 $prix = null
 
 $prix_ht = null
 
 $prix_achat = null
 
 $reference = null
 
 $ean_code = null
 
 $etat = null
 
 $on_estimate = null
 
 $prix_revendeur = null
 
 $promotion = null
 
 $prix_promo = null
 
 $tva = null
 
 $points = null
 
 $default_image = null
 
 $image1 = null
 
 $image2 = null
 
 $image3 = null
 
 $image4 = null
 
 $image5 = null
 
 $image6 = null
 
 $image7 = null
 
 $image8 = null
 
 $image9 = null
 
 $image10 = null
 
 $image11 = null
 
 $image12 = null
 
 $image13 = null
 
 $image14 = null
 
 $image15 = null
 
 $image16 = null
 
 $image17 = null
 
 $image18 = null
 
 $image19 = null
 
 $image20 = null
 
 $image21 = null
 
 $image22 = null
 
 $image23 = null
 
 $image24 = null
 
 $image25 = null
 
 $image26 = null
 
 $image27 = null
 
 $image28 = null
 
 $image29 = null
 
 $image30 = null
 
 $zip = null
 
 $youtube_code = null
 
 $on_stock = null
 
 $comments = null
 
 $delai_stock = null
 
 $etat_stock = null
 
 $affiche_stock = null
 
 $on_special = null
 
 $on_rupture = null
 
 $on_flash = null
 
 $on_gift = null
 
 $on_gift_points = null
 
 $flash_start = null
 
 $flash_end = null
 
 $prix_flash = null
 
 $extrait = null
 
 $on_download = null
 
 $on_check = null
 
 $on_reseller = null
 
 $id_marque = null
 
 $default_color_id = null
 
 $display_tab = null
 
 $categorie_id = null
 
 $categorie = null
 
 $id_ecotaxe = null
 
 $ecotaxe_ttc = null
 
 $ecotaxe_ht = null
 
 $configuration_color_id = null
 
 $configuration_size_id = null
 
 $configuration_attributs_list = ""
 
 $configuration_total_original_price_attributs_ht = 0
 
 $configuration_attributs_description = ""
 
 $configuration_size_name = ""
 
 $configuration_overweight = null
 
 $configuration_size_price_ht = 0
 
 $id_utilisateur = null
 
 $vat_applicable = null
 
 $extra_link = null
 
 $unit_per_pallet = null
 
 $conditionnement = null
 
 $categorie_sentence_displayed_on_product = null
 
 $date_maj = null
 
 $attributes_with_single_options_array = null
 
 $paiement = null
 

Detailed Description

Definition at line 28 of file Product.php.

Member Function Documentation

affiche_prix (   $with_taxes = true,
  $reseller_mode = false,
  $return_mode = false,
  $display_with_measurement = false,
  $item_id = null,
  $display_ecotax = true,
  $display_old_price = true,
  $table_css_class = 'full_width',
  $display_old_price_inline = true,
  $add_rdfa_properties = false,
  $force_display_with_vat_symbol = null,
  $display_minimal_price = null 
)

Product::affiche_prix()

Parameters
boolean$with_taxes
boolean$reseller_mode
boolean$return_mode
boolean$display_with_measurement
integer$item_id
boolean$display_ecotax
boolean$display_old_price
string$table_css_class
boolean$display_old_price_inline
Returns

Definition at line 1126 of file Product.php.

barcode_image_src ( )

Récupère une image avec le code barre au format EAN13.

Returns

Definition at line 1266 of file Product.php.

format_prices (   $value_without_taxes,
  $with_taxes = true,
  $ecotax_quantity = 1,
  $format = false,
  $add_tax_type_text = false,
  $add_rdfa_properties = false 
)

Product::format_prices()

Parameters
float$value_without_taxes
boolean$with_taxes
integer$ecotax_quantity
boolean$format
boolean$add_tax_type_text
boolean$add_rdfa_properties
Returns

Definition at line 1148 of file Product.php.

get_all_promotions_percentage (   $reseller_mode = false,
  $user_promotion_percentage = 0,
  $format = false,
  $quantity = 1,
  $quantity_all_products_in_category = null 
)

Product::get_all_promotions_percentage()

Parameters
boolean$reseller_mode
integer$user_promotion_percentage
boolean$format
integer$quantity
integer$quantity_all_products_in_category
Returns

Definition at line 1013 of file Product.php.

get_color ( )

Product::get_color()

Returns

Definition at line 424 of file Product.php.

get_count_opinion ( )

permet de savoir le nombre d'avis pour le produit

Returns

Definition at line 1242 of file Product.php.

get_ecotax (   $with_taxes = true)

Product::get_ecotax()

Parameters
boolean$with_taxes
Returns

Definition at line 1103 of file Product.php.

get_final_price (   $user_promotion_percentage = 0,
  $with_taxes = true,
  $reseller_mode = false,
  $format = false,
  $add_tax_type_text = false,
  $quantity = 1,
  $add_ecotax = true,
  $get_price_for_this_configuration = true,
  $add_rdfa_properties = false,
  $quantity_all_products_in_category = null 
)

Prix final après application des réductions diverses, pour la quantité demandée (on renvoie le prix total, et non pas le prix unitaire)

Parameters
integer$user_promotion_percentage
boolean$with_taxes
boolean$reseller_mode
boolean$format
boolean$add_tax_type_text
integer$quantity
boolean$add_ecotax
boolean$get_price_for_this_configuration
boolean$add_rdfa_properties
integer$quantity_all_products_in_category
Returns

Definition at line 817 of file Product.php.

get_minimal_price ( )

Retourne le prix d'appel du produit, toutes réductions inclue.

Returns

Definition at line 1279 of file Product.php.

get_original_price (   $with_taxes = true,
  $reseller_mode = false,
  $format = false,
  $add_tax_type_text = false,
  $add_ecotax = true,
  $get_price_for_this_configuration = true,
  $quantity = 1,
  $prices_whole_site_rebate_percentage = true 
)

Product::get_original_price()

Parameters
boolean$with_taxes
boolean$reseller_mode
boolean$format
boolean$add_tax_type_text
boolean$add_ecotax
boolean$get_price_for_this_configuration
integer$quantity
Returns

Definition at line 782 of file Product.php.

get_possible_attributs (   $return_mode = 'name',
  $get_configuration_results_only = false,
  $user_promotion_percentage = 0,
  $with_taxes = true,
  $reseller_mode = false,
  $format = false,
  $add_tax_type_text = false,
  $get_attributes_with_multiple_options_only = true,
  $get_attributes_with_single_options_only = false,
  $filter_technical_code = null 
)

Product::get_possible_attributs()

Parameters
string$return_modeValues allowed : 'infos', 'rough', 'option_name', 'full_name'
boolean$get_configuration_results_only
integer$user_promotion_percentage
boolean$with_taxes
boolean$reseller_mode
boolean$format
boolean$add_tax_type_text
boolean$get_attributes_with_multiple_options_only
boolean$get_attributes_with_single_options_only
string$filter_technical_code
Returns

Definition at line 549 of file Product.php.

get_possible_categories ( )

Product::get_possible_categories()

Returns

Definition at line 1223 of file Product.php.

get_possible_colors ( )

Product::get_possible_colors()

Returns

Definition at line 439 of file Product.php.

get_possible_sizes (   $return_mode = 'name',
  $user_promotion_percentage = 0,
  $with_taxes = true,
  $reseller_mode = false,
  $format = false,
  $add_tax_type_text = false 
)

Product::get_possible_sizes()

Parameters
string$return_mode
integer$user_promotion_percentage
boolean$with_taxes
boolean$reseller_mode
boolean$format
boolean$add_tax_type_text
Returns

Definition at line 490 of file Product.php.

get_product_brands (   $return_array = true)

Product::get_product_brands()

Parameters
integer$return_array
Returns

Definition at line 611 of file Product.php.

get_product_main_picture (   $display_pdf = false,
  $force_id_couleur = null 
)

Check if a picture or a pdf exist in peel_produit_color and peel_produit and returns the first image file name if no picture for this product, it return 'false'.

Parameters
boolean$display_pdf
integer$force_id_couleur
Returns

Definition at line 652 of file Product.php.

get_product_options ( )

Product::get_product_options()

Returns

Definition at line 639 of file Product.php.

get_product_pictures (   $display_pdf = false,
  $force_id_couleur = null,
  $only_return_first_picture = false 
)

Check if pictures or pdf files exist in peel_produit_color and peel_produit and returns the array of these file names if no picture for this product, it return 'false'.

Parameters
boolean$display_pdf
integer$force_id_couleur
boolean$only_return_first_picture
Returns

Definition at line 670 of file Product.php.

get_product_references ( )

Product::get_product_references()

Returns

Definition at line 592 of file Product.php.

get_product_stock_state (   $product_stock_infos = null)

Renvoie l'état du stock pour ce produit sous forme de HTML.

Parameters
array$product_stock_infos
Returns

Definition at line 1206 of file Product.php.

get_product_url (   $add_get_suffixe = false,
  $html_encode = false 
)

Product::get_product_url()

Parameters
boolean$add_get_suffixe
boolean$html_encode
Returns

Definition at line 384 of file Product.php.

get_promotion_by_product_filter (   $reseller_mode = false)

Récupère une éventuelle réduction définie dans la table code promo, avec nom vide (pour application automatique) et une définition de filtre produit, qui s'applique automatiquement en fonction du texte dans la référence et la description.

Parameters
boolean$reseller_mode
Returns

Definition at line 947 of file Product.php.

get_promotion_by_user_offer (   $quantity = 1)

Product::get_promotion_by_user_offer()

Parameters
integer$quantity
Returns

Definition at line 968 of file Product.php.

get_size (   $return_mode = 'name',
  $user_promotion_percentage = 0,
  $with_taxes = true,
  $reseller_mode = false,
  $format = false,
  $add_tax_type_text = false 
)

Product::get_size()

Parameters
string$return_mode
integer$user_promotion_percentage
boolean$with_taxes
boolean$reseller_mode
boolean$format
boolean$add_tax_type_text
Returns

Definition at line 469 of file Product.php.

get_supplier_name ( )

Retoune le nom du fournisseur connaissant son id.

Returns

Definition at line 1190 of file Product.php.

get_supplier_price (   $with_taxes = true,
  $format = false,
  $add_tax_type_text = false,
  $add_ecotax = true,
  $quantity = 1 
)

Product::get_supplier_price()

Parameters
boolean$with_taxes
boolean$format
boolean$add_tax_type_text
boolean$add_ecotax
integer$quantity
Returns

Definition at line 760 of file Product.php.

is_code_promo_applicable (   $id_categorie,
  $product_filter,
$found_cat,
  $cat_not_apply_code_promo = null 
)

is_code_promo_applicable()

Parameters
integer$id_categorie
string$product_filter
boolean$found_cat
Returns

Definition at line 906 of file Product.php.

is_price_flash (   $reseller_mode = false)

Product::is_price_flash()

Parameters
boolean$reseller_mode
Returns

Definition at line 893 of file Product.php.

Product (   $id,
  $product_infos = null,
  $user_only_product_infos = false,
  $lang = null,
  $show_all_etat_if_admin = true,
  $vat_applicable = true,
  $show_all = false 
)

Product::Product()

Parameters
integer$idId ou code technique (si code technique et qu'il n'est pas unique en BDD, on prend le premier produit trouvé avec ce code)
array$product_infos
boolean$user_only_product_infos
string$lang
boolean$show_all_etat_if_admin
boolean$vat_applicable

Definition at line 146 of file Product.php.

qrcode_image_src ( )

Récupère une image avec le QRCode.

Returns

Definition at line 1256 of file Product.php.

set_configuration (   $color_id = null,
  $size_id = null,
  $attributs_list = null,
  $reseller_mode = false,
  $format_attribut_description_for_database = false 
)

Définit la configuration du produit, en tenant compte du statut revendeur ou non de l'utilisateur afin de stocker les bonnes valeurs dans configuration_size_price_ht et configuration_total_original_price_attributs_ht format_attribut_description_for_database est défini pour distinguer le cas où l'on veut sauvegarder dans la bdd ou pas.

Parameters
integer$color_id
integer$size_id
mixed$attributs_list
boolean$reseller_mode
boolean$format_attribut_description_for_database
Returns

Definition at line 362 of file Product.php.

Field Documentation

$affiche_stock = null

Definition at line 94 of file Product.php.

$attributes_with_single_options_array = null

Definition at line 134 of file Product.php.

$categorie = null

Definition at line 113 of file Product.php.

$categorie_id = null

Definition at line 111 of file Product.php.

$categorie_sentence_displayed_on_product = null

Definition at line 132 of file Product.php.

$comments = null

Definition at line 91 of file Product.php.

$conditionnement = null

Definition at line 131 of file Product.php.

$configuration_attributs_description = ""

Definition at line 122 of file Product.php.

$configuration_attributs_list = ""

Definition at line 120 of file Product.php.

$configuration_color_id = null

Definition at line 118 of file Product.php.

$configuration_overweight = null

Definition at line 124 of file Product.php.

$configuration_size_id = null

Definition at line 119 of file Product.php.

$configuration_size_name = ""

Definition at line 123 of file Product.php.

$configuration_size_price_ht = 0

Definition at line 125 of file Product.php.

$configuration_total_original_price_attributs_ht = 0

Definition at line 121 of file Product.php.

$date_maj = null

Definition at line 133 of file Product.php.

$default_color_id = null

Definition at line 108 of file Product.php.

$default_image = null

Definition at line 57 of file Product.php.

$delai_stock = null

Definition at line 92 of file Product.php.

$descriptif = null

Definition at line 32 of file Product.php.

$description = null

Definition at line 33 of file Product.php.

$display_price_by_weight = null

Definition at line 41 of file Product.php.

$display_tab = null

Definition at line 109 of file Product.php.

$ean_code = null

Definition at line 48 of file Product.php.

$ecotaxe_ht = null

Definition at line 116 of file Product.php.

$ecotaxe_ttc = null

Definition at line 115 of file Product.php.

$etat = null

Definition at line 49 of file Product.php.

$etat_stock = null

Definition at line 93 of file Product.php.

$extra_link = null

Definition at line 129 of file Product.php.

$extrait = null

Definition at line 103 of file Product.php.

$flash_end = null

Definition at line 101 of file Product.php.

$flash_start = null

Definition at line 100 of file Product.php.

$id = null

Definition at line 29 of file Product.php.

$id_ecotaxe = null

Definition at line 114 of file Product.php.

$id_marque = null

Definition at line 107 of file Product.php.

$id_utilisateur = null

Definition at line 127 of file Product.php.

$image1 = null

Definition at line 58 of file Product.php.

$image10 = null

Definition at line 67 of file Product.php.

$image11 = null

Definition at line 68 of file Product.php.

$image12 = null

Definition at line 69 of file Product.php.

$image13 = null

Definition at line 70 of file Product.php.

$image14 = null

Definition at line 71 of file Product.php.

$image15 = null

Definition at line 72 of file Product.php.

$image16 = null

Definition at line 73 of file Product.php.

$image17 = null

Definition at line 74 of file Product.php.

$image18 = null

Definition at line 75 of file Product.php.

$image19 = null

Definition at line 76 of file Product.php.

$image2 = null

Definition at line 59 of file Product.php.

$image20 = null

Definition at line 77 of file Product.php.

$image21 = null

Definition at line 78 of file Product.php.

$image22 = null

Definition at line 79 of file Product.php.

$image23 = null

Definition at line 80 of file Product.php.

$image24 = null

Definition at line 81 of file Product.php.

$image25 = null

Definition at line 82 of file Product.php.

$image26 = null

Definition at line 83 of file Product.php.

$image27 = null

Definition at line 84 of file Product.php.

$image28 = null

Definition at line 85 of file Product.php.

$image29 = null

Definition at line 86 of file Product.php.

$image3 = null

Definition at line 60 of file Product.php.

$image30 = null

Definition at line 87 of file Product.php.

$image4 = null

Definition at line 61 of file Product.php.

$image5 = null

Definition at line 62 of file Product.php.

$image6 = null

Definition at line 63 of file Product.php.

$image7 = null

Definition at line 64 of file Product.php.

$image8 = null

Definition at line 65 of file Product.php.

$image9 = null

Definition at line 66 of file Product.php.

$lang = null

Definition at line 37 of file Product.php.

$meta_desc = null

Definition at line 35 of file Product.php.

$meta_key = null

Definition at line 36 of file Product.php.

$meta_titre = null

Definition at line 34 of file Product.php.

$name = null

Definition at line 31 of file Product.php.

$on_check = null

Definition at line 105 of file Product.php.

$on_download = null

Definition at line 104 of file Product.php.

$on_estimate = null

Definition at line 50 of file Product.php.

$on_flash = null

Definition at line 97 of file Product.php.

$on_gift = null

Definition at line 98 of file Product.php.

$on_gift_points = null

Definition at line 99 of file Product.php.

$on_reseller = null

Definition at line 106 of file Product.php.

$on_rupture = null

Definition at line 96 of file Product.php.

$on_special = null

Definition at line 95 of file Product.php.

$on_stock = null

Definition at line 90 of file Product.php.

$paiement = null

Definition at line 135 of file Product.php.

$poids = null

Definition at line 38 of file Product.php.

$points = null

Definition at line 56 of file Product.php.

$position = null

Definition at line 40 of file Product.php.

$prix = null

Definition at line 44 of file Product.php.

$prix_achat = null

Definition at line 46 of file Product.php.

$prix_barre = null

Definition at line 42 of file Product.php.

$prix_barre_ht = null

Definition at line 43 of file Product.php.

$prix_flash = null

Definition at line 102 of file Product.php.

$prix_ht = null

Definition at line 45 of file Product.php.

$prix_promo = null

Definition at line 54 of file Product.php.

$prix_revendeur = null

Definition at line 52 of file Product.php.

$promotion = null

Definition at line 53 of file Product.php.

$reference = null

Definition at line 47 of file Product.php.

$technical_code = null

Definition at line 30 of file Product.php.

$tva = null

Definition at line 55 of file Product.php.

$unit_per_pallet = null

Definition at line 130 of file Product.php.

$vat_applicable = null

Definition at line 128 of file Product.php.

$volume = null

Definition at line 39 of file Product.php.

$youtube_code = null

Definition at line 89 of file Product.php.

$zip = null

Definition at line 88 of file Product.php.


The documentation for this class was generated from the following file:

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:43 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.