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: Move to cart button deleting wishlist items

  1. #1
    sam.bengtson is offline Member
    Join Date
    Jan 2011
    Posts
    64

    Default Move to cart button deleting wishlist items

    Hey I've been trying to get the wishlist to stop deleting items when you click to the move to cart button. I finally found the line thats been doing it. Its in wishlist.aspx.cs
    Code:
    DB.ExecuteSQL(string.Format("UPDATE ShoppingCart SET CartType = {0} WHERE ShoppingCartRecID = {1}", 1, MoveToCartID));
    Unfortunatley, deleting this line also disables the ability to move items to the cart. Can anybody help me modify this line or create a new sql command to move items to the cart without deleting them from the wishlist? Thanks!

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

    Default

    This will create a 'copy' record of the wishlist record. And, therefore, should be placed directly BEFORE the statement you identified. This record will then become the wishlist and the other will then still become the shopping cart record.
    Code:
    DB.ExecuteSQL(string.Format("INSERT INTO [ShoppingCart] ([CustomerID],[ProductSKU],[ProductPrice],[ProductWeight],[ProductID],[VariantID],[Quantity],[RequiresCount],[ChosenColor],[ChosenColorSKUModifier],[ChosenSize],[ChosenSizeSKUModifier],[IsTaxable],[IsShipSeparately],[IsDownload],[DownloadLocation],[FreeShipping],[CreatedOn],[ProductDimensions],[CartType],[IsSecureAttachment],[TextOption],[NextRecurringShipDate],[RecurringIndex],[OriginalRecurringOrderNumber],[BillingAddressID],[ShippingAddressID],[ShippingMethodID],[ShippingMethod],[DistributorID],[SubscriptionInterval],[Notes],[IsUpsell],[GiftRegistryForCustomerID],[RecurringInterval],[RecurringIntervalType],[ExtensionData],[SubscriptionIntervalType],[CustomerEntersPrice],[IsAKit],[IsKit2],[IsAPack],[IsSystem],[TaxClassID],[TaxRate],[RecurringSubscriptionID]) SELECT [CustomerID],[ProductSKU],[ProductPrice],[ProductWeight],[ProductID],[VariantID],[Quantity],[RequiresCount],[ChosenColor],[ChosenColorSKUModifier],[ChosenSize],[ChosenSizeSKUModifier],[IsTaxable],[IsShipSeparately],[IsDownload],[DownloadLocation],[FreeShipping],[CreatedOn],[ProductDimensions],[CartType],[IsSecureAttachment],[TextOption],[NextRecurringShipDate],[RecurringIndex],[OriginalRecurringOrderNumber],[BillingAddressID],[ShippingAddressID],[ShippingMethodID],[ShippingMethod],[DistributorID],[SubscriptionInterval],[Notes],[IsUpsell],[GiftRegistryForCustomerID],[RecurringInterval],[RecurringIntervalType],[ExtensionData],[SubscriptionIntervalType],[CustomerEntersPrice],[IsAKit],[IsKit2],[IsAPack],[IsSystem],[TaxClassID],[TaxRate],[RecurringSubscriptionID] FROM [ShoppingCart] WHERE [ShoppingCartRecID] = {0}", MoveToCartID));
    As usual, please try this on a devleopment database/shop first.
    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
    sam.bengtson is offline Member
    Join Date
    Jan 2011
    Posts
    64

    Cool

    Exactly what I was looking for. I ended up getting it to work by doing it the long version but this helps alot. Thank you!