| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Add columns to order list | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Add columns to order list
I need to create module which adds columns to order list in admin area.
As I see with webmaster kit template for order list is admin/en/items_list/model/table/body.tpl This template uses function getColumns() but my problem is there is no getColumns() function in templates viewer class XLite\View\ItemsList\Model\Order\Admin\Search. Tell me please how can I override this function in my Module, do I need to create new viewer in my module class which extends XLite\View\ItemsList\Model\Order\Admin\Search or whatever and where is getColumns() method is coded?
__________________
Version 4.4.4 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Add columns to order list
getColumns() method comes from the \XLite\View\ItemsList\Model\Table class through inheritance (check what classes "extend" to understand methods they inherit).
You should look into the defineColumns() method as this is the method that... err... defines columns You can override this method from your module and change what columns the page displays.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Add columns to order list
Now I see that I must change defineColumns() method in XLite\View\ItemsList\Model\Order\Admin\Search class. Here is its code
PHP Code:
As u see I added delivery_type column, it adds a column to order list. But why it does not add a content to column which is located in admin/en/modules/Romas/NewOrder/delivery_type.tpl?
__________________
Version 4.4.4 |
|||||||
#4
|
|||||||
|
|||||||
Re: Add columns to order list
I found a solution:
I need to add to delibery type field static::COLUMN_TEMPLATE => '/modules/Romas/NewOrder/delivery_type.tpl', not static::COLUMN_TEMPLATE => 'admin/en/modules/Romas/NewOrder/delivery_type.tpl',
__________________
X-Cart Gold Plus 4.5.4 |
|||||||
|
#5
|
|||||||||
|
|||||||||
Re: Add columns to order list
Quote:
You should not use 'Delivery type' as the key for the array. Please use 'deliveryType' instead.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|