![]() |
Re: Detailed Order Management Mod
I applied posts 2 and 22, very nice!
Stupid question maybe (after all, I am a newbie) - regarding the clickable entries mentioned - I didn't look at post 26, yet the order number and date are already clickable - is that because the code in post 22 was changed to include these, or was something else meant by clickable entries? Thanks, Miri |
Re: Detailed Order Management Mod
is there an image I can see this? Because the pictures no longer work.
|
Re: Detailed Order Management Mod
Quote:
Yea Id like to know too. |
Re: Detailed Order Management Mod
I applied this mod today, having planned to do it for months and months, I followed the main post and all went well, all the colours work, although I may change a few, the links all worked out of the box.
For those of you who use the copy address functions you should check the js and the address sections added as they don't cater for 2nd address lines, and the js could also do with tidying to break each line onto a new line of it's own. Now this is installed it is GREAT, one of those must have mods, well done to the author. I'm not sure if anyone has explored this yet but it would be really cool to have an expand all/contract all to show and hide this data. |
Re: Detailed Order Management Mod
Quote:
OK, so I wanted to be able to do this and with a little bit of help from xcart, I now have this mod setup so that at the top of the list there is a set of radio buttons to show or hide the detail, images are available at the end of this post. Step 1.0 install the mod as per existing instructions, as always, backup backup backup before you start. For those of you who don't want a client to see any of the extra items you add, simply wrap them in the following way: {if $usertype eq 'A'} Relevant part of code here {/if} I didn't want them to see the stock levels either so I wrapped the code like this: {if $usertype eq 'A'} <td align=center>Stock</td> {/if} and {if $usertype eq 'A'} <td width="10%" nowrap="nowrap" align=center>{$item.avail}</td> {/if} This hides the stock title and levels from the customers. Ok so onto how to turn it on or off. First create a file called ExpandOrdDet.tpl in the /skin1/main folder. Copy and paste the following into the empty file. {if $usertype eq 'A'} <form action="" name="OrdDetExpand" method="post"> <b>Ordered Product Details:</b> <input type="hidden" value="{if $expand_list eq 'Y'}{else}Y{/if}" name="expand"> <INPUT type="radio" name="show" id="radio-show" value="{$expand_list}" {if $expand_list eq 'Y'}checked{else}onclick="OrdDetExpand.submit()"{/if}> <label for="radio-show">Show</label> <INPUT type="radio" name="hide" id="radio-hide" value="{$expand_list}" {if $expand_list eq ''}checked{else}onclick="OrdDetExpand.submit()"{/if}> <label for="radio-hide">Hide</label> </form> {/if} save and exit Then open the orders_list.tpl file from the same folder and add {include file="main/ExpandOrdDet.tpl"} after {assign var="total_paid" value=0.00} which is about line 4. then in the same file add {if $expand_list eq 'Y'}, I placed this into the text as below, be sure to add {/if} at the end as shown: {* genbilim *} {if $usertype eq 'A'} <td align=center {include file="main/orders_colors.tpl"}><a href="javascript:void(0)" ship_to="{$orders[oid].s_title} {$orders[oid].s_firstname} {$orders[oid].s_lastname}" ship_address="{$orders[oid].s_address}" ship_address_2="{$orders[oid].s_address_2}" ship_city="{$orders[oid].s_city}" ship_state="{$orders[oid].s_statename}" ship_country="{$orders[oid].s_country}" ship_zipcode="{$orders[oid].s_zipcode}" onclick="copyShipAddr(this, false);return false;"> <img src="{$ImagesDir}/copy.gif" border=0 align=absmiddle></a></td> {/if} </TR> {if $expand_list eq 'Y'} <tr> <td colspan=3></td> <td colspan=4> <table width=100% cellpadding=5 style="border-collapse:collapse" border=0> <tr bgcolor=#DDDDCC> <td>Product</td> <td>Code</td> <td align=center>Amount</td> {if $usertype eq 'A'} <td align=center>Stock</td> {/if} </tr> {foreach item=item from=$orders[oid].item_list} <tr bgcolor=#CCCCDD> <td width="70%" nowrap="nowrap">{$item.product}</td> <td width="10%" nowrap="nowrap">{$item.productcode}</td> <td width="10%" nowrap="nowrap" align=center>{$item.amount}</td> {if $usertype eq 'A'} <td width="10%" nowrap="nowrap" align=center>{$item.avail}</td> {/if} </tr> {/foreach} </table> </td> </tr> <TR> <TD style="padding-top:3px;border-bottom:1px solid black" colspan=12> </TD> </TR> <TR> <TD style="padding-top:3px;" colspan=12> </TD> {/if} {* genbilim-end *} Once you have made that change, save and exit the file. You now need to edit the /admin/auth.php file Add //------ RADIO BUTTONS FOR PROUCT LIST EXPANSION ------ x_session_register('expand_list'); if ($HTTP_POST_VARS['expand'] == 'Y') { $expand_list = 'Y'; } elseif(isset($HTTP_POST_VARS['expand']) && $HTTP_POST_VARS['expand'] != 'Y') { $expand_list = ''; } $smarty->assign("expand_list", $expand_list); //------ end Radio Buttons ------ to the end of the file but before the ?> Save the file and exit That's it you should be good to go. Images to show results below. ![]() ![]() I hope you find this addition useful, it has only been applied to and is running on 4.1.9, use on other versions has not been tested and cannot be guaranteed. Thanks Chris |
Re: Detailed Order Management Mod
I find this mod really really useful but sometimes I want to go to the product that the customer has ordered, either because when we get it from the supplier, it actually weighs more or less than we had been told, usually this means going into the order to click the product to open a new window to modify it.
So I thought it would be nice if the product name was clickable to be able to get to it from this view. so I made it so. just replace <td width="70%" nowrap="nowrap">{$item.product}</td> with <td width="70%" nowrap="nowrap">{if $current_membership_flag ne 'FS'}<a href="product_modify.php?productid={$item.producti d}" target="viewproduct{$item.productid}">{/if}#{$item.productid}. {$item.product}{if $current_membership_flag ne 'FS'}</a>{/if}</td> I have this formatted to show the product id too but you could amend accordingly. I also changed the actual title to match from <td>Product</td> to <td>Product Id and Title</td> I hope someone finds this useful. Watch out for extra spaces that seem to get added sometimes, there seems to be one in one of the ={$item.productid}" but it is not there when I edit. |
Re: Detailed Order Management Mod
works great! Thanks.
But how to show the "ship to customer"? Currently, it only show the name of the buyer. |
Re: Detailed Order Management Mod
The line that shows the ship to is the one below, the fact that it is using s_ means it is looking at the shipping name, or are you talking about the views shown in post #45, as thse are showing the standard customer details as per xcart config?
ship_to="{$orders[oid].s_title} {$orders[oid].s_firstname} {$orders[oid].s_lastname}" |
Re: Detailed Order Management Mod
your_xcart_dir/skin1/main/orders_list.tp
i cant find the skin1 folder anyone or do i have wrong version? X-Cart version 4.1.10 thanks ppl |
Re: Detailed Order Management Mod
All versions of x-cart have a skin1 folder. It is in the main directory where x-cart resides... right after "shipping" :)
|
Re: Detailed Order Management Mod
ok think i got it
http://pcsupply.com/skin1/images/noskin.JPG is my file menu shows no skin1 but i think im in skin1 lol ok ill try this thx |
Re: Detailed Order Management Mod
http://pcsupply.com/skin1/images/noskin.JPG
picture shows my directory and i am lost trying to find this one , i know its one level up but im not able to go another level up. any help would be appreciated. Thx i c ant find >>> your_xcart_dir/include/orders.php xcart version 4.1.10 |
Re: Detailed Order Management Mod
help anyone???
|
Re: Detailed Order Management Mod
"your_xcart_dir" is the directory that xcart is installed in. By default it installs in a folder named "xcart", but a lot of people either rename it to something like "store", or they move everything to the root (public_html) folder of their site.
Anyway, wherever your xcart is, there should be a "include" folder |
Re: Detailed Order Management Mod
Hi and thanks did you look at the picture??
in my xcart Admin I cant find this this its been a couple years since i worked xcart but this has me clueless. Can I do this from xcart Admin? or Do i need to FTP to access it or something? thank u |
Re: Detailed Order Management Mod
Your screenshot is of the skin1 folder. The files that need to be edited are not going to be there, as they are only the templates (no php files). You need to have a copy of your web site the hard drive of your computer so you can edit them, and upload them using ftp. Always make a backup of any file you modify! You will need the backup if something doesn't work right. I can't stress this enough.
|
Re: Detailed Order Management Mod
Hi just wondering if this mod will work on the new version 4.2
Many thanks |
Re: Detailed Order Management Mod
I know the color code part of it works with 4.2 but I don't use the "detail" part of it because it takes up too much room on the "orders" page.
|
Re: Detailed Order Management Mod
How can I get a copy of this module?
|
Re: Detailed Order Management Mod
Quote:
Hi Guys, Just a big thank you! This is a great MOD!!! |
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?
|
Re: Detailed Order Management Mod
I think you have to add the manufacturers to the query in the php file. I've added manufacturer to a few places, and I needed to do this a lot. The query that pulls the product details from the database doesn't pull the manufacturer by default. Try searching the forum as I'm pretty sure there's a post or two here about it,
hth |
Re: Detailed Order Management Mod
Thanks, I have had a look and done some more fiddling but I just cannot get it to bring up a manufacturer name. I have tried putting it onto the order details via /main/order_info.tpl, then bringing it out onto the order list but it won't pick up the manufacturer name on order-info.tpl. If anyone has any idea how we might do this I'd be extremely grateful!
Basically, I have tried to replace the provider line on the order info with the manufacturer. We don't use the provider facility so that is no loss, we have replaced the ORIGINAL code, which is: {if $usertype ne "C"} <TR> <TD valign="top">{$lng.lbl_provider}</TD> <TD valign="top">{$products[prod_num].provider}</TD> </TR> {/if} with this slightly modified code (lng.lbl_studio is our own creation): {if $usertype ne "C"} <TR> <TD valign="top">{$lng.lbl_studio}</TD> <TD valign="top">{$product.manufacturer}</TD> </TR> {/if} we have also tried: {if $usertype ne "C"} <TR> <TD valign="top">{$lng.lbl_studio}</TD> <TD valign="top">{$products[prod_num].manufacturer}</TD> </TR> {/if} Neither of those works, I'm not sure if it is a syntax issue or if I need to modify a PHP file or another template to pull the manufacturer information in. |
Re: Detailed Order Management Mod
Hello everybody.
I found this mod and I think it is very useful. Thank you all for all the great info you have provided! I have a little problem. I successfully installed the mod, added the colored lines, fixed the address to display the way I wanted. What I can't do is to make the part that enables/disables the details to work. I install it the correct way (done it three times) but when I hit the Show button, the page reloads and the hide button is still checked. And of course the details do not appear. Any idea what is happening? The version I'm trying to install is 4.3.2. Best regards, Andeas Nikolaidis |
Re: Detailed Order Management Mod
Hi all,
I love this mod. Used to have at 4.1. I got this working for 4.4.4 now Need to change the code a bit. Since this thread getting too long, I created a new one Here: http://forum.x-cart.com/showthread.php?t=61676 |
All times are GMT -8. The time now is 10:19 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.