![]() |
Re: Detailed Order Management Mod
Quote:
Hi, Just a very big thank you for this great mod. I do have one slight issue and that is that it cuts of a part of the address when you click on the small icon or copy to clipboard. eg. The address that has been cut to clipboard is Mr.Andrew Smith 6 Kingfisher Close Hamble HAM, SO31 4PE and it is suppose to be Mr.Andrew Smith 6 Kingfisher Close Hamble, Hampshire, SO31 4PE Not a big issue at all but is there a way that I can make it so that it all displays on different lines as well as in full. Please be kind to assist if you can. This mod is one of a kind and is really helping me alot, thanks! |
Re: Detailed Order Management Mod
In your order_info.tpl check the section
{if $usertype eq "A"} <a href="javascript:void(0)" ship_to="{$order.s_title} {$order.s_firstname} {$order.s_lastname}" ship_address="{$order.s_address}" ship_address_2="{$order.s_address_2}" ship_city="{$order.s_city}," ship_state="{$order.s_statename}" ship_country="{$order.s_country}" ship_zipcode="{$order.s_zipcode}" onclick="copyShipAddr(this, true);return false;"> <img src="{$ImagesDir}/copy.gif" border=0 align=absmiddle>Copy To Clipboard</a> {/if} Then make sure that the State element is the right version for what you want, yours is using the short code for the county/state. I use s_statename, I am based in the UK also and this works for me. |
Re: Detailed Order Management Mod
Quote:
Got it! thanks ,but this only sorts out the "copy to clipboard" and not the "copy to field " or the icon bit. Any suggestions? |
Re: Detailed Order Management Mod
Same principle for the next block of text below in the same file:
{* genbilim *} {if $usertype eq "A"} <a href="javascript:void(0)" ship_to="{$order.s_title} {$order.s_firstname} {$order.s_lastname}" ship_address="{$order.s_address}" ship_address_2="{$customer.s_address_2}" ship_city="{$order.s_city}" ship_state="{$order.s_statename}" ship_country="{$order.s_country}" ship_zipcode="{$order.s_zipcode}" onclick="copyAddrToField(this);return false;"> <img src="{$ImagesDir}/copy.gif" border=0 align=absmiddle>Copy To Field</a> <br> <textarea cols=40 rows=6 id=ship_addr> </textarea> {/if} {* genbilim-end *} You may also need to update the copy_addr.js mine has, it's the top bit I changed, highlighted in red: var attributes = ['to', 'address', 'address_2', 'city', 'state', 'country', 'zipcode']; var addrFormat = "{to}\r\n" + "{address}\r\n" + "{address_2}\r\n" + "{city}\r\n" + "{state}\r\n" + "{zipcode}"; function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; } function removeInformation() { var div = document.getElementById('DIV_CopyInform'); if (! div) return; div.style.display = 'none'; div.innerHTML = ''; } function getAddr(aObj) { var str = addrFormat; for(var i=0; i<attributes.length; i++) { var na = 'ship_' + attributes[i]; var val= aObj.getAttribute(na); if (typeof val != "undefined") str = str.replace('{' + attributes[i] + '}', aObj.getAttribute(na)); } return str; } function copyAddrToField(aObj) { document.getElementById('ship_addr').value = getAddr(aObj); document.getElementById('ship_addr').focus(); document.getElementById('ship_addr').select(); } function copyShipAddr(aObj, quickCopy) { var str = getAddr(aObj); if (str.length > 0 ) { if (! document.getElementById('DIV_CopyInform') ) document.getElementsByTagName('DIV')[0].innerHTML += '<div id="DIV_CopyInform" style="display:none;"></div>'; var div = document.getElementById('DIV_CopyInform'); div.style.position = 'absolute'; div.innerHTML = ''; div.style.left = (findPos(aObj)[0] + aObj.offsetWidth) + 'px'; div.style.top = findPos(aObj)[1] + 'px'; try { if (! quickCopy) // make it throw an exception genbilim.style = 'dummy'; window.clipboardData.setData("Text", str); // Inform the user div.style.width = '75px'; div.style.backgroundColor = 'pink'; div.style.padding = '3px'; div.style.color = 'black'; div.style.border= '1px solid black'; div.innerHTML = 'Copied'; div.style.display = 'inline'; setTimeout('removeInformation()', 1000); } catch(e) { div.style.left = (findPos(aObj)[0] + aObj.offsetWidth - 300 - 10 ) + 'px'; div.style.top = (findPos(aObj)[1] + aObj.offsetHeight) + 'px'; div.style.backgroundColor = '#DDDDCC'; div.style.padding = '5px'; div.style.color = 'black'; div.style.border= '1px solid black'; div.style.display = 'inline'; div.innerHTML = '<table width=300 >' + '<tr><td align=right><a href="javascript:void(0)" onclick="removeInformation()">Close</a></td></tr>' + '<tr><td>You can copy (Ctrl+C) the adress manually</td></tr> '+ '<tr><td><textarea id=addr_ta rows=8 cols=50 >' + str + '</textarea></td></tr>'; document.getElementById('addr_ta').focus(); document.getElementById('addr_ta').select(); } } } Hope that sorts it for you, responded yesterday in a rush before heading oiut the door to work. |
Re: Detailed Order Management Mod
Quote:
Thanks again for your great help much appreciated!!! Almost there! It now work perfectly exept for one line that returns "null" The addresses now look like this when clicked on any of the 3(copy to field , copy to clipboard and icon) Mr.Andrew Smith 6 Kingfisher Close null Hamble Hampshire SO31 4PE The red area should be South Hampton. Please advise. Thanks |
Re: Detailed Order Management Mod
Dan
If you match it up then you will see which line is giving the issue. "{to}\r\n" + = Mr.Andrew Smith "{address}\r\n" + = 6 Kingfisher Close "{address_2}\r\n" + = null "{city}\r\n" + = Hamble "{state}\r\n" + = Hampshire "{zipcode}"; = SO31 4PE So if you don't have an address line 2 this will return 'null' in mine I am not using Country as we only deal with the UK. |
Re: Detailed Order Management Mod
We implemented this mod and have been successfully using it for over a year.
We made some mods that added the WorkingMan Software for USPS shipping and now have added Shipkit for UPS. The problem is that the mod does not pull over the shipping method, so I do not know which orders are for USPS and which are for UPS. Can anyone help me to add the shipping method for each order to the order management page? Thanks Bob |
Re: Detailed Order Management Mod
A great mod, love it.
One thing we would like to do is to make the background colour of the Order Details page (the page you go to to see what a customer order consists of) reflect the status of the order. For example, on our site failed orders are highlighted red on the order list, but every morning we move from order to order using the breadcrumb links on each details page, so if an order has failed we would immediately see that because we would see a red background on the order detail. I hope that makes sense. We have tried messing around with the order_info.tpl but cannot make a colour appear in the table that XCart creates to show the order and customer detail. Does anyone have any ideas? |
Re: Detailed Order Management Mod
Quote:
Somewhere in this thread, I picked up a mod that we implemented that adds a button to the admin page that restricts the orders page to only items that are confirmed shippable. Our button says "Orders that are Ship Now!" and is just below the "Orders " button on the admin page. We use this instead of the colors for our fulfillments team. This way they only see what is shippable. This also lets us queue orders without them seeing them and accidentally shipping. I hope this helps. |
Re: Detailed Order Management Mod
We love this mod, but it would be even better if, when the orders list is expanded, we could replace the 'Stock' column with the manufacturer name. We have tried a few things but cannot get the manufacturer to show. Our primary effort has been in using the smarty tag {$product.manufacturer}, but with no luck. Anyone have any ideas?
|
All times are GMT -8. The time now is 12:08 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.