- Posts: 53
- Thank you received: 2
Wrong shipping name on the show order page
11 years 10 months ago - 11 years 10 months ago #178111
by otx
Wrong shipping name on the show order page was created by otx
-- 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):
How can i display the shipping company name? (order_shipping_name doesn't work)
-- 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):
Code:
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: 11 years 10 months ago by otx.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 10 months ago #178115
by Mohamed Thelji
Replied by Mohamed Thelji on topic Wrong shipping name on the show order page
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 ?
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.
11 years 10 months ago - 11 years 10 months ago #178230
by otx
Replied by otx on topic Wrong shipping name on the show order page
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
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: 11 years 10 months ago by otx.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 10 months ago #178315
by Mohamed Thelji
Replied by Mohamed Thelji on topic Wrong shipping name on the show order page
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.
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.
11 years 10 months ago - 11 years 10 months ago #178442
by otx
Replied by otx on topic Wrong shipping name on the show order page
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
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
Last edit: 11 years 10 months ago by otx.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 10 months ago #178522
by Mohamed Thelji
Replied by Mohamed Thelji on topic Wrong shipping name on the show order page
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 :
By :
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 :
Code:
<?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/>';
}?>
Code:
<?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.
11 years 10 months ago #178629
by otx
Replied by otx on topic Wrong shipping name on the show order page
Hello,
Thank you! Now I have the shipping name, as it should be.
Regards,
Dezso
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.232 seconds