I have these records and I have create a print button. I am trying to get the print button to open up in a a blank page that I have created so that I can format it the way I want it to be printed. For example this table is on main.php and the page I am wanting to pull everything over to is print.php how ever I am not able to get the information to pull over. I have the button set to on click load the server connect and browser to go to ‘print.php?id=’+serverconnect_getsingle.data.query1[0].ordernumber
But it is not working. I have been trying quite a few different things for a couple of days to try to get it to work but I am having no success. I can get it to open in a modal but not a separate page. I do have the server connect connected the other page and I am able to get a list all to show but I am not able to get my form to populate with the info. Thank you for your help!
Hey Emily,
The url path to server connect files is typically in the form:
http(s)://domain.com/dmxConnect/api/folder/file.php
so if print.php is not in a folder you might try:
'dmxConnect/api/print.php?id=' + serverconnect_getsingle.data.query1[0].ordernumber
–Ken
Thank you, Ken! When I try that I get a 404. The page was opening correctly just not taking the order number / id over with it to the next page, if that helps better explain it. If not let me know and I will take screenshots of everything. I really appreciate your help.
Ahh. I see what you are saying now. I’m out right now but if nobody else replies I’ll post up an example.
Thank you, you are awesome!
Is this the sort of thing that you are looking for https://hollandtrade.com.au/wcart/checkout-invoice.html?id=57?
Thank you, Ben! That is the type of thing that I am looking for. To click on my print button from the list all in the database and to be taken to a page like that.
If you have a look at the source code of the page, you will see that the parts should be hidden in the print/pdf version have a class of d-print-none
The print button code looks like
<button class="btn" onclick="javascript:window.print();"><i class="fas fa-print"></i>  Print the Invoice</button>
If you have problems (my bad explanation), please come back here.
Edit: Have a look at the wCart tutorial part 12. https://community.wappler.io/c/docs/ecommerce
