- Posts: 73
- Thank you received: 0
Change the way the product appears on invoices
- shamrockshirts
-
Topic Author
- Offline
Because I have used the copy feature when adding new products (because I have so many characteristics) the invoice is showing all the copy functions.
Could you please tell me how to fix this? I need it only to show the item title, and each characteristic title. (eg. for the image attached it should show only "Ford Falcon AU: Mens T-Shirt 5XL Red")
It is also ESSENTIAL that the sku of the parent product is shown.
This is stopping any orders from being shipped so I really need this fixed urgently.
Thanks
Please Log in or Create an account to join the conversation.
To reduce the name, try to edit the view "order / invoice" and you can edit it too in the view "order / listing", views are in HikaShop > Display > Views.
Please Log in or Create an account to join the conversation.
- shamrockshirts
-
Topic Author
- Offline
- Posts: 73
- Thank you received: 0
.' '.$product->order_product_code
from the Display>Views>Order forms and invoice files in BOTH your template and the administrator templates. Just changing it in your template won't work.
Xavier, could you also help me with adding two things? I would like the sku of the parent product to show on the invoice. Is this possible without it showing all the previous codes of the characteristics as well?
Also, I have tried adding my logo to the invoice by following instructions I've read in other posts, but no matter where I try to put it, I can't get it to work. Could you tell me exactly where I need to put the code for the image?
And lastly, I would like to remove the two lines at the bottom of the invoice which say
please select a shipping method: regular post
please select a payment method: credit card
Thanks for your help.
Please Log in or Create an account to join the conversation.
1. You would have to use such code:
$class = hikashop_get('class.product');
$productData = $class->get($product->product_id);
if($productData->product_type=="variant") $productData = $class->get($productData->product_parent_id);
echo $productData->product_code;
2. You can simply add the HTML tag of your image in the file "invoice" of the view "order" for your backend template. Something like that:
<img src=" www.website.com/mylogo.png " />
3. You can remove these lines in the same view file:
Please Log in or Create an account to join the conversation.
- shamrockshirts
-
Topic Author
- Offline
- Posts: 73
- Thank you received: 0
1. I have the product code showing correctly now, however it has the text "hikashop product class" before it. How do I remove that text?
2. Could you please tell me EXACTLY where to place the code for the image, because, as I said earlier, no matter where I put it I can't get it to work.
I need two other items to show on the invoice:
3. The order number (preferrably to show directly under the invoice number)
4. The customer's email address.
Please Log in or Create an account to join the conversation.
2. Almost anywhere in the file should be ok.
You can add it at the beginning for example and the logo will display at the top.
You can add it before <h1 style="text-align:center"> and that will add it before the "invoice" title.
It depends where you want to display your logo, so I can't give you the exact place...
3.
You can add:
<?php echo $this->element->order_number; ?>
before:
4. You can add:
<?php echo $this->element->customer->user_email; ?>
Please Log in or Create an account to join the conversation.
- shamrockshirts
-
Topic Author
- Offline
- Posts: 73
- Thank you received: 0
Also, I've tried putting my logo in the exact place you gave me, and although you say almost anywhere in the file will be okay, it STILL doesn't work.
Here's my code, please tell me how to fix these problems. This is now an extremely urgent matter, I have a huge promotion running in 16 hours time.
Thanks in advance.
Please Log in or Create an account to join the conversation.
For the logo, the link used is absolute or relative ? Because you have to use an absolute on. ( domain.com/folder/file.extension )
Please Log in or Create an account to join the conversation.
- shamrockshirts
-
Topic Author
- Offline
- Posts: 73
- Thank you received: 0
The product name and the product id are displayed on the same line, one directly after the other.
I would like to put a line break in after the product name, so the product id is displayed on the next line under the name.
I'm not sure exactly where in the code to put the line break. I've tried a few places but I can't get it to work. Could you help?
Thanks
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
I think that replacing the code that Xavier gave you by this will probably do the job :
Please Log in or Create an account to join the conversation.
- shamrockshirts
-
Topic Author
- Offline
- Posts: 73
- Thank you received: 0
One last question, then I'm all finished with my invoice.
Is it possible to display both the Billing Address and the Shipping Address?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
- shamrockshirts
-
Topic Author
- Offline
- Posts: 73
- Thank you received: 0
I've only ever had one address shown on my tax invoices, but it's entirely possible that no one has ever entered a different shipping address.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
- shamrockshirts
-
Topic Author
- Offline
- Posts: 73
- Thank you received: 0
Can I add that code in so that the shipping address is shown? If so, where do I put it?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
- shamrockshirts
-
Topic Author
- Offline
- Posts: 73
- Thank you received: 0
So, that code is in both the order/invoice file for both templates, and the shipping address still doesn't show.
Is there anything else I can try? I can't give you access to the website as it's a live site and against our policy to allow 3rd party access. Sorry.
Please Log in or Create an account to join the conversation.
I suppose that you don't have any shipping method.
In that case, you can change the line:
if(!empty($this->element->order_shipping_id) && !empty($this->element->shipping_address)){
to:
if(!empty($this->element->shipping_address)){
in the invoice view file to force its display.
Please Log in or Create an account to join the conversation.
- shamrockshirts
-
Topic Author
- Offline
- Posts: 73
- Thank you received: 0
I replaced the code as instructed. The shipping address box is now showing on the invoice, but unfortunately there is no address inside it.
Please Log in or Create an account to join the conversation.
Are you sure you have a shipping address for this order?
Could you try to change this:
to check if the condition is passed?
Please Log in or Create an account to join the conversation.