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 5 of 5

Thread: Set 10000 variants to free shipping

  1. #1
    jerm324 is offline Senior Member
    Join Date
    Oct 2009
    Posts
    122

    Default Set 10000 variants to free shipping

    I uploaded 10000 products and their variants using the excel upload. However I need to set them all to free shipping. Is there a quick way to do this? Right now I either have to edit each product by itself, or I can go into sql management studio, open the table and change the 0 to a 1 in the free shipping column. But I really don't want to do that 10000 times. Is there an easier way to do this? I'm not really good at writing sql queries and stuff so I don't know where to start there.

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Cool

    Code:
    update dbo.ProductVariant set FreeShipping=1
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    jerm324 is offline Senior Member
    Join Date
    Oct 2009
    Posts
    122

    Default

    Is there a way to make it work on certain rows only? I have 5000 other products that don't have free shipping and I don't want to mark them as shipping free. Thanks.

  4. #4
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    Yes...but you'll need to know something about them...either name or VariantID, or something about them that makes them different from the others. My guess is, that if the other 5000 products existed before the import AND you haven't added any after then you could update only those 10000 products with
    Code:
    update dbo.ProductVariant set FreeShipping=1 where VariantID > #
    where # is the VariantID of the last ProductVariant record that you don't want updated. If you've got them all mixed and matched (eg. the first 3000 products are not free shipping, then the next 5892 products are free shipping, then 2 aren't, then 17 are, etc...) then you'll have to make a list of each of the variants that are not free shipping (there are less of them so it will be easier) and then run sql to update only the other ones
    Code:
    update dbo.ProductVariant set FreeShipping=1 where VariantID not in (#,#,#,#,#,#,#,#,#,#)
    where #,#,#,#,#,#,#,#,#,# is a comma separated list of the VariantIDs of the products that do not have free shipping.
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  5. #5
    jerm324 is offline Senior Member
    Join Date
    Oct 2009
    Posts
    122

    Default

    Thanks, this worked perfectly!