Change invoice printing layout

  • Posts: 33
  • Thank you received: 0
10 years 2 months ago #169812

-- url of the page with the problem -- : www.madman.co.za
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.0

Hi,
I would like some guidance please to edit the layout of the printed invoice / order. I have looked at the views>invoice file but do not understand PHP and cannot figure out even where to add code. I have had ZERO luck with the commercial jobs section. No interest in helping.

I would like the following:
1. Remove my company details,
2. put date, inv number (big bold),Shipping method and payment method in top right.
3. Move billing and shipping addresses up to top, add custtomer email.
4. Print description, product code, qty, unit and total price across the page
5 Print subtotal, shipping and total at bottom as per normal, such that the numbers fit (at the moment the thousands wrap to the next line)

If anyone can help me to understand what code to put where I can do it, or if there is some sort of emulator that will show the actual layout on the page that would help alot.

Thank You
Regards, Brian


Engine Monitoring and Performance Systems

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #169815

Hi,

In fact it's more HTML than PHP. All the php codes are in HTML tags, so you just have to move the HTML parts as you want.
Nothing to edit in PHP. ;)

The following user(s) said Thank You: MadMan

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

  • Posts: 33
  • Thank you received: 0
10 years 2 months ago #170094

Thanks Xavier...I am figuring it out...


Engine Monitoring and Performance Systems

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

  • Posts: 33
  • Thank you received: 0
10 years 2 months ago #170111

Xavier,

I have done what I need but have one more question.
I use the printed invoice to make the accounting invoice, so I do not need the description, but rather the code.

I would like to REMOVE the product description and
ADD only the product code.

I don't use the product code inthe front end display at all, so I need to force the display of the code and suppress the display of the product description.

Please give me the code to do this and an idea of where to place it.

Regards
Brian


Engine Monitoring and Performance Systems

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #170114

Hi,

To not have the product description but have the code, you just have to replace "description" by "code" in the PHP variable ;)
Could you tell me which view you are editing exactly ?

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

  • Posts: 33
  • Thank you received: 0
10 years 2 months ago #170371

I am editing the invoice view for my template so that it prints only the code not the description. I see there is mention of the product code on the file, where exactly would I replace the "description" with "code" ?
Thanks
Brian


Engine Monitoring and Performance Systems

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
10 years 2 months ago #170430

The invoice of the frontend is displayed by the file "show.php" of the view "order" of your frontend template and you can edit it via the menu Display>Views.
There is no display of the description of the product in the frontend invoice by default.
If you get the product description, it would mean that you already added some code there in order to add it.
And the product code is actually already displayed in it if the product code display option of the HikaShop configuration is turned on.
Never the less, if you want to do it manually, just add such code after the display of the product_name:

<?php echo $product->order_product_code; ?>

The following user(s) said Thank You: MadMan

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

  • Posts: 33
  • Thank you received: 0
10 years 2 months ago #170546

All fixed up, thanks !


Engine Monitoring and Performance Systems

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

Time to create page: 0.076 seconds
Powered by Kunena Forum