Wrong shipping name on the show order page

  • Posts: 53
  • Thank you received: 2
10 years 3 weeks ago #178111

-- url of the page with the problem -- : dev.vitaking.ro/
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.10
-- Browser(s) name and version -- : Firefox 33

Hi,

I have 'manual 5' displayed on the show order page instead of the name of the shipping company.
This is the code which gives the wrong result (order/show.php):

echo JText::_('HIKASHOP_SHIPPING_METHOD').' : ';
if(is_string($this->order->order_shipping_method))
	echo $this->shippingClass->getShippingName($this->order->order_shipping_method, $this->order->order_shipping_id);
else 
	echo implode(', ', $this->order->order_shipping_method);

How can i display the shipping company name? (order_shipping_name doesn't work)

Last edit: 10 years 3 weeks ago by otx.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 2 weeks ago #178115

Hello,
When you talk about the "shipping company name" are you refering to the value that you have set through the "name" field of your shipping configuration field ?

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

  • Posts: 53
  • Thank you received: 2
10 years 2 weeks ago #178230

Hello,

Exactly. I have 'Cargus Courier' for the name, but all I get is 'manual 5'. The payment was set the same way, but that's works. I am talking about the page wich displays one order from the orders list. When someone placing the order it works.

Regards,
Dezso

Last edit: 10 years 2 weeks ago by otx.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 2 weeks ago #178315

Hello,
Can you show me through some screenshots what the "show order page" that you are talking about and how did you had access to it so that I can test it myself.

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

  • Posts: 53
  • Thank you received: 2
10 years 2 weeks ago #178442

Hello,

Here they are:

This is the order list, I think you can display this page in two ways. You can create a menu item with Hikashop-Customer orders, or with Hikashop-User control panel and from there you have again the Customer orders.



And this one is the order itself.



You can have this page if you click on one of the order numbers from the previous list.
This is a custom one with stamp and all kind of modifications in order to meet the Romanian legislation requirements. But just above the stamp and signature we have this two lines:

Metoda de expediere : manual 5
Metoda de plata : Ramburs

The first one is the shipping method, and the second one the payment. The payment method displays the name of the payment, wich is OK, but the shipping method displays the shipping type and id, not the name, wich would be 'Cargus'. You have the code wich produces this in my previous post.

This is the screenshot with the table structure:



I hope you have all the informations you need, let me know if you need anything else!

Regards,
Dezso

Attachments:
Last edit: 10 years 2 weeks ago by otx.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 2 weeks ago #178522

Hello Dezso,
The solution will be to directly edit the "Show" file of the "Order" View of your front-end template via "Hikashop->Display->Views" and change these lines :

<?php if(!empty($this->shipping)){
        echo JText::_('HIKASHOP_SHIPPING_METHOD').' : ';
        if(is_string($this->order->order_shipping_method))
        echo $this->shippingClass->getShippingName($this->order->order_shipping_method, $this->order->order_shipping_id);
        else
          echo implode(', ', $this->order->order_shipping_method);
        echo '<br/>';
      }?>
By :
<?php if(!empty($this->shipping)){
        echo JText::_('HIKASHOP_SHIPPING_METHOD').' : ';
        if(is_string($this->order->order_shipping_method))
        //echo $this->shippingClass->getShippingName($this->order->order_shipping_method, $this->order->order_shipping_id);
          echo $this->shippingClass->get($this->order->order_shipping_id)->shipping_name;
        else
          echo implode(', ', $this->order->order_shipping_method);
        echo '<br/>';
      }?>

The following user(s) said Thank You: otx

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

  • Posts: 53
  • Thank you received: 2
10 years 2 weeks ago #178629

Hello,

Thank you! Now I have the shipping name, as it should be.

Regards,
Dezso

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

Time to create page: 0.090 seconds
Powered by Kunena Forum