Author Topic: Help: Reordering the columns of the product table  (Read 3339 times)

pierreaz

  • Beginner
  • *
  • Posts: 4
Help: Reordering the columns of the product table
« on: May 16, 2009, 17:53:17 pm »
Hi there.

I need to reorder the columns of the product table. I need to have the price column as the last column.

Thank you.

pierreaz

  • Beginner
  • *
  • Posts: 4
Re: Help: Reordering the columns of the product table
« Reply #1 on: May 18, 2009, 11:15:39 am »
in themes->default->browse->includes->browse_listtable.tpl

i have changed:
// Table header
$tableheader[] = $VM_LANG->_('PHPSHOP_CART_NAME');
$tableheader[] = $VM_LANG->_('PHPSHOP_CART_SKU');
if( _SHOW_PRICES && $auth['show_prices'] ) {
   $tableheader[] = $VM_LANG->_('PHPSHOP_CART_PRICE');
}
$tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_FORM_THUMB_IMAGE');
$tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_DESC_TITLE');
if( _SHOW_PRICES && $auth['show_prices'] && USE_AS_CATALOGUE != '1' ) {
   $tableheader[] = $VM_LANG->_('PHPSHOP_CART_ACTION');
}


to:



// Table header
$tableheader[] = $VM_LANG->_('PHPSHOP_CART_NAME');
$tableheader[] = $VM_LANG->_('PHPSHOP_CART_SKU');
$tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_FORM_THUMB_IMAGE');
$tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_DESC_TITLE');
if( _SHOW_PRICES && $auth['show_prices'] ) {
   $tableheader[] = $VM_LANG->_('PHPSHOP_CART_PRICE');
}
if( _SHOW_PRICES && $auth['show_prices'] && USE_AS_CATALOGUE != '1' ) {
   $tableheader[] = $VM_LANG->_('PHPSHOP_CART_ACTION');
}


and:

// Using this we make all the variables available in the template
         // translated example: $this->set( 'product_name', $product_name );
         $this->set( $attr, $val );
      }
      
      $data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'.$product['product_name'].'</a>';
      $data[$row][] = $product['product_sku'];
      if( _SHOW_PRICES && $auth['show_prices'] ) {
         $data[$row][] = $product['product_price'];
      }
      $data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
                  . ps_product::image_tag( $product['product_thumb_image'] )
                  . '</a>';
      $data[$row][] = $product['product_s_desc'];
      if( $product['has_addtocart'] ) {
         $data[$row][] = $product['form_addtocart'];
      }


to:


// Using this we make all the variables available in the template
         // translated example: $this->set( 'product_name', $product_name );
         $this->set( $attr, $val );
      }
      
      $data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'.$product['product_name'].'</a>';
      $data[$row][] = $product['product_sku'];
      $data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
                  . ps_product::image_tag( $product['product_thumb_image'] )
                  . '</a>';
      $data[$row][] = $product['product_s_desc'];
      if( _SHOW_PRICES && $auth['show_prices'] ) {
         $data[$row][] = $product['product_price'];
      }
      if( $product['has_addtocart'] ) {
         $data[$row][] = $product['form_addtocart'];
      }


and the result is that i have the columns with the prices shift just before the  buy button in the table.

marvays

  • Jr. Member
  • **
  • Posts: 319
    • richta.cz
  • Skype Name: marvays
Re: Help: Reordering the columns of the product table
« Reply #2 on: October 14, 2010, 13:00:36 pm »
hi. it is good. i try it and this working. so . . .  i need one change.

when I click on the image to see the big picture, not the details of the product. I managed this. But I can not choose to be opened in such detail over function Shadowbox :(