Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Edit Print Invoice Template Rate Topic   - - - - -

 

Posted 25 September 2019 - 06:42 AM #1

Dear team,

 

I want to edit print_invoice template to show an additional field under products description table for each product row. ( I'm referring to this page dispatch=orders.print_invoice&order_id=3844506)

 

I find it difficult to relevant template file. Kindly educate me on which file to edit and from which locations.

 

Regards,

 

 

 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19793 posts

Posted 25 September 2019 - 01:46 PM #2

What template editor do you use? Old or new one?

 

Settings -> Appearance -> Email templates mode


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 

Posted 25 September 2019 - 02:19 PM #3

Hi,

 

Thanks for your reply, 

 

Let me elaborate what I need to do.

 

There is an addon installed to show a field called 'location' below the SKU of each item in the order details page.

When I try to print the invoice I do not see this location field added to print preview page. Its just shows as normal invoice without this field.

I want to add this location field to this invoice product table.

 

How can I go about and add this field here? I'm unable to find proper template file to do this changes.

 

Thank you,



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19793 posts

Posted 26 September 2019 - 04:57 AM #4

At first please answer on my question


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 

Posted 26 September 2019 - 06:27 AM #5

HI, 

 

Sorry, my mistake,  I could not answer you at first,

 

I checked the settings. Its New.

 

Thank you,



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19793 posts

Posted 26 September 2019 - 02:07 PM #6

The list of available variables in the new document editor is limited. At first, contact addon developers and ask them to extend this module and add Location variable to the list of available variables in the new editor


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 

Posted 26 September 2019 - 03:03 PM #7

Hi,

 

Thanks for your reply,

 

I have been given this task to do myself. So that  is why trying to find a way to extend it.

 

If you could advice me on what are the steps to do in order to achieve this, would be really great.

 

I already noted that I need to add few entries in template snippets and template related tables. I would like to know how to do this.

 

Regards,



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11401 posts

Posted 26 September 2019 - 06:22 PM #8

Variables are not in tables.  You will need to add classes and private functions to get the data and apply it to the variables in the template.  It is not s simple process.  You can look in the documentation for how to add a variable to a template.  See "Variables" section on this page: https://docs.cs-cart.../documents.html

 

Good luck!


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19793 posts

Posted 27 September 2019 - 05:22 AM #9

I agree with tbirnseth. The process of adding new variables is not trivial and programming skills are required here


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 

Posted 28 September 2019 - 06:16 AM #10

Hello all,

 

Thank you so much Tbirnseth, and eComLabs for your advice on this.

 

I'm actually going through the docs referred by Tbirnseth. I have to implement a solution myself and I somehow can manage programming part as well.  

 

In case If I come across any further issues I'll post it here.

 

Thanks again for your valuable advises.



 

Posted 13 October 2019 - 09:16 AM #11

Hi all,

 

Sorry for my late update.

 

I did manage to achieve what was needed. 

 

But the way I implemented my solution was rather simple approach. What I did was I created a variable class which implements IVariable interface. And in the constructor method, using Context variable I accessed Order object reference and its items. 

Then I concatenated the information what I wanted to show along with the items.

 

This resolved my issue. 

 

Thank you for providing guidelines in this regards.