- Posts: 190
- Thank you received: 0
Checkout Printcart
- codewarrior
-
Topic Author
- Offline
what is the proper way to add a css in the view Checkout/Printcart.php ?
My template custom.css is not loaded.
Could you add a specific .css to avoid personnal overrides [just for styling] (it can't be updated with upgrades) ?
Thanks a lot
Please Log in or Create an account to join the conversation.
So you should have the frontend CSS file of HikaShop loaded there.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
Usually their templates are overloaded by a custom.css not invoked here.
I prefer to avoid modify your frontend_default.css
But I don't know how to expect the display of this page ?
On my browser, it is displayed as a very basic white full page (not a popup). The rest of my template is with a black background.
I have no problem with this (for printing), but for a nicer effect, I'm wondering if it's possible to have a white popup (which can be printed) as the one in Customer profile edition of the frontend ?
Regards
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
If I click on Print icon
I get Warnings for .css and :
Warning: Use of getAttributeNode() is deprecated. Use getAttribute() instead.
Source File: xxx.com/component/hikashop/checkout/printcart/tmpl-component
Line: 0
and an Error :
Error: window.top.SqueezeBox is undefined
Source File: xxx.com/component/hikashop/checkout/printcart/tmpl-component
Line: 51
On IE9, the behaviour is the same and I get :
- on loading : SEC7115: Les styles de liens visibles et consultés peuvent avoir une couleur différente. Certains styles n’ont pas été appliqués au lien consulté. checkout
- on click on print icon :
SCRIPT5007: Impossible d’obtenir la valeur de la propriété « close » : objet null ou non défini
tmpl-component, Ligne 51 Caractère 170
Please Log in or Create an account to join the conversation.
If you want to change that, you will have to edit the "printcart" file of the view "checkout" via the menu Display->Views, remove the javascript code, and add a print button with the javascript below in an onclick event:
window.print();
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
I don't understand printcart.php code. Is it intended for sending the cart content to a popup ?
It would be fine if it was working, with the site name on top !
Checkout/cart.php has the following code to invoke Printing :
Isn't it here that the squeezebox cod should be inserted ?
Please Log in or Create an account to join the conversation.
If you just want to add some text to the printout, that's easy. Just edit the file I'm talking about and add your text at the beginning.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
Headers are begining the same, but in printcart, there is missing :
1) <link rel="stylesheet" href="/media/system/css/modal.css" type="text/css" />
2) <script src="/media/system/js/modal.js" type="text/javascript"></script>
3) a javascript begining that way :
<script type="text/javascript">
window.addEvent('domready', function() {
SqueezeBox.initialize({});
SqueezeBox.assign($$('a.modal'), {
parse: 'rel'
});
});
Obviously, SqueezeBox code is not loaded.
I do not understand how these codes are generating full pages and how their headers are build.
Do you have any clue ?
Thanks Nicolas
Please Log in or Create an account to join the conversation.
That case should however be on the checkout and on the addresses listing page.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
I activated the "Allow users to print invoices in the frontend" option and I have a printer icon for commands.
If I click on it it works perfectly like you describe for the checkout !
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
But my problem is that I would like to have the same behaviour during checkout : Print a simplified Command page.
But instead of having a quick popup self-printed, the browser switchs to a full new white page.
I just want to obtain something like History, but on Views basis, I do not understand how the page are generated,
integrating the Joomla templates elements which are differents in each situations.
PS : my template has a black background, so the white popup is perfect for printing.
I paste the print icon code from address/listing.php in checkout/cart.php
the behaviour working in address/listing.php is displaying a new white page calling Win printing.
I just see that in the non working view, the generated code in the header doesn't include Joomla /media/system/js/modal.js and SqueezeBox initialisation.
What can differ in the way those 2 views are transformed in a Joomla page ???
or how could I modify their headers ?
N.B. : I pasted the print code from checkout/cart.php in address/listing.php and it works perfectly in a popup !!!
Thanks for help !
Please Log in or Create an account to join the conversation.
www.hikashop.com/forum/2-general-talk-ab...t.html?lang=fr#46872
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
- Posts: 190
- Thank you received: 0
sorry to insist, but I edited my previous post with additional tests.
Thanks
Please Log in or Create an account to join the conversation.
Please post screenshots and code modifications you did, explaining what is wrong and what you want.
Please Log in or Create an account to join the conversation.