Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Direct access to orders and items

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 11-27-2007, 11:19 AM
 
mgatten mgatten is offline
 

Senior Member
  
Join Date: Jan 2004
Posts: 158
 

Default Re: Direct access to orders and items

This is a great little mod!

I liked the idea of having it in the header area, but my search needs are a little different so I made some changes. Firstly, I would never use it for searching for a product, so I didn't need that part. I just need to search orders frequently. Sometimes I have an order number, but sometimes I only have a name and vague idea of time, or just a name with no idea of time.

So mine now sits in the header with a field for order number, a field for name, and radio buttons for time periods. There's no submit button since you can just hit enter.

I should also mention that I never use the language selector that appears in that area of the header, so I actually replaced it with the order search. If you use the language selector, be aware that this will make it go away.

I don't know how some people are making images appear in their posts, since the img tag doesn't seem to do it, but here's a link to a snapshot:
http://forum.x-cart.com/attachment.php?attachmentid=659&stc=1&d=1196193934 Snap1.jpg

To do this, I edited skin1/head_admin.tpl. Find the following snippet. If you haven't already modified the file you should find it at lines 15-37, but just be sure you are looking at the whole table row (the <tr> before the '{if' all the way through to the </tr> that comes after the {else}):
Code:
<tr> <td colspan="2" class="HeadLine" align="right" height="22"> {if ($usertype eq "P" or $usertype eq "A") and $login and $all_languages_cnt gt 1} <form action="{$smarty.server.REQUEST_URI|amp}" method="post" name="asl_form"> <table cellpadding="0" cellspacing="0"> <tr> <td><b>{$lng.lbl_current_language}:</b>&nbsp;</td> <td> <input type="hidden" name="redirect" value="{$smarty.server.QUERY_STRING|amp}" /> <select name="asl" onchange="javascript: document.asl_form.submit()"> {section name=ai loop=$all_languages} <option value="{$all_languages[ai].code}"{if $current_language eq $all_languages[ai].code} selected="selected"{/if}>{$all_languages[ai].language}</option> {/section} </select> </td> </tr> </table> </form> {else} &nbsp; {/if} </td> </tr>

Replace that entire snippet with this one: (After backing up the original, of course)
Code:
<tr> <td colspan="2" class="HeadLine" align="right" height="22"> {if ($usertype eq "P" or $usertype eq "A") and $login} <table> <tr> <td> <form name="searchform" action="order.php" method="post"> <table> <tr> <td>Order Number:</td> <td><input name="orderid" type="text" size="10" maxlength="8"></td> </tr> </table> </form> </td> <td> <form name="searchform" action="orders.php" method="post"> <table> <tr> <td>Name:</td> <td><input name="posted_data[customer]" type="text" size="10" maxlength="35"></td> <td><input name="posted_data[date_period]" value="" checked="checked" type="radio"></td> <td width="60">All dates</td> <td><input name="posted_data[date_period]" value="M" type="radio"></td> <td width="80">This month</td> <td><input name="posted_data[date_period]" value="W" type="radio"></td> <td width="80">This week</td> <td><input name="posted_data[date_period]" value="D" type="radio"></td> <td width="60">Today</td> <td width="1"><input type="hidden" id="orderid2" name="orderid2" value=""><input type="hidden" name="posted_data[by_username]" value="on"><input type="hidden" name="posted_data[by_firstname]" value="on"><input type="hidden" name="posted_data[by_lastname]" value="on"><input type="hidden" name="posted_data[address_type]" value="Both">&nbsp;</td> </tr> </table> </form> </td> </tr> </table> {else} &nbsp; {/if} </td> </tr>
I hope somebody finds this useful!!

(By the way, I did this in version 4.1.9. Your mileage may vary in other versions.)

Marshall
Attached Thumbnails
Click image for larger version

Name:	Snap1.jpg
Views:	455
Size:	22.6 KB
ID:	659  
__________________
--------
http://www.miracleblanket.com Version 4.4.2
http://www.spot4tots.com Version 4.4.2
http://www.certifiedmiracles.com Version 4.4.2
Reply With Quote

The following user thanks mgatten for this useful post:
Cappiello (05-05-2009)
  #22  
Old 12-02-2007, 04:31 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Direct access to orders and items

Marshall - works great! Thanks!
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #23  
Old 12-04-2007, 03:21 PM
 
weckie weckie is offline
 

eXpert
  
Join Date: Feb 2005
Location: Netherlands
Posts: 220
 

Default Re: Direct access to orders and items

The same one can do with USERS.
Just put this line in.

<form action="user_modify.php">
User: <input type="text" name="user"> <input type="hidden" name="usertype" value="C"> <input type="submit" value="&nbsp;Find&nbsp;">
</form>

Regards.
__________________
Herman Steijn

Using: X-cart 4.5.4
AT: http://www.weckonline.com LIVE
Reply With Quote
  #24  
Old 12-14-2007, 10:39 AM
 
mgatten mgatten is offline
 

Senior Member
  
Join Date: Jan 2004
Posts: 158
 

Default Re: Direct access to orders and items

I've noticed that the first time I do a search by order number it often tells me that I don't have access to that area, but doesn't log me out. Just re-doing the exact same search then works fine. Has anybody else seen this? Anybody have any idea what might be causing it?

Marshall
__________________
--------
http://www.miracleblanket.com Version 4.4.2
http://www.spot4tots.com Version 4.4.2
http://www.certifiedmiracles.com Version 4.4.2
Reply With Quote
  #25  
Old 12-14-2007, 11:20 PM
 
Looker1 Looker1 is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 60
 

Default Re: Direct access to orders and items

worked perfectly for me- thanks for such a necessary mod!
__________________
Version 4.1.9
Reply With Quote
  #26  
Old 12-15-2007, 09:04 AM
  HWT's Avatar 
HWT HWT is offline
 

eXpert
  
Join Date: Jan 2005
Location: Massachusetts, USA
Posts: 392
 

Default Re: Direct access to orders and items

Quote:
Originally Posted by mgatten
I've noticed that the first time I do a search by order number it often tells me that I don't have access to that area, but doesn't log me out. Just re-doing the exact same search then works fine. Has anybody else seen this? Anybody have any idea what might be causing it?

Marshall

Yes, a space. Make sure there are no spaces before or after your order id #. Happens to me all the time when I'm searching orders to put in tracking #'s. Every time I think Oh @#$%@#$!!!!, and waste another few seconds. I've gotten much better at selecting when I copy/paste.
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10
Reply With Quote
  #27  
Old 01-05-2008, 10:53 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Direct access to orders and items

Still would love to be able to search by the customers tracking number as well....
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #28  
Old 05-21-2008, 07:53 PM
 
wayneherndon wayneherndon is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 39
 

Default Re: Direct access to orders and items

Anyone know how to set this up to direct access to a product using an Extra Field (manufacturer model number in my case).

WH
__________________
X-Cart Version 4.1.8
Linux Operating System
Stone Edge Order Manager Enterprise 5.916
www.wayneherndon.com
www.wizardcoinsupply.com
Reply With Quote
  #29  
Old 05-22-2008, 07:47 AM
 
tnpaintballers tnpaintballers is offline
 

Member
  
Join Date: Sep 2007
Posts: 28
 

Default Re: Direct access to orders and items

Quote:
Originally Posted by wayneherndon
Anyone know how to set this up to direct access to a product using an Extra Field (manufacturer model number in my case).

WH

I wont have time to try & work on this until this weekend. I think this will be harder to make because this is a dynamic field. I am sure I will have to hard code the Extra Field index key or something. I will post sometime on Sunday when I have something.
__________________
Version 4.1.8

TN Paintballers LLC
914 N Charles G Seivers Blvd
Clinton, TN 37716
865-457-8000
www.tnpaintballers.com
Reply With Quote
  #30  
Old 05-23-2008, 04:36 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Direct access to orders and items

Sweet mod! It was so simple to do that I took the 5 minutes to install in in the working site that we are planning to upgrade soon. So I can vouch it works in 4.0.19 and 4.1.8. Both times I just followed the instructions in post #21.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:30 PM.

   

 
X-Cart forums © 2001-2020