Skip to main content

own edit/view for delivery note

More
9 months 2 weeks ago - 9 months 2 weeks ago #369699 by Rusty
-- HikaShop version -- : 6.1.1
-- Joomla version -- : 5.4.1
-- PHP version -- : 8.4

Hi!

I am currently trying to change some aspects of the visual rendering of the delivery note. My goal is to make a few changes: the position of the address, the position and size of the logo image, information directly after the product table, and so on. It is extremely complicated to make changes without affecting the standard display of the invoice (with prices). I find it very inconvenient and risky that both displays are generated from a shared view. Could you please provide a separate view for the delivery note? But, if I'm wrong, please correct me - I assume that the view "invoice.php" is the right view for the delivery note (shipping invoice).

Cheers
Rusty
Last edit: 9 months 2 weeks ago by Rusty.

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

More
9 months 1 week ago #369701 by nicolas
Hi,

You can do that.
First, make an override for the view via the menu Display>Views.
I suppose we're talking about the delivery note available by HikaShop without the PDF invoice plugin installed.
In that case, it's the view file order / invoice.
It will generate a file administrator/atum/html/com_hikashop/order/invoice.php for the override.
Copy this file to the same folder with another name via FTP.
For example administrator/atum/html/com_hikashop/order/delivery_note.php
Then, in your override, you can add at the beginning such code:
Code:
<?php if($this->invoice_type != 'full') { require __DIR__.'/delivery_note.php'; return; } ?>
That way, you now have two different override files, one for the invoice, one for the delivery note, and you can modify them independently.

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

More
9 months 1 week ago #369706 by Rusty
Hi nicolas!

Thanks for your reply. But what, if I use the pdf plugin? :-)

Cheers
Rusty

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

More
9 months 1 week ago #369707 by nicolas
Hi,

You can do something similar with the view file pdf_layout / invoice.php (or another layout based on the one you selected in the plugin settings).
In this case, the overrides are stored in media/com_hikashop/plugins/ instead of administrator/atum/html/com_hikashop/order/ and the code should be adapted to something like this:
Code:
<?php if($this->shipping_invoice){ require __DIR__.'/delivery_note.php'; return; } ?>
The following user(s) said Thank You: Rusty

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

Time to create page: 0.187 seconds
Powered by Kunena Forum