desc_base Class Reference

Description product. More...

Inherits AbstractProduct, and InterfaceModule.

List of all members.

Public Member Functions

Static Public Attributes


Detailed Description

Description product.

Definition at line 13 of file desc_base.php.


Constructor & Destructor Documentation

desc_base::__construct ( page = ''  ) 
Parameters:
$page 

Definition at line 31 of file desc_base.php.

00031                                 {
00032     global $page;
00033     $this->code = __CLASS__;
00034     $this->title = __('desc base text title');
00035     $this->description = __('description produit dans la page produit');
00036     $this->sort_order = (defined('MODULE_ACAPRO_DESC_BASE_SORT_ORDER')) ? MODULE_ACAPRO_DESC_BASE_SORT_ORDER : 0 ;
00037     $this->enabled = true;
00038 
00039     if(!is_object($page))  return null;
00040     $this->language_id=$page->the_var('languages_id');
00041   }


Member Function Documentation

desc_base::check (  ) 

implements InterfaceModule depend

Definition at line 92 of file desc_base.php.

00092 {}

desc_base::display_view ( pID,
class = '' 
)

display

Parameters:
$pID int product id
$class null

Reimplemented from AbstractProduct.

Definition at line 78 of file desc_base.php.

00078                                               {
00079     $this->load_db_values((int)$pID);
00080 
00081     self::$products_description= $this->content['products_description'];
00082     self::$products_url= $this->content['products_url'];
00083 
00084     $v=$this->content;
00085     $v['title']=__('tab products desc base');
00086     $v['content']=tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__), false, true);
00087 
00088     return array(new objectInfo($v));
00089   }

desc_base::get_header ( action = ''  ) 
Parameters:
$action 

calcu des images présente et ajout dans la pile des produits

Reimplemented from AbstractProduct.

Definition at line 47 of file desc_base.php.

00047                                  {
00048     global $page;
00049     $this->pID=(int)$_GET['products_id'];
00050     $this->load_db_values((int)$this->pID);
00052     $c=explode('<img',$this->content['products_description']);
00053     foreach($c as $l){
00054       if( (preg_match_all('/src=.([a-zA-Z0-9.:\/_-]*)/i', strip_tags($l) , $match)) !=false){
00055         $lg=strlen(HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES);
00056         $img=substr($match[1][0], ( (substr($match[1][0],0, $lg)==HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES) ? $lg :strlen(DIR_WS_IMAGES) ) );
00057         if(!in_array( $img,$page->product->pile_img)) $page->product->pile_img[]=$img;
00058       }
00059     }
00060   }

desc_base::install (  ) 

Definition at line 93 of file desc_base.php.

00093 {}

desc_base::keys (  ) 

Definition at line 95 of file desc_base.php.

00095 {}

desc_base::load_db_values ( pID  ) 

load db for id

Parameters:
unknown_type $pID

Reimplemented from AbstractProduct.

Definition at line 67 of file desc_base.php.

Referenced by display_view(), and get_header().

00067                                       {
00068     $DB=Database::getInstance();
00069     $product_query = $DB->query("select pd.products_id, pd.language_id, pd.products_name , pd.products_description,pd.products_url from  " . TABLE_PRODUCTS_DESCRIPTION . " pd where  pd.products_id= '" . $pID . "' and language_id='".$this->language_id."' ");
00070     $this->content=$product_query->fetchAssoc();
00071   }

desc_base::remove (  ) 

Definition at line 94 of file desc_base.php.

00094 {}


Member Data Documentation

desc_base::$products_description [static]

Var access in .gab.

Definition at line 20 of file desc_base.php.

desc_base::$products_url [static]

Definition at line 25 of file desc_base.php.


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