- Posts: 23
- Thank you received: 1
List of shipping method
8 years 11 months ago #281745
by plnabais
List of shipping method was created by plnabais
-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.8.1
-- PHP version -- : 7.0
-- Browser(s) name and version -- : Chrome Version 61.0.3163.100 (Official Build) (64-bit)
I'am changing the listing order view in the backend to include the shipping methods, How do I access to the shipping_name of the oject shipping in each row?
I want to do the same of the payment to the shippments.
<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>
-- Joomla version -- : 3.8.1
-- PHP version -- : 7.0
-- Browser(s) name and version -- : Chrome Version 61.0.3163.100 (Official Build) (64-bit)
I'am changing the listing order view in the backend to include the shipping methods, How do I access to the shipping_name of the oject shipping in each row?
I want to do the same of the payment to the shippments.
<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>
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
8 years 11 months ago #281751
by Mohamed Thelji
Replied by Mohamed Thelji on topic List of shipping method
Hello,
You'll actually have to see what you have on the "$row" PHP object, but using the "$row->order_shipping_method" variable will probably do the job.
You'll actually have to see what you have on the "$row" PHP object, but using the "$row->order_shipping_method" variable will probably do the job.
Please Log in or Create an account to join the conversation.
8 years 11 months ago - 8 years 11 months ago #281927
by plnabais
Replied by plnabais on topic List of shipping method
Thank you Mohamed Thelji but the "$row->order_shipping_method" give me the type of the plugin used, my solutuion was :
$shippingClass = hikashop_get('class.shipping');
$gshipping= $shippingClass->get($row->order_shipping_id);
echo $gshipping->shipping_name;
$shippingClass = hikashop_get('class.shipping');
$gshipping= $shippingClass->get($row->order_shipping_id);
echo $gshipping->shipping_name;
Last edit: 8 years 11 months ago by plnabais.
Please Log in or Create an account to join the conversation.
Time to create page: 0.198 seconds