Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Combining Products of Two Different Stores

  1. #1
    jmcconahie is offline Junior Member
    Join Date
    Nov 2011
    Posts
    13

    Default Combining Products of Two Different Stores

    We have 2 different stores with different products and we want to combine them into one store. Is there an easy way to export all the products, including descriptions and images, from one store to import into the other? Using ML8

  2. #2
    Skriver is offline Senior Member
    Join Date
    Apr 2012
    Posts
    188

    Default

    We had four stores and were in the process of combining them into one.

    It depends on how you handle the other store but it you want to combine all the products and have SQL access (or you can run it from the admin) then the below code should move all the stores from one store to another.

    **PLEASE BACKUP THE DATABASE FIRST OR TRY IT ON A DEVELOPMENT DATABASE FIRST**

    insert into ProductStore (StoreID, ProductID)
    select 2,ProductID
    from dbo.Product p
    where p.ProductID not in (select ProductID from ProductStore where StoreID = 2)
    and p.Published = 1
    and p.Deleted = 0

    The numbers 2 in lines 2 an 4 will import any missing products into store 2 that are mapped to another StoreID. If you want to change this to another store ID simply change these numbers.

    But please note this will still retain those products in the other store. If you want to remove them then I would envisage changing the StoreID in the entire product database to whatever StoreID you wish
    Last edited by Skriver; 08-23-2013 at 03:08 AM.