View Single Post
  #24  
Old 04-15-2015, 04:47 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Adding Images to the Invoice

Quote:
Originally Posted by minfinger
I'm trying to get the image load on the General Info Tab on when you look at the order information. You originally said:


And that's what I was trying to do. I was asking your opinion before I tried the code.

Thanks for the explanation, Michael. Now your idea is clear to me.

Your code should look as follows:
PHP Code:
namespace XLite\Module\FasterThanYours\ImagesOnGeneralInfoTab\View;

class 
OrderItem extends \XLite\View\ItemsList\Model\OrderItem implements \XLite\Base\IDecorator
{
    protected function 
defineColumns()
    {
        
$return parent::defineColumns();

        
$return += array(
            
'image' => array(
                static::
COLUMN_NAME     => 'Image',
                static::
COLUMN_ORDERBY  => 100,
            ),
        );
    }


Because, you only need to add one more field to an array returned by defineColumns() method, not to overwrite this array completely.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote