2016-08-16 12 views
-3

私はprestashop adminで作業しています。行ヘッダiin製品を変更できません。親切にも私のために適切なソリューションを提供します。 controllers/admin/AdminProductsController.phpprestashopを使用して製品のRowHeadersを変更する方法

あなたは見つけるでしょう__construct()関数内:使用言語とデータベースは、PHP-MySQLの

答えて

1

あなたはあなたが見つけるの製品ページのヘッダーを変更するために必要なすべてです。コンテンツの

:ヘッダの

$this->_select .= 'shop.`name` AS `shopname`, a.`id_shop_default`, '; 
    $this->_select .= $alias_image.'.`id_image` AS `id_image`, cl.`name` AS `name_category`, '.$alias.'.`price`, 0 AS `price_final`, a.`is_virtual`, pd.`nb_downloadable`, sav.`quantity` AS `sav_quantity`, '.$alias.'.`active`, IF(sav.`quantity`<=0, 1, 0) AS `badge_danger`'; 

:もちろん

$this->fields_list = array(); 
    $this->fields_list['id_product'] = array(
     'title' => $this->l('ID'), 
     'align' => 'center', 
     'class' => 'fixed-width-xs', 
     'type' => 'int' 
    ); 
    $this->fields_list['image'] = array(
     'title' => $this->l('Image'), 
     'align' => 'center', 
     'image' => 'p', 
     'orderby' => false, 
     'filter' => false, 
     'search' => false 
    ); 
    $this->fields_list['name'] = array(
     'title' => $this->l('Name'), 
     'filter_key' => 'b!name' 
    ); 
    $this->fields_list['reference'] = array(
     'title' => $this->l('Reference'), 
     'align' => 'left', 
    ); 

    if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) { 
     $this->fields_list['shopname'] = array(
      'title' => $this->l('Default shop'), 
      'filter_key' => 'shop!name', 
     ); 
    } else { 
     $this->fields_list['name_category'] = array(
      'title' => $this->l('Category'), 
      'filter_key' => 'cl!name', 
     ); 
    } 
    $this->fields_list['price'] = array(
     'title' => $this->l('Base price'), 
     'type' => 'price', 
     'align' => 'text-right', 
     'filter_key' => 'a!price' 
    ); 
    $this->fields_list['price_final'] = array(
     'title' => $this->l('Final price'), 
     'type' => 'price', 
     'align' => 'text-right', 
     'havingFilter' => true, 
     'orderby' => false, 
     'search' => false 
    ); 

    if (Configuration::get('PS_STOCK_MANAGEMENT')) { 
     $this->fields_list['sav_quantity'] = array(
      'title' => $this->l('Quantity'), 
      'type' => 'int', 
      'align' => 'text-right', 
      'filter_key' => 'sav!quantity', 
      'orderby' => true, 
      'badge_danger' => true, 
      //'hint' => $this->l('This is the quantity available in the current shop/group.'), 
     ); 
    } 

    $this->fields_list['active'] = array(
     'title' => $this->l('Status'), 
     'active' => 'status', 
     'filter_key' => $alias.'!active', 
     'align' => 'text-center', 
     'type' => 'bool', 
     'class' => 'fixed-width-sm', 
     'orderby' => false 
    ); 

それは練習がでオーバーライドファイルの再生が最適です:もう一度

controllers/admin/AdminProductsController.php 
+0

、使用してアドバイスしてくださいそれを上書きする。 –

+0

私は、ありがとう –

関連する問題