Copied to clipboard

Flag this post as spam?

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


  • Ryan Dansie 17 posts 98 karma points
    Apr 05, 2016 @ 11:42
    Ryan Dansie
    0

    update index after programatically creating shipment

    In my implementation of Merchello I have got to a point where a shipment is programatically added once payment confirmation has been received.

    I can see the shipment I have added in the database but I dont see it in the back end unless I manually delete the Merchello examine indexes.

    I want the shipment to be immediately visible in the back end but I cant seem to programatically clear/rebuild the examine indexes from c# after adding the shipment.

    So far I have tried this:

    Examine.ExamineManager.Instance.IndexProviderCollection["MerchelloInvoiceIndexer"].RebuildIndex();
    

    and this:

    var IndexProvider = Examine.ExamineManager.Instance.IndexProviderCollection["MerchelloInvoiceIndexer"];
    
    IndexProvider.DeleteFromIndex(invoice.Key.ToString());
    

    But nether solution has worked. I would appreciate any guidance as to clear/update the index.

  • Ryan Dansie 17 posts 98 karma points
    Apr 05, 2016 @ 13:56
    Ryan Dansie
    101

    I ended up adding the shipment in a different way which solved the issue. Full details are in this thread:

    https://our.umbraco.org/projects/collaboration/merchello/merchello/75959-manually-create-shipment-for-an-orderinvoice

  • Ryan Dansie 17 posts 98 karma points
    Apr 11, 2016 @ 11:33
    Ryan Dansie
    0

    I have just ran into the same problem again after updating the stock levels programatically. I will attempt to solve it using a similar approach as before but it would be good to get an answer as to how to update the indexes after anything changes in the database.

Please Sign in or register to post replies

Write your reply to:

Draft