1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 4487

Show
Ignore:
Timestamp:
06/26/12 12:45:27 (11 months ago)
Author:
oscim
Message:

coquille lors de la suppression d'un article

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/catalog/admin/includes/modules/pages/products.php

    r4482 r4487  
    230230                                                                                                                                'text'=>__('products table heading manufacturers'), 
    231231                                                                                                                                'width'=>'12%', 
    232                                                                                                                                 'default'=>true, 
    233232                                                                                                        ); 
    234233                        } 
     
    248247                                                                                                                                'text'=>__('products table heading featured'), 
    249248                                                                                                                                'width'=>'12%', 
    250                                                                                                                                 'default'=>true, 
    251249                                                                                                        ); 
    252250                        } 
     
    265263                                                                                                                                'text'=>__('products table heading price'), 
    266264                                                                                                        ); 
    267  
    268 /** 
    269         TODO A revoir , appel des sub modules  
    270 */ 
    271                 if(tep_cst_define('MODULE_ACAPRO_SPECIAL_SORT_ORDER'))  
    272                                 self::$allfields['s.specials_new_products_price']= array( 
    273                                                                                                                                         'sort'=>false, 
    274                                                                                                                                         'alias'=>'sprice', 
    275                                                                                                                                         'text'=>__('@specials products table heading special price'), 
    276                                                                                                                 );  
     265/* 
     266                        self::$allfields['p.products_price']= array( 
     267                                                                                                                                'sort'=>false, 
     268                                                                                                                                'alias'=>'price_ttx', 
     269                                                                                                                                'text'=>__('products table heading price taxe'), 
     270                                                                                                        ); */ 
    277271 
    278272                        self::$allfields['p.products_tax_class_id']= array( 
     
    479473                                $list_type .=$key.','; 
    480474                else{ 
    481                 $allcats = tep_get_status_array('product'); 
     475                        $allcats = categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$new_languages_id , 'exclude'=>array('0'))); 
    482476                        foreach($allcats as $row) 
    483477                                $list_type .=$row['id'].','; 
     
    715709 
    716710                        case 'delete_product_confirm': 
    717                                 if (isset($_POST['products_id']) && isset($_POST['product_categories']) && is_array($_POST['product_categories'])) { 
     711 
     712                                if (isset($_POST['products_id']) /*&& isset($_POST['product_categories']) && is_array($_POST['product_categories'])*/ ) { 
    718713                                        $product_id = tep_db_prepare_input($_POST['products_id']); 
    719                                         $product_categories = $_POST['product_categories']; 
     714                                        $product_categories = (array)@$_POST['product_categories']; 
    720715 
    721716                                        sqlproduct::delete(array('id'=>$product_id, 'catarray'=>$product_categories ) ); 
     
    907902 
    908903    $action=self::$action; 
    909  
     904// var_dump($action); 
    910905    switch ($action) { 
    911906                        case 'detail': 
     
    978973                                } 
    979974 
    980                 /** 
    981                         TODO A revoir , appel des sub modules  
    982                 */ 
    983                                 if(tep_cst_define('MODULE_ACAPRO_SPECIAL_SORT_ORDER'))  
    984                                         $query_raw .=   " LEFT JOIN " . TABLE_SPECIALS . " s ON( s.products_id =p.products_id AND s.status > 0) "; 
    985  
    986  
    987975                                $query_raw .=((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : ''). 
    988976                                                                " GROUP BY  p.products_id ". 
     
    10191007                        */ 
    10201008      case 'delete': 
     1009                                self::GetDBValue(); 
    10211010      case 'copy_to': 
    10221011      case 'new': 
     
    12111200                                        $ord  =array(); 
    12121201 
    1213                                         if( DataTypes::is_active('categorie')) { 
     1202                                        if( ! DataTypes::is_active('categorie')) { 
    12141203                                                /// complete cats list 
    12151204                                                $objres=$DB->query("SELECT categories_name FROM " . TABLE_CATEGORIES . " c,  " . TABLE_CATEGORIES_DESCRIPTION . " cd , " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c    WHERE c.categories_id=cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' AND c.categories_id=p2c.categories_id and products_id='".$item['id']."' AND c.categories_id <> '".$item['categories_id']."' "); 
     
    12221211                                        } 
    12231212 
    1224                                         if( DataTypes::is_active('featured')) { 
    1225                                                 /// complete featured list 
     1213                                        if( ! DataTypes::is_active('featured')) { 
     1214                                                /// complete cats list 
    12261215//                                              $objres=$DB->query("SELECT categories_name FROM " . TABLE_FEATURED . " f,  " . TABLE_CATEGORIES_DESCRIPTION . " cd , " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c    WHERE c.categories_id=cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' AND c.categories_id=p2c.categories_id and products_id='".$item['id']."' AND c.categories_id <> '".$item['categories_id']."' "); 
    12271216//                                              $rescat=$objres->fetchAllAssoc(); 
     
    12391228                                        foreach(self::$InitInfo['modele']['listing'] as $k=>$row){ 
    12401229                                                if($k == 'action') $ord[$k]=self::ButtonRowsActions($item); 
    1241                                                 elseif($k == 'title') $ord[$k]= '<a rel="'.tep_href_link('document.php', 'mod=img&amp;typ=product&amp;w=200&amp;h=200&amp;id='.$item['id']) .'" class="screenshot" href="'.tep_href_link(self::FILENAME).'" title="">'.$item['title'].'</a>'; 
     1230                                                elseif($k == 'title') $ord[$k]= '<a rel="'.tep_href_link('document.php', 'mod=img&amp;typ=product&amp;w=200&amp;h=200&amp;id='.$item['id']) .'" class="screenshot" href="#" title="">'.$item['title'].'</a>'; 
    12421231                                                elseif($k == 'status') $ord[$k]=self::RowStatus($item); 
    12431232//                                              elseif($k == 'hidden') $ord[$k]=self::RowHidden($item);