Quickly Map Manufacturers to Store in ASPDNSF Multi-Store solution

Quickly Map Manufacturers to Store in ASPDNSF Multi-Store solution

image I’m sure you’ve been there before. You (or your customer) have gone in and added all your products and defined which products go with which stores but then decided after the fact that you want to have a manufacturer’s page (or menu) that shows all the manufacturers of products that  exist in a give store on your Multi-Store solution.

What’s the solution? Enable all the Manufacturer’s for a given store? No, then you’ll end up with empty Manufacturers on the manufacturers listing page.

Do you slog through each store’s list of products to find the manufacturers and map them one by one as you encounter a new one? No, as not only is that too time consuming, this human process is far to ripe for chance of error.

The solution?

You can run a SQL command that will generate a series of insert commands that you can then paste back into SQL Mangler (I mean Microsoft SQL Server Management Studio) or Visual Studio in order to quickly add the mappings you need. Here is some sample code and it’s output:

As always, usual caveat’s apply:

  • Always back up your database first
  • Always test in a non-live environment before running batch commands like this
  • I cannot be held responsible for the failure of this code in your environment!

Any questions? Have tried something similar? If so, tell us about it in the comments below!

Stalk Me...

Michael Gibbs

I'm a technologist at heart, assisting companies best utilize the Internet to market themselves and sell their products and services online. This includes organizations as large as Google and as small as one or two individuals.
At Over The Top and Exhibit A Communications, I've programmed solutions for Google as well as at least one other company that was later acquired by Google.

I've been CTO of an Internet SaaS company and spent my time pretty evenly between guiding the future technical strategy of the company, architecting software solutions for my dev teams, designing and running a data center to service our clients world-wide as well as being a technical evangalist/sales engineer to our media clients large and small.

I've also been Chief Photographer of the Daily Sun/Post newspaper back when it was a 5-day a week daily newspaper.

I also spent a great many years as a beach lifeguardfor the City of San Clemente as well as Jr. Lifeguard instructor and then as it's program coordinator.
Bragging rights
Private Pilot with Instrument rating and proud husband of soon to be 25 years (and counting).
Stalk Me...

Latest posts by Michael Gibbs (see all)

Leave a Reply