Hi Nicolas,
When I click on the order number in the administration list, it returns me to the order list again, only in the case where there is no product assigned in the order
Yes these are the changes that I have made.
On /mysite/administrator/components/com_hikashop/views/order/view.html.php
1.-
The original code:
$searchMap = array('c.id','c.username','c.name','a.user_email','b.order_user_id','b.order_number','b.order_id','b.order_invoice_number','b.order_invoice_id','b.order_full_price','d.address_firstname','d.address_lastname');
The midified code:
$searchMap = array('c.id','c.username','c.name','a.user_email','b.order_user_id','b.order_number','b.order_id','b.order_invoice_id','b.order_full_price','d.address_firstname','d.address_lastname','p.order_product_code');
2.-
The original code is:
$query = ' FROM '.hikashop_table('order').' AS b '.
' LEFT JOIN '.hikashop_table('address').' AS d ON b.order_billing_address_id = d.address_id '.
' LEFT JOIN '.hikashop_table('user').' AS a ON b.order_user_id=a.user_id '.
' LEFT JOIN '.hikashop_table('users',false).' AS c ON a.user_cms_id = c.id ' .
implode(' ', $tables) . ' ' . $filters . $order;
$database->setQuery('SELECT a.*,b.*,c.*,d.*'.$query, (int)$pageInfo->limit->start, (int)$pageInfo->limit->value);
The modified code is:
$query = ' FROM '.hikashop_table('order').' AS b '.
' LEFT JOIN '.hikashop_table('address').' AS d ON b.order_billing_address_id = d.address_id '.
' LEFT JOIN '.hikashop_table('user').' AS a ON b.order_user_id=a.user_id '.
' LEFT JOIN '.hikashop_table('users',false).' AS c ON a.user_cms_id = c.id ' .
' LEFT JOIN '.hikashop_table('order_product').' AS p ON b.order_id = p.order_id' .
implode(' ', $tables) . ' ' . $filters . $order;
$database->setQuery('SELECT a.*,b.*,c.*,d.*,p.*'.$query, (int)$pageInfo->limit->start, (int)$pageInfo->limit->value);
3.-
The original code is:
$searchMap = array(
'j_user.id',
'j_user.username',
'j_user.name',
'hk_user.user_email',
'hk_order.order_user_id',
'hk_order.order_id',
'hk_order.order_full_price'
);
The modified code is:
$searchMap = array(
'j_user.id',
'j_user.username',
'j_user.name',
'hk_user.user_email',
'hk_order.order_user_id',
'hk_order.order_id',
'hk_order.order_full_price',
'hk_order.order_product_code'
);
___
In HikaShop > Display > Views, edit the view "order / listing"
1.-
The Original code:
<th class="hikashop_order_number_title title">
<?php echo JHTML::_('grid.sort', JText::_('ORDER_NUMBER'), 'b.order_number', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
<br/>
<?php echo JHTML::_('grid.sort', JText::_('INVOICE_NUMBER'), 'b.order_invoice_number', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
</th>
The midified code:
<th class="hikashop_order_number_title title">
<?php echo JHTML::_('grid.sort', JText::_('ORDER_NUMBER'), 'b.order_number', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
<br/>
</th>
2.-
The original code:
<th class="hikashop_order_payment_title title">
<?php echo JHTML::_('grid.sort', JText::_('PAYMENT_METHOD'), 'b.order_payment_method', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
</th>
The midified code:
<th class="hikashop_order_payment_title title">
<?php echo JHTML::_('grid.sort', JText::_('Código'), 'b.order_payment_method', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
</th>
3.-
The original code:
<th class="hikashop_order_id_title title">
<?php echo JHTML::_('grid.sort', JText::_( 'ID' ), 'b.order_id', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
</th>
The modified code:
<th class="hikashop_order_id_title title">
<?php echo JHTML::_('grid.sort', JText::_( 'Teléfono' ), 'b.order_id', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
</th>
<th class="hikashop_order_id_title title">
<?php echo JHTML::_('grid.sort', JText::_( 'DNI' ), 'b.order_id', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
</th>
Thanks very much
4.-
The original code:
<?php if(!empty($row->order_invoice_number)) {
if($this->manage){ ?>
<a title="<?php echo JText::_('INVOICE_NUMBER'); ?>" href="<?php echo hikashop_completeLink('order&task=edit&cid[]='.$row->order_id.'&cancel_redirect='.urlencode(base64_encode(hikashop_completeLink('order')))).$target; ?>">
<?php } ?>
<?php echo '<br/>'.$row->order_invoice_number; ?>
<?php if($this->manage){ ?>
The modified code:
<?php if(!empty($row->order_invoice_number)) {
if($this->manage){ ?>
<a title="<?php echo JText::_('INVOICE_NUMBER'); ?>" href="<?php echo hikashop_completeLink('order&task=edit&cid[]='.$row->order_id.'&cancel_redirect='.urlencode(base64_encode(hikashop_completeLink('order')))).$target; ?>">
<?php } ?>
<?php if($this->manage){ ?>
5.-
The original code:
<td class="hikashop_order_payment_value">
<?php if(!empty($row->order_payment_method)){
if(!empty($this->payments[$row->order_payment_id])){
echo $this->payments[$row->order_payment_id]->payment_name;
}elseif(!empty($this->payments[$row->order_payment_method])){
echo $this->payments[$row->order_payment_method]->payment_name;
}else{
echo $row->order_payment_method;
}
} ?>
</td>
The modified code:
<td class="hikashop_order_payment_value">
<?php echo $row->order_product_code; ?>
</td>
6.-
The original code:
<td class="hikashop_order_id_value">
<?php echo $row->order_id; ?>
</td>
The modified code:
<td class="hikashop_order_id_value">
<?php echo $row->address_telephone; ?>
</td>
<td class="hikashop_order_id_value">
<?php echo $row->username; ?>
</td>