Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Chris 34 posts 134 karma points
    May 20, 2015 @ 12:48
    Chris
    0

    Double shipping added to basket

    In our uCommerce site we only have one Shipping method, that is using a custom IShippingMethodService as we calculate pricing based on weight. The shipping service is correctly calculating the price, however for some reason the customer basket has 2 Shipment objects, with different ShipmentId values but the same ShippingMethod.ShippingMethodId values

    This is my code, with some comments

    TransactionLibrary.EditShippingInformation(
                    stage1Model.PersonalDetails.FirstName, 
                    stage1Model.PersonalDetails.Surname,
                    stage1Model.PersonalDetails.EmailAddress, 
                    stage1Model.PersonalDetails.TelephoneNumber, 
                    stage1Model.PersonalDetails.TelephoneNumber,
                    stage1Model.PersonalDetails.Company, 
                    previousStageModel.DeliveryAddress.Address1, 
                    previousStageModel.DeliveryAddress.Address2,
                    previousStageModel.DeliveryAddress.Postcode, 
                    previousStageModel.DeliveryAddress.City, 
                    previousStageModel.DeliveryAddress.County,
                    "", 
                    countryId);
    var currentShippingMethod = TransactionLibrary.GetShippingMethod();
    //The currentShippingMethod.ShippingMethodId is 9
    TransactionLibrary.CreateShipment(currentShippingMethod.ShippingMethodId, overwriteExisting: true);
    //At this point the basket has 2 Shipment objects, even though I'm passing the overwriteExisting = true;
    TransactionLibrary.ExecuteBasketPipeline();
  • Morten Skjoldager 440 posts 1499 karma points
    Jun 02, 2015 @ 13:07
    Morten Skjoldager
    0

    Hi Chris,

    I think if you just use EditShippingInformation like you do in the first block, then you're good to go. It will create a shipment if it doesn't exist based on the information you pass into it. 

    However can you try to post data related to the two shipments you have? I'd like to see if there's some data that deffer from each other!

    Best regards

    Morten

Please Sign in or register to post replies

Write your reply to:

Draft