ubuntuchosen Developer Alates Czech Republic Liige alates ubuntuchosen 7 okt 2020 23:44 Hey guys, I am using Litecart 2.2.1. and I have a problem with editing the html template of printable_order_copy that shows up in admin. I can edit the printable_order_copy.inc.php in /includes/templates/template.catalog/pages/, but I cannot find the html template included anywhere in the admin printable_order_copy (neither the one in /pages/ nor the one in /admin/orders.app/). This results in two different versions of printable order copy, one that the buyer gets: /en/printable_order_copy?order_id=3&public_key=ul1oc828wx4s6y2elpuez0ojfhcajvxm And one that the admin gets: /admin/?app=orders&doc=printable_order_copy&order_id=3&media=print Any ideas, anyone?
tim Founder Alates Sweden Liige alates tim 9 okt 2020 00:58 The view includes/templates/default.catalog/pages/printable_order_copy.inc.php is stitched with either: includes/templates/default.admin/layouts/printable.inc.php or includes/templates/default.catalog/layouts/printable.inc.php Depending on the endpoint you are in.
ubuntuchosen Developer Alates Czech Republic Liige alates ubuntuchosen 10 okt 2020 23:06 Hey Tim, thanks for your reply! I checked both printable.inc.php files and only difference in them is that the catalog one contains "<0x00><0x00><0x00><0x00><0x00><0x00><0x00><0x00>" at the end. The thing is, how to make the admin printable order copy use the same HTML as is presented on includes/templates/default.catalog/pages/printable_order_copy.inc.php ? It clearly uses a different HTML template that needs to be somewhere, but I can't locate it :(
tim Founder Alates Sweden Liige alates tim 11 okt 2020 00:12 There is no such content <0x00> in the end of any of the two layout files. https://github.com/litecart/litecart/blob/master/public_html/includes/templates/default.catalog/layouts/printable.inc.php https://github.com/litecart/litecart/blob/master/public_html/includes/templates/default.admin/layouts/printable.inc.php What part of the HTML do you want to use? The layout has the surounding HTML and then there is ~/includes/templates/default.catalog/pages/printable_order_copy.inc.php for the content HTML.
tim Founder Alates Sweden Liige alates tim 11 okt 2020 00:24 I am removing the backend files for the two printable documents in 2.2.5 so you only have to work with the frontend. https://github.com/litecart/litecart/commit/d505778e62704be21817679b40e26a1d1cfa01d7
ubuntuchosen Developer Alates Czech Republic Liige alates ubuntuchosen 11 okt 2020 00:57 Thanks a lot for the reply. Regarding <0x00>, no idea how it got there then. I just sent you a PM. Thanks a lot for your time.
tim Founder Alates Sweden Liige alates tim 11 okt 2020 01:32 I got your email. Some of the different stylings can be caused by the two framework.css of frontend and backend. It is possible 2.1.6 had an issue that the backend used the default frontend template for displaying the printable order copy. You would know this if you have a custom catalog template. The easy solution would be to update both default.catalog/ and your.catalog/ with the same printable_order_copy or update to a newer version.
ubuntuchosen Developer Alates Czech Republic Liige alates ubuntuchosen 11 okt 2020 16:52 Styling is alright, there is no problem with css. But your 3rd paragraph - Oh god I don't understand how I could've overseen this! Of course, that was exactly it. I have a different template for both admin and catalog, and from admin it took the layout from default.catalog, so all that fixed it was just replacing the default.catalog one with the custom printable_order_copy.inc.php and everything is fine now :) Thanks a lot Tim!