Custom Fields in (shipping) invoice
13 years 5 days ago #124405
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Re: Custom Fields in (shipping) invoice
Hi,
Displaying the shipping method name is not very easy.
For HikaShop 2.2.2, we introduce new email design with a lot of new improvements, like the product images, the display of shipping and payment methods, a responsive mail and many other cool things.
But HikaShop 2.2.2 is not yet release ; we are working hard to make a release as soon as possible. We want to publish it before the end of this month.
It is possible to display the shipping method name in the email but it require to "import" code from the order view (in the backend).
Where "$this->getShippingName" is this function
With some PHP and development knowledge, you can transpose this code to work in the current email system.
But if you can wait a little, I can assure you that the new email system is really cool
Regards,
Displaying the shipping method name is not very easy.
For HikaShop 2.2.2, we introduce new email design with a lot of new improvements, like the product images, the display of shipping and payment methods, a responsive mail and many other cool things.
But HikaShop 2.2.2 is not yet release ; we are working hard to make a release as soon as possible. We want to publish it before the end of this month.
It is possible to display the shipping method name in the email but it require to "import" code from the order view (in the backend).
Code:
if(empty($this->order->order_shipping_method) && empty($this->order->shippings)) {
echo '- <em>'.JText::_('NONE').'</em>';
} else if(!empty($this->order->order_shipping_method)) {
if(!is_numeric($this->order->order_shipping_id)){
$shipping_name = $this->getShippingName($this->order->order_shipping_method, $this->order->order_shipping_id);
echo ' - ' . $shipping_name;
}else{
$shipping = $this->shippingClass->get($this->order->order_shipping_id);
echo ' - ' . $shipping->shipping_name;
}
} else {
// Multi shipping display
}
Code:
function getShippingName($shipping_method, $shipping_id) {
$shipping_name = $shipping_method . ' ' . $shipping_id;
if(strpos($shipping_id, '-') !== false) {
$shipping_ids = explode('-', $shipping_id, 2);
$shipping = $this->shippingClass->get($shipping_ids[0]);
if(!empty($shipping->shipping_params) && is_string($shipping->shipping_params))
$shipping->shipping_params = unserialize($shipping->shipping_params);
$shippingMethod = hikashop_import('hikashopshipping', $shipping_method);
$methods = $shippingMethod->shippingMethods($shipping);
if(isset($methods[$shipping_id])){
$shipping_name = $shipping->shipping_name.' - '.$methods[$shipping_id];
}else{
$shipping_name = $shipping_id;
}
}
return $shipping_name;
}
But if you can wait a little, I can assure you that the new email system is really cool
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
13 years 4 days ago #124455
by Poltoo
Replied by Poltoo on topic Re: Custom Fields in (shipping) invoice
Hey Bro, thanks a lot for your help...but i dint understand anything 
However, I guess I will just wait for the release...do you have a release date yet?

However, I guess I will just wait for the release...do you have a release date yet?
Please Log in or Create an account to join the conversation.
13 years 4 days ago #124511
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Re: Custom Fields in (shipping) invoice
Hi,
During next week. We want to release it before the end of the month.
Regards,
During next week. We want to release it before the end of the month.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
12 years 11 months ago #125798
by Poltoo
Replied by Poltoo on topic Re: Custom Fields in (shipping) invoice
Hey Jerome, any update on the release?
Please Log in or Create an account to join the conversation.
12 years 11 months ago #125854
by Xavier
Replied by Xavier on topic Re: Custom Fields in (shipping) invoice
Hi,
You can download the latest version from our website.
You can download the latest version from our website.
Please Log in or Create an account to join the conversation.
12 years 11 months ago #126123
by Poltoo
Replied by Poltoo on topic Re: Custom Fields in (shipping) invoice
Hey Xavier,
I just updated my Hikashop Essential to 2.2.2 Ver. But how do I show the shipping & payment method in the invoices now? I was looking through it, but couldnt find a relevant option. Is it something in the front end or I need to enter some code somewhere?
I just updated my Hikashop Essential to 2.2.2 Ver. But how do I show the shipping & payment method in the invoices now? I was looking through it, but couldnt find a relevant option. Is it something in the front end or I need to enter some code somewhere?
Please Log in or Create an account to join the conversation.
12 years 11 months ago #126193
by Xavier
Replied by Xavier on topic Re: Custom Fields in (shipping) invoice
Hi,
The shipping method name should be displayed in the emails and in the invoices.
If it is not the case, that's probably because you have a view override somewhere, thanks to remove the customization via the menu Display > Views.
The shipping method name should be displayed in the emails and in the invoices.
If it is not the case, that's probably because you have a view override somewhere, thanks to remove the customization via the menu Display > Views.
Please Log in or Create an account to join the conversation.
Time to create page: 0.199 seconds