Skip to main content

List of shipping method

More
8 years 11 months ago #281745 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>

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #281751 by Mohamed Thelji
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.

Please Log in or Create an account to join the conversation.

More
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;
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
Powered by Kunena Forum