Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 Advanced Tips and Tricks - NO QUESTIONS PLEASE
 Dave's Quick order processing utilities
Author « Topic »  

dbdave
ECT Moderator

USA
10277 Posts

Posted - 11/11/2017 :  15:57:35  
.ASP VERSIONS ONLY
Designed for new css admin orders page introduced in version 6.8.1
(should work in previous versions)

We operate a fairly busy store and we look for ways to streamline many actions we take every day.
Often we process many orders at once. If we have not processed (printed) any orders for 4-6 hours, then often 30-50 orders have piled up.
If we process orders after the weekend of being closed, it can be over 100 orders easily.

Printing orders can involve printing several pages, invoice for the customer, invoice hard copy for accounting, packing slip to pick the order by...
Needs may vary depending on your operation, but all of this can be time consuming.

If we have 4 mouse clicks to print an order, and we have 100 orders, that is 400 mouse clicks.
What if we could cut that down to 200 mouse clicks.
What if we could stop our logo from printing on our accounting invoice to save ink and paper (suddenly a two page invoice prints on one page).
What if we could print a warehouse pick ticket that has no customer info so we can just toss it in the trash when we are done instead of shredding them because they contain sensitive customer info?
What if we had a one click button to jump right into edit mode if we need to edit the order?

INTRODUCING..... Quick Order Utilities


Here we have five buttons.
When clicked, you get a quick print dialog to select your printer and click. No unneeded preview or backing up. Stay right there on the page to carry out other actions.

The first button will give you your standard customer invoice.
This will have your logo at the top (if you have not added one, you should)


The second button will give you your standard customer pack slip.
This will have your logo at the top (if you have not added one, you should)


The third button will give you an order pick ticket where through the magic of javascript and css we have hidden your logo and the customer details.
This is done for several reasons. It will use less ink and paper. It prevents the sharing of customer info if you leave these laying around or want to just toss them in the trash when you are done.


The fourth button will give you your accounting customer invoice.
This will NOT have your logo at the top. It will save ink and paper.


The fifth button will jump you right into edit mode with one click.
(No screen shot needed :))

If you process a fair number of orders, this will save you time and money. It's also good for the environment because you will save some paper here and there.
Super EZ Instructions below.


Edited by - dbdave on 05/29/2023 19:17:46

dbdave
ECT Moderator

USA
10277 Posts

Posted - 11/11/2017 :  16:17:38  
EZ TWO STEP INSTALL

This is a MOD and will get overwritten by updates, but it is just one simple include line added to one file to install.
No warranty is expressed or implied. It's free. If you don't like it, I will give you 100% refund.

STEP 1
Open an empty document in your HTML editor and copy the code below in BLUE to the empty document.
Notepad will also work fine for this.
SAVE the file as- inc_quikbuttons.asp


<%
'Add fast order utility buttons
if not doedit and not isprinter then
%>
<style type="text/css">
.button1 {height: 30px;min-width: 144px;width: 16%;margin-bottom: 7px;margin-top: 3px;font-size: 14px !important;margin-right: 3px;}
div.order-utilities {width:50%;display: flex;flex-wrap: wrap;justify-content:space-evenly;}
div.order-utilitieshead {width:100%; background:#093768; height:17px; padding: 7px;}
@media screen and (max-width: 1880px){ div.order-utilities {width:70%;}}
@media screen and (max-width: 1260px){ div.order-utilities {width:100%;}}
</style>
<div class="order-utilities">
<div class="order-utilitieshead">
<span style="color:white; height: 18px;"><strong>Quick Order Utilities</strong></span>
<a href="https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=108961" class="online_help" title="Online Source and Info">?</a>
</div>
<script>
function printcustinvoice() {
var div1 = document.getElementById("printerDiv1");
div1.innerHTML = '<iframe src="adminorders.asp?invoice=true&id=<%=ordID%>" onload="this.contentWindow.print();"></iframe>';
}
function printcustpackslip() {
var div2 = document.getElementById("printerDiv2");
div2.innerHTML = '<iframe src="adminorders.asp?printer=true&id=<%=ordID%>" onload="this.contentWindow.print();"></iframe>';
}
function printprodinvoice() {
var div3 = document.getElementById("printerDiv3");
div3.innerHTML = '<iframe id="prodinv" src="adminorders.asp?printer=true&id=<%=ordID%>" onload="this.contentWindow.print();hideprodinvstuff();"></iframe>';
}
function printacctinvoice() {
var div4 = document.getElementById("printerDiv4");
div4.innerHTML = '<iframe id="acctinv" src="adminorders.asp?invoice=true&id=<%=ordID%>" onload="this.contentWindow.print();hideacctincstuff();"></iframe>';
}
function hideacctincstuff(){
var actinva = document.getElementById("acctinv");
var actinvb = actinva.contentWindow.document;
var actinvhide = actinvb.getElementsByClassName("invoiceheader")[0];
actinvhide.style.display = "none";
}
function hideprodinvstuff(){
var prdinva = document.getElementById("prodinv");
var prdinvb = prdinva.contentWindow.document;
var prdinvhide1 = prdinvb.getElementsByClassName("packslipheader")[0];
var prdinvhide2 = prdinvb.getElementsByClassName("addresses")[0];
var prdinvhide3 = prdinvb.getElementsByClassName("orderdate")[0];
var prdinvhide4 = prdinvb.getElementsByClassName("adddetails")[0];
var prdinvhide5 = prdinvb.getElementsByClassName("shipping")[0];
prdinvhide1.style.display = "none";
prdinvhide2.style.display = "none";
prdinvhide3.style.display = "none";
prdinvhide4.style.display = "none";
prdinvhide5.style.display = "none";
}
</script>
<div id="printerDiv1" style="display:none"></div>
<div id="printerDiv2" style="display:none"></div>
<div id="printerDiv3" style="display:none"></div>
<div id="printerDiv4" style="display:none"></div>
<input title="Customer Invoice - Has logo" class="button1" type="button" value="Customer Invoice" onclick="printcustinvoice()" />
<input title="Customer Pack slip - Has logo - Hides Pricing" class="button1" type="button" value="Customer Pack slip" onclick="printcustpackslip()" />
<input title="Order picking invoice - No customer data - can be thrown away" class="button1" type="button" value="Picking Invoice" onclick="printprodinvoice()" />
<input title="Accounting Invoice - Hides logo to save paper and ink" class="button1" type="button" value="Accounting Invoice" onclick="printacctinvoice()" />
<input title="Open order in Edit Mode" class="button1" type="button" value="Edit Order" onclick="window.open('adminorders.asp?doedit=true&id=<%=ordID%>','_self')" />
</div>
<% end if %>


STEP 2
Open (in your html editor or notepad) the file in your admin folder (vsadmin/inc or if you have a secret renamed admin you log in with, then that folder instead) and open incorders.asp
Save that file as incorders-backedup.asp
Close that file so you now have a backed up copy.
Now, open the incorders.asp file again and use "find" to search for the following line -
<% if doedit then print "</form>"

Immediately after that, add the following
%><!-- #include file="inc_quikbuttons.asp" --><%

The line should now look like this
<% if doedit then print "</form>" %><!-- #include file="inc_quikbuttons.asp" --><%


STEP 3
Upload the changed incorders.asp file and the new inc_quikbuttons.asp file to the same location
(vsadmin/inc or if you have a secret renamed admin you log in with, then that folder instead)

That's all there is to it.
I hope it helps some of you as much as it has helped my company.

Edited by - dbdave on 11/11/2017 16:40:20

dbdave
ECT Moderator

USA
10277 Posts

Posted - 11/11/2017 :  16:30:57  
Additional note - These buttons are very fast.
So fast in fact that in firefox, if you click them within a few seconds of each other, you may see a warning come up asking of you want to prevent javascript dialogs.
If you do have that, you can just safely select cancel.
Firefox built this into the browser some time back to stop malicious websites that would serve tons of popups instantly.

To fix, you can just wait an extra moment before clicking the print buttons, or change the default three seconds to 1 or 2.



Open about:config (enter this in the firefox address bar)
Copy the preference name dom.successive_dialog_time_limit
Right-click in the preferences area and choose New > Integer
Paste the preference name and click OK
Then enter 2 and click OK

If you are still too fast, change the 2 to a 1 there.
You can set it to 0 but no need to and that would disable the valuable security feature that firefox has built in.

Edited by - dbdave on 11/11/2017 16:32:06

dbdave
ECT Moderator

USA
10277 Posts

Posted - 11/19/2017 :  11:39:47  
While you are in the incorders.asp file, if you want to immediately view the order you edited, or a new order you created, it's a quick little addition

About line 827 - change this <form id="searchparamsform" method="post" action="adminorders.asp">
To this <form id="searchparamsform" method="post" action="adminorders.asp?id=<%=orderid%>">

Changes shown in red.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000