- Posts: 105
- Thank you received: 8
own edit/view for delivery note
9 months 2 weeks ago - 9 months 2 weeks ago #369699
by Rusty
own edit/view for delivery note was created 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
-- 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.
9 months 1 week ago #369701
by nicolas
Replied by nicolas on topic own edit/view for delivery note
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:
That way, you now have two different override files, one for the invoice, one for the delivery note, and you can modify them independently.
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;
}
?>
Please Log in or Create an account to join the conversation.
9 months 1 week ago #369706
by Rusty
Replied by Rusty on topic own edit/view for delivery note
Hi nicolas!
Thanks for your reply. But what, if I use the pdf plugin?
Cheers
Rusty
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.
9 months 1 week ago #369707
by nicolas
Replied by nicolas on topic own edit/view for delivery note
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:
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