Page 1 of 1
Order Admin - Find Customer
Posted: Wed Jun 24, 2009 9:01 am
by niall08
Has anyone created a broader search than the very restrictive email search in Manage > Orders > New Order?
The customer search in People > Users would be ideal..
Re: Order Admin - Find Customer
Posted: Wed Jun 24, 2009 9:34 am
by mazhar
In 7.0.3 the merchant order feature is updated with a new user search.
Re: Order Admin - Find Customer
Posted: Thu Jun 25, 2009 12:44 am
by niall08
Is there any way to join the "update" scheme if you didn't originally purchase the upgrade licence?
It seems that these upgrades aren't just an optional extra - in reality, they're absolutely crucial for AC to work effectively in the business-place..
Re: Order Admin - Find Customer
Posted: Thu Jun 25, 2009 6:10 am
by AbleMods
niall08 wrote:Is there any way to join the "update" scheme if you didn't originally purchase the upgrade licence?
It seems that these upgrades aren't just an optional extra - in reality, they're absolutely crucial for AC to work effectively in the business-place..
Usually not. The changes between two versions are usually extensive thus the need for a version release and not just a patch. I managed to survive several months running a mixture of pages and DLLs from 3 different flavors of AC7. In the end, it severely limited my ability to seek help for issues because my install was unique from everyone elses. I won't try that again.
A lot of vertical-market applications such as AC7 will offer the all-important maintenance agreement for this very situation. The software is dynamic and evolving, both good things. But their time investment requires cashflow to sustain the operation between major product releases. Maintenance helps keep the business cashflow consistent while allowing the software buyer opportunities to immediately take advantage of new features and functionality. It's a win-win for everyone.
Re: Order Admin - Find Customer
Posted: Mon Jul 27, 2009 11:45 am
by kastnerd
Under >Administration > Orders > Create Order > Step 1 of 4
There is a search, But Can I add Zip code to the search fields?
Re: Order Admin - Find Customer
Posted: Tue Jul 28, 2009 4:38 am
by mazhar
It doesn't support ZipCode search. Following options are available here
UserName, LastName, IncludeAnonymous, GroupId, FirstName, Email, Company
Re: Order Admin - Find Customer
Posted: Wed Jul 29, 2009 8:09 am
by kastnerd
Can i try and add zip code to the search?
Re: Order Admin - Find Customer
Posted: Wed Jul 29, 2009 10:04 am
by Logan Rhodehamel
kastnerd wrote:Can i try and add zip code to the search?
I think what Mazhar is referring to is the datasource method that is called by our search form does not have built in support for zip/postal code criteria.
Yes, you could probably add a custom zipcode search. The requirement here is you will need to implement your own database query to retrieve the data, and modify the search form to use your custom query rather than the one provided in the CommerceBuilder datasource.
Re: Order Admin - Find Customer
Posted: Wed Jul 29, 2009 10:06 am
by mazhar
I think what Mazhar is referring to is the datasource method that is called by our search form does not have built in support for zip/postal code criteria.
Yes my answer was about to do some trick with existing search method by passing something via criteria object.
Re: Order Admin - Find Customer
Posted: Thu Jul 30, 2009 5:26 am
by kastnerd
I have added this in CreateOrder1.aspx
Code: Select all
<tr>
<th class="rowHeader">
<asp:Localize ID="SearchShipToPostalCodeLabel" runat="server" Text="ShipToPostalCode:" EnableViewState="false"></asp:Localize>
</th>
<td>
<asp:TextBox ID="SearchShipToPostalCode" runat="server" Width="200px" MaxLength="200"></asp:TextBox>
</td>
</tr>
and CreateOrder1.aspx.cs
criteria.ShipToPostalCode = FixSearchString(SearchShipToPostalCode.Text);
But now i get this error.
Code: Select all
Server Error in '/' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0117: 'CommerceBuilder.Users.UserSearchCriteria' does not contain a definition for 'ShipToPostalCode'
Source Error:
Line 17: UserSearchCriteria criteria = new UserSearchCriteria();
Line 18: criteria.Email = FixSearchString(SearchEmail.Text);
Line 19: criteria.ShipToPostalCode = FixSearchString(SearchShipToPostalCode.Text);
Line 20: criteria.FirstName = FixSearchString(SearchFirstName.Text);
Line 21: criteria.LastName = FixSearchString(SearchLastName.Text);
Source File: c:\Inetpub\vhosts\notubes.com\httpdocs\Admin\Orders\Create\CreateOrder1.aspx.cs Line: 19
Re: Order Admin - Find Customer
Posted: Thu Jul 30, 2009 6:01 am
by AbleMods
You can't do it that way.
The programming code for the search routine is compiled in the DLL. You would need to have full source code to accomplish what you've shown in your post. There is no built in routine to accomodate a zipcode search.
What Logan and Mazhar are saying is you'll have to write your own complete SQL query search commands to be able to search by zip code. It'd be entirely custom - you won't be able to use the Able search engine to do it.
Re: Order Admin - Find Customer
Posted: Thu Jul 30, 2009 6:37 am
by Logan Rhodehamel
AbleMods wrote:The programming code for the search routine is compiled in the DLL. You would need to have full source code to accomplish what you've shown in your post. There is no built in routine to accomodate a zipcode search.
Or as an alternative, write a custom search method (not the built in one) that takes an additional parameter for zipcode. It would not require source, but it would be an intermediate/advanced task to implement. You have to take the criteria and turn it into a SQL query, execute the SQL, and then process the results.
So what additionally has to be customized is this:
Code: Select all
<asp:ObjectDataSource ID="UserDs" runat="server" SelectMethod="Search" TypeName="CommerceBuilder.Users.UserDataSource"
SelectCountMethod="SearchCount" EnablePaging="True" SortParameterName="sortExpression" DataObjectTypeName="CommerceBuilder.Users.User"
DeleteMethod="Delete" OnSelecting="UserDs_Selecting">
<SelectParameters>
<asp:Parameter Type="object" Name="criteria" />
</SelectParameters>
</asp:ObjectDataSource>
Right now the search form is calling CommerceBuilder.Users.UserDataSource.Search and CommerceBuilder.Users.UserDataSource.SearchCount. The first method executes the search and returns results, the second method executes the search and returns the total number of records. This is the code that needs to be replicated and customized.