Add Shipping Method to Shipping Invoice

  • Posts: 51
  • Thank you received: 0
11 years 7 months ago #97479

Hello,

We are currently offering two different shipping methods; UPS or Manual/House Delivery. We would like the Shipping Methods to display on the Shipping Invoice. I understand that the oldinvoice.php file can be modified, but I'm not really that proficient in PHP and was hoping to get some pointers. Or, to find someone who would be interested in working on those modifications for, or with us.

I can see that both invoice.php and oldinvoice.php have code to only print the Shipping Method line when the user choices the regular invoice and not the Shipping Invoice with this code:

<?php
if($this->invoice_type=='full'){
echo JText::_('INVOICE');
}else{
echo JText::_('SHIPPING_INVOICE');
}
?>

and this:

<?php if(!empty($this->shipping)){
echo JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$this->shipping->getName($this->order->order_shipping_method,$this->order->order_shipping_id).'<br/>';
}?>

I'm not sure how to modify that to print the Shipping Method in the Shipping Invoice. Can anyone help?

Thanks!

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

  • Posts: 82761
  • Thank you received: 13348
  • MODERATOR
11 years 7 months ago #97585

Hi,

You would have to add the line:
<?php } if(true){
before:
<?php if(!empty($this->shipping)){
in the invoice file of the order view.

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

  • Posts: 51
  • Thank you received: 0
11 years 6 months ago #98438

So now I have this:

<td>
<?php } if(true){
<?php if(!empty($this->shipping)){
echo JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$this->shipping->getName($this->order->order_shipping_method,$this->order->order_shipping_id).'<br/>';
}?>
<?php if(!empty($this->payment)){
echo JText::_('HIKASHOP_PAYMENT_METHOD').' : '.$this->payment->getName($this->order->order_payment_method,$this->order->order_payment_id);
}?>

</td>

And am receiving the following error:

Parse error: syntax error, unexpected '<' in /home/phickman/public_html/urbanashes/partners/administrator/templates/bluestork/html/com_hikashop/order/invoice.php on line 409

Did that tag you gave me need to be closed? And, if so where and how?

Thanking you in advance for your patience! (I know enough code to sometimes see what is supposed to be happening, but not enough to debug.)

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #98499

Hi,

Thanks to try that code:

<td>
<?php } if(true){ ?>
<?php if(!empty($this->shipping)){
echo JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$this->shipping->getName($this->order->order_shipping_method,$this->order->order_shipping_id).'<br/>';
}?>
<?php if(!empty($this->payment)){
echo JText::_('HIKASHOP_PAYMENT_METHOD').' : '.$this->payment->getName($this->order->order_payment_method,$this->order->order_payment_id);
}?>

</td>

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

Time to create page: 0.056 seconds
Powered by Kunena Forum