Problem with cart summary printing

  • Giuseppe Cento
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
8 months 5 days ago #26863 by Giuseppe Cento
Problem with cart summary printing was created by Giuseppe Cento
Rob I have a problem with the cart summary printing. As soon as I try to print the summary, the print overlaps the cart screen (you can see it from the attached images). Can you tell me how to solve? Thanks
Attachments:

Please Log in to join the conversation.

More
8 months 5 days ago #26864 by Rob
Replied by Rob on topic Problem with cart summary printing
The button just calls the browser window.print().
It used to just print the popup window but now seems to print the window behind as well.
I don't know when this change began, nor do I have a fix. Sorry.

I will poke around and see if I can find a way to once again only print the popup window.

Please Log in to join the conversation.

More
8 months 4 days ago #26865 by Rob
Replied by Rob on topic Problem with cart summary printing
The popup is made with jQuery.

I found a code snippet for printing a jQuery dialog and it seems to work.

To try it out, edit file: components\com_rsappt_pro3\views\cart\tmpl\default.php

At line 186, make the following changes..
Before change:
jQuery('#btnPrint').click(function() {
window.print();
});


After change:
jQuery('#btnPrint').click(function() {
// window.print();
var divToPrint=document.getElementById('sv_alertWindow');
var newWin=window.open('','Print-Window');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();
setTimeout(function(){newWin.close();},10);

});

Please Log in to join the conversation.

  • Giuseppe Cento
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
8 months 4 days ago #26866 by Giuseppe Cento
Replied by Giuseppe Cento on topic Problem with cart summary printing
Rob, in the meantime, thanks for your reply, I made the change you suggested. As soon as I entered it I immediately did a test and it worked. I tried a second time and when I click on "Print this page" it is as if it were executing the command quickly, but without showing anything (and the screen remains in this position (attached file)). Can you help me understand what's going on? Below I insert the code I changed:
jQuery ('# btnPrint'). click (function () {
// window.print ();
var divToPrint = document.getElementById ('sv_alertWindow');
var newWin = window.open ('', 'Print-Window');
newWin.document.open ();
newWin.document.write ('<html> <body onload = "window.print ()">' + divToPrint.innerHTML + '</body> </html>');
newWin.document.close ();
setTimeout (function () {newWin.close ();}, 10);
});
Attachments:

Please Log in to join the conversation.

More
8 months 4 days ago #26867 by Rob
Replied by Rob on topic Problem with cart summary printing
The code opens a new window, then fills it with the contents of the popup and does a window.print on that.

To see it in action, go to the demo page and make a booking.
cartdemo.appointmentbookingpro.com/abpro-cart-demo

Please Log in to join the conversation.

  • Giuseppe Cento
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
8 months 4 days ago #26868 by Giuseppe Cento
Replied by Giuseppe Cento on topic Problem with cart summary printing
Yes, I understood this, but I can't understand how it worked the first time and now it doesn't work. I tried your demo and it works perfectly. I really don't know what happened. Could it depend on the content of what I send to print, which I have customized?

Please Log in to join the conversation.

More
8 months 4 days ago - 8 months 4 days ago #26869 by Rob
Replied by Rob on topic Problem with cart summary printing

Could it depend on the content of what I send to print, which I have customized?


You could change it to plain text and see if that helps.

Also, maybe check the browser console and see if it shows any errors.
It is all done in Javascript and a js error could cause it to not work.
Last edit: 8 months 4 days ago by Rob.

Please Log in to join the conversation.

  • Giuseppe Cento
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
8 months 3 days ago #26870 by Giuseppe Cento
Replied by Giuseppe Cento on topic Problem with cart summary printing
Rob, solved the problem, I had inserted a logo and this prevented printing. Thanks for your help and your availability.

Please Log in to join the conversation.

More
8 months 3 days ago #26871 by Rob
Replied by Rob on topic Problem with cart summary printing
I am happy your were able to solve the problem. :-)

Please Log in to join the conversation.

Time to create page: 0.143 seconds
Powered by Kunena Forum

Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013