Order Admin - Find Customer

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Order Admin - Find Customer

Post by niall08 » Wed Jun 24, 2009 9:01 am

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..

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Order Admin - Find Customer

Post by mazhar » Wed Jun 24, 2009 9:34 am

In 7.0.3 the merchant order feature is updated with a new user search.

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Order Admin - Find Customer

Post by niall08 » Thu Jun 25, 2009 12:44 am

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..

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Order Admin - Find Customer

Post by AbleMods » Thu Jun 25, 2009 6:10 am

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.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Order Admin - Find Customer

Post by kastnerd » Mon Jul 27, 2009 11:45 am

Under >Administration > Orders > Create Order > Step 1 of 4
There is a search, But Can I add Zip code to the search fields?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Order Admin - Find Customer

Post by mazhar » Tue Jul 28, 2009 4:38 am

It doesn't support ZipCode search. Following options are available here
UserName, LastName, IncludeAnonymous, GroupId, FirstName, Email, Company

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Order Admin - Find Customer

Post by kastnerd » Wed Jul 29, 2009 8:09 am

Can i try and add zip code to the search?

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Order Admin - Find Customer

Post by Logan Rhodehamel » Wed Jul 29, 2009 10:04 am

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.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Order Admin - Find Customer

Post by mazhar » Wed Jul 29, 2009 10:06 am

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.

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Order Admin - Find Customer

Post by kastnerd » Thu Jul 30, 2009 5:26 am

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 

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Order Admin - Find Customer

Post by AbleMods » Thu Jul 30, 2009 6:01 am

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.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Order Admin - Find Customer

Post by Logan Rhodehamel » Thu Jul 30, 2009 6:37 am

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.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

Post Reply