Display Additional Information in Shipping Invoice

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #152545

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.3.0 Business
-- Joomla version -- : 3.2
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi,

When I print the Invoice, it has all the necessary information including Additional Information (i.e. Delivery Date & Delivery Time Slot), which I created in the "Custom Fields" (Screenshot 1).

How can I display this "Additional Information" in the Shipping Invoice to be printed? Currently, it only shows the Delivery Address & Product List, besides the basic details (Screenshot 2).

Thanks.




Kevin

Last edit: 10 years 6 months ago by kevintan192.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #152552

Hi,

You have to edit the view "order / invoice" in the backend template via the hikashop menu Display > Views.
There is if conditions on the shipping or not invoice, juste remove it at the desired places.

hikashop.com/support/support/documentati...ize-the-display.html

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #152643

Hi Xavier,

Thanks for your help.

I have found the file. I'm not familiar with PHP, so I need your clarification.
I think I need to delete if($this->invoice_type=='full'){ in Line 377, and if(!empty($fields)){ in Line 381. (Screen Shot 1)
Am I correct?

And one more thing.
If I want to add the Company's name above the store address in the Invoice & Shipping Invoice, I can insert this line of code <?php echo "Company Name"; ?> before <?php echo $this->store_address; ?>



in Line 46 (Screen Shot 2). Is that correct?

Last edit: 10 years 5 months ago by kevintan192.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #152654

Hi,

You just need to delete if($this->invoice_type=='full'){ in Line 377.
And yes you can add the code <?php echo "The 1819 Creamery"; ?> before the place you indicate.

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #152786

Hi Xavier,

Ok, thanks very much for your help.

I'll make the changes, & see how it goes.

Best regards.




Kevin

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #152923

Hi Xavier,

I have tried making the changes according to your instructions.

However, after saving the changes in the backend's order / invoice file, I found that the Invoice & Shipping Invoice were displayed as blank pages. (Screen Shot A & Screen Shot B)

When I changed the script back to the original and saved the file, the same blank pages are displayed.

It's only when I clicked on the trash bin icon under the "Remove Customization" column, that the Invoice & Shipping Invoice are displayed in their original form.

Did I miss out something?

Regards.




Kevin



Attachments:

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
10 years 7 months ago #152935

Hi,

This indicates that the changes you made are not valid and create a fatal error.
Turn on the debug mode and error reporting options of the joomla configuration and try again. That will display an error message explaining where the error is.

Then, provide a screenshot of the code your modified (with the code around as well so that we can see what you did) and we should be able to tell you what's wrong.

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #153046

Hi Nicolas,

Thanks for your response.

I turned on the debug mode & error reporting as you have instructed. This is the file I edited:



First, I add this: <?php echo "Company Name";?> in Line 46, to display the company name above the store address in the Invoice & Shipping Invoice:



Then, I deleted this: if(<$this->invoice_type=='full'){ in Line 378:



So it becomes this:



There was no error messages displayed, but the problem from my previous message was still there.
Where did I go wrong?

Regards.




Kevin

Last edit: 10 years 5 months ago by kevintan192.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #153050

Hi,

There is a "}" which need to be removed, to avoid this problem, thanks to put the following code at the place of the removed if condition.

if(true){

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #153176

Hi Xavier,

Thanks for your help.

I did not remove the"}" because there are 2 of them (one in Line 372 & another in Line 399.
So, I only added if(true){ in Line 378 to replace the deleted line of code.

Now the Invoice & Shipping Invoice issue is solved!

Thanks again to all you support personnel for your help. Really appreciate it.

Cheers!




Kevin

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

Time to create page: 0.108 seconds
Powered by Kunena Forum