List of shipping method

  • Posts: 23
  • Thank you received: 1
6 years 4 months ago #281745

-- 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.

  • Posts: 12953
  • Thank you received: 1778
6 years 4 months ago #281751

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.

  • Posts: 23
  • Thank you received: 1
6 years 4 months ago #281927

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: 6 years 4 months ago by plnabais.

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

Time to create page: 0.073 seconds
Powered by Kunena Forum