OK, I am wanting to mdify the product query (connect to a different database and pull up items from columns that are named differently), and of course I can not even find where the queries are hidden in asp.net...
I know to look at the Web.Templates.Products.VariantsInGrid page, drill down to
Web.Modules.ProductInfo and there I see, for example:
NopCommerce uses a provider model for data access.
The EntityManager classes in Nop.Common call the provider methods in Nop.DataAccess.
The providers are responsible for passing the request to the relevant data store specific provider - currently Nop.DataAccess.SqlServer - this is where you will find the methods that call the relevant stored procedures in your MSSQL db.
Yes, thank you. Now I know where to look. I will study it some more.
I may have products with the same item number (ID), like BMW 550 Mercedes 550
I would like to call the Product ID 550. but I am afraid that the Product ID has to be unique? Can I modify this to look for both manufacturer and item number? Something along these lines in Nop.DataAccess.SqlServer.xml??
Yes, the ID has to be unique. And I do now want to duplicate them, I want to duplicate the item number. I can do that, but also need it to be the thing we search for.
The products we sell often have item numbers instead of names. And thus they are known by their item number, and identified as such.
For example, we may have a Dell 1200, and a Compaq 1200 in our inventory (I am making up these items).
Right now in our system (not NopCommerce), both items have a unique ID, but the customer never really sees that ID.
When they search on the website, they can:
-search by just the item number (in this case it would give them 2 results: Dell 1200, and Compaq 1200)
-search by just the manufacturer (in this case it would give them many results, and offer categories and subcategories to narrow search)
-search by manufacturer and itemnumber (in this case it would find the specific item, and show the product)
So instead of searching by that unique ID (which in my case is just a rowkey, and has nothing to do with the actual product), I would like to search by item number and manufacturer.
You should not change the GetProductByID method as this is used to get single product instances.
If your aim is to extend the customer search so that it searches an additional field as well (your item number) then have a look at the GetAllProducts methods in Nop.Common.Products.ProductManager.
In fact you could probably get away with just changing your stored procedure/xml provider
Hope this helps, Ben
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.