Customise the Tax Invoice

  • Posts: 73
  • Thank you received: 0
11 years 4 months ago #111830

Would you be able to give me some help with customising the way the products are presented on the tax invoice?

At the moment, my tax invoice is extremely spread out and so prints on multiple pages. It's also quite hard to read.

I would like to do the following:

1. But a line break between the country and email address in the BILLING ADDRESS

2. Put 3 or 4 blank spaces between the product name and the sku (but keep them on the same line)

3. Remove the two pricing amounts in the product column

4. Remove the names of the product characteristics.

5. Put the characteristics variants names on the same line with 3 or 4 blank spaces between them.

These changes will compress the product information onto 2 lines, be much easier to read and will format the invoice so that when there are multiple products it's no longer printed on several pages.

(One small note, since saving the attached graphics I have changed the product option names to be much shorter i.e. instead of "T-Shirt or Hoodie?" ... it now says "Item" So it is not essential to remove the names of the product characteristics, if this is difficult. I'm happy for it to read: Item: Hoodie Size: X-Large Colour: Black)

Attached are images of how my invoice appears now and how I would like it to look. If you could guide me through making these changes I would very much appreciate it.

Thank you so much.

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
11 years 4 months ago #111877

Hi,
You'll be able to edit the display of your invoice by editing the invoice file of your order view of your back-end template. However some php skill will be required.

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

  • Posts: 73
  • Thank you received: 0
11 years 4 months ago #111884

Yes, I'm well aware of what the file is. What I asked for is your help with the code to make the invoice look right.

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

  • Posts: 82758
  • Thank you received: 13346
  • MODERATOR
11 years 4 months ago #112146

Hi,

1. You can edit the file "address_template" of your backend and simply add a <br/> tag between the country and email address tags.

2. The product code is not displayed. So I guess that you already added it yourself. Simply add a few spaces before that code and that will do it.

3. You can remove the code:

if($this->config->get('price_with_tax')){
													echo ' '.$this->currencyHelper->format($product->order_product_price+$product->order_product_tax,$this->order->order_currency_id);
												}else{
													echo ' '.$this->currencyHelper->format($product->order_product_price,$this->order->order_currency_id);
												}
and the code:
if($this->config->get('price_with_tax')){
																	echo ' ( + '.$this->currencyHelper->format($optionElement->order_product_price+$optionElement->order_product_tax,$this->order->order_currency_id).' )';
																}else{
																	echo ' ( + '.$this->currencyHelper->format($optionElement->order_product_price,$this->order->order_currency_id).' )';
																}

4. You can replace the line:
echo $optionElement->order_product_name;

by:
$name = explode(':',$optionElement->order_product_name,2);
echo array_pop($name);

5. change:
<p class="hikashop_order_option_name">
into:
<p class="hikashop_order_option_name" style="display:inline;">

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

Time to create page: 0.067 seconds
Powered by Kunena Forum