How To Remove Print Invoice Options From Orders?

Find the design/themes/YOUR_THEME/templates/views/orders/details.tpl file and replace this code:

{include file="buttons/button.tpl" but_role="text" but_text=$print_order but_href="orders.print_invoice?order_id=`$order_info.order_id`" but_meta="cm-new-window ty-btn__text" but_icon="ty-icon-print orders-print__icon"}

{include file=“buttons/button.tpl” but_role=“text” but_meta=“orders-print__pdf ty-btn__text cm-no-ajax” but_text=$print_pdf_order but_href=“orders.print_invoice?order_id=$order_info.order_id&format=pdf” but_icon=“ty-icon-doc-text orders-print__icon”}

with this one:

{* {include file="buttons/button.tpl" but_role="text" but_text=$print_order but_href="orders.print_invoice?order_id=`$order_info.order_id`" but_meta="cm-new-window ty-btn__text" but_icon="ty-icon-print orders-print__icon"}

{include file=“buttons/button.tpl” but_role=“text” but_meta=“orders-print__pdf ty-btn__text cm-no-ajax” but_text=$print_pdf_order but_href=“orders.print_invoice?order_id=$order_info.order_id&format=pdf” but_icon=“ty-icon-doc-text orders-print__icon”} *}

Is there some similar simple solution to add this print button to admin order details page, tweak and send invoice?

admin.php?dispatch=orders.modify_invoice&order_id=

Is there some similar simple solution to add this print button to admin order details page, tweak and send invoice?

admin.php?dispatch=orders.modify_invoice&order_id=

What are you going to change in the invoice? And what if customer prints invoice before you edit it?

Author of this thread asked how to remove those print buttons and it is very logic question, since who would want allow customers to print invoice that prior was tweaked but changes could not be saved? Meaning customers can print unmodified invoices..

Developers give us ability to edit invoice but not to save changes or print changes.. Maybe for some send by email is required for me not, paper invoice must be included with parcel for export import..

In my case I am printing two paper invoices one for accountant other for customer and include it to parcel. I do not need functionality for customer to be able to print invoices..

What I edit in invoice is add customers business name, tax numbers, write total in words! for wholesale lots write unit price, write EU vat directive if one is used. To be able to print all tweak and send changes I use this free html redactor

http://marketplace.cs-cart.com/add-ons/site-management/full-ckeditor.html

but I hate it, I would prefer to use simple redactor and having plain print & print pdf button

What are you going to change in the invoice? And what if customer prints invoice before you edit it?

Author of this thread asked how to remove those print buttons and it is very logic question, since who would want allow customers to print invoice that prior was tweaked but changes could not be saved? Meaning customers can print unmodified invoices..

Developers give us ability to edit invoice but not to save changes or print changes.. Maybe for some send by email is required for me not, paper invoice must be included with parcel for export import..

In my case I am printing two paper invoices one for accountant other for customer and include it to parcel. I do not need functionality for customer to be able to print invoices..

What I edit in invoice is add customers business name, tax numbers, write total in words! for wholesale lots write unit price, write EU vat directive if one is used. To be able to print all tweak and send changes I use this free html redactor

http://marketplace.cs-cart.com/add-ons/site-management/full-ckeditor.html

but I hate it, I would prefer to use simple redactor and having plain print & print pdf button

Now I understand your workflow. But wouldn't it be easier for you to modify the e-mail editor, add their additional variables and edit the invoice only once for all orders?

I just need Print button next to Send ;) thats all

Now I understand your workflow. But wouldn't it be easier for you to modify the e-mail editor, add their additional variables and edit the invoice only once for all orders?

Find the design/themes/YOUR_THEME/templates/views/orders/details.tpl file and replace this code:

{include file="buttons/button.tpl" but_role="text" but_text=$print_order but_href="orders.print_invoice?order_id=`$order_info.order_id`" but_meta="cm-new-window ty-btn__text" but_icon="ty-icon-print orders-print__icon"}

{include file=“buttons/button.tpl” but_role=“text” but_meta=“orders-print__pdf ty-btn__text cm-no-ajax” but_text=$print_pdf_order but_href=“orders.print_invoice?order_id=$order_info.order_id&format=pdf” but_icon=“ty-icon-doc-text orders-print__icon”}

with this one:

{* {include file="buttons/button.tpl" but_role="text" but_text=$print_order but_href="orders.print_invoice?order_id=`$order_info.order_id`" but_meta="cm-new-window ty-btn__text" but_icon="ty-icon-print orders-print__icon"}

{include file=“buttons/button.tpl” but_role=“text” but_meta=“orders-print__pdf ty-btn__text cm-no-ajax” but_text=$print_pdf_order but_href=“orders.print_invoice?order_id=$order_info.order_id&format=pdf” but_icon=“ty-icon-doc-text orders-print__icon”} *}

Thank you very much!!!!!!

So as I understand there is no easy way to add print button to tweak and send page?

So as I understand there is no easy way to add print button to tweak and send page?

It is not so easy as the solution above, but quite possible.


Thank you very much!!!!!!

You are welcome!

Hi Oleg

I made changes as you suggested. It worked really well, removed the option for customers to print prior to my editing the invoice. I then changed back to the original code, by restoring from the repository. The code was changed accordingly however the print buttons have not reappeared. I have cleared cache but this did not help. Any ideas as to why I cannot get the print buttons back?

Hi Oleg

I made changes as you suggested. It worked really well, removed the option for customers to print prior to my editing the invoice. I then changed back to the original code, by restoring from the repository. The code was changed accordingly however the print buttons have not reappeared. I have cleared cache but this did not help. Any ideas as to why I cannot get the print buttons back?

Try to delete var/cache directory manually

Thanks Oleg

I have found the file, which is identical to the original but with the print function removed.

I am thinking that I should go into the folder and delete the file, then the old file will take priority. Is this the way to proceed?

Never done this before, thought it best to ask.

Oop's, sorry, not Oleg, eCom Labs thank you.

Thanks Oleg

I have found the file, which is identical to the original but with the print function removed.

I am thinking that I should go into the folder and delete the file, then the old file will take priority. Is this the way to proceed?

Never done this before, thought it best to ask.

Where this file is located? Please provide us with full path

P.S. You can always just rename file without deleting it and check the result

This is on my desktop version, where I eveluate everything prior to going to the live version. Glad I did in this instance.

Path is : cscart/var/cache/templates/"mytheme"/5abc123tygh.details.tpl

The original file is in : cscart/var/cache/templates/responsive/5abc123tygh.details.tpl

(The prefix of the file names is actually much longer)

The file names in both are identical, the one in "mytheme" is just dated 20 Sept 2018 whereas the other is dated from when I installed the software. Interestingly, I modified the file (as suggested) in the responsive folder, no idea how it knew to put it into "mytheme". Way too clever for me.

There are also two other new files in the "mytheme" directory, seem to be related to this change as they are dated 19 September which is when I made the change. Files end in tygh.default_template.tpl and tygh.product_data.tpl. These may not be related, could be from other changes I was making.

In the responsive file there are two files ending in tygh.details.tpl, but with different prefixis. One from installation date (+/-) and the other from 6 months later.

If I were to change the name, I guess I can make it anything I want? If it is still in "mytheme" will it not conflict with the original file, having two files trying to do the same thing, even if the names are not the same?

My lack of knowledge is really starting to show...

If you look at the manifest.json for 'my_theme', if it has the 'parent_theme: responsive' then if a file does NOT exist in my_theme, the file in the responsive theme will be used. Themes are a sparsely populated inheritance of files. Think of theme files like a css property. It can exist in a base css file but can be overridden by a subsequent declaration that is included later in the process.

Ther is no need to change files in the cache. Just add &ctpl to the URL in the admin panel to clear templates cache

Thank you, I will try that.

&ctpl worked perfectly, thank you.