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

Thread: Adding Batch of New Gift Cards

  1. #1
    smg2 is offline Member
    Join Date
    Feb 2007
    Posts
    53

    Default Adding Batch of New Gift Cards

    Is there a way to import a batch of new gift cards from an excel file? I have about 300 voucher codes to enter and can't see a way to do it in an automated fashion.

  2. #2
    esedirect is offline Senior Member
    Join Date
    Feb 2010
    Location
    Norfolk, UK
    Posts
    343

    Default

    In the coupon.zip file is coupon.xls. It has all the columns of the coupon table (ML8.0.1.2). The last column is a formula used to create insert statements using just the basic information for creating new coupon records.

    The examples are:

    Code:
    INSERT INTO Coupon (CouponCode,ExpirationDate,DiscountPercent,CouponType) VALUES ('test', getdate()+365,1,0)
    INSERT INTO Coupon (CouponCode,ExpirationDate,DiscountPercent,CouponType) VALUES ('test2', getdate()+365,2.5,1)
    The first called 'test' is a coupon which expires this time next year, has a discount value of 1% (I'm generous ) and applies to the order subtotal (coupontype=0).

    The second is called 'test2', also expires in 365 days, has a discount value of 2.5%, and is applied to specific products, though I haven't named them.

    You would need to expand/extend the SQL formula in the Q column to include any of the other columns needed.

    I would strongly advise you to do this on a test/development server first before trying it on a production server to get the feel of what is going on.
    Attached Files Attached Files
    http://www.esedirect.co.uk
    --------------------------------------------------------------------------
    Using MS 9.2.0.0 with the following customisations:

    Lightbox/Fancybox enlarged images;
    Auto-suggest searchbox;
    Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
    Failed transactions emailed via trigger;
    Custom app to show basket contents when customer online;
    Orders pushed through to accounting systems.

    All the above without source!

  3. #3
    smg2 is offline Member
    Join Date
    Feb 2007
    Posts
    53

    Default

    Thank you for the help.