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.

  • Marianne Hildesheim Bertelsen 26 posts 169 karma points
    Jan 13, 2015 @ 09:31
    Marianne Hildesheim Bertelsen
    0

    uCommerce inventory increase when cancelling order not working

    Hi

    I've set up inventory management on a uCommerce project (= I've added the InventoryOnHand property in the product definition and added the pipelines tasks in Checkout.config and ToCancelled.config).

    The task in Checkout.config pipeline works as it should, and decreases the InventoryOnHand number when I complete an order. Yay.

    The task in ToCancelled.config, however, does not. When i cancel an order an uCommerce to trigger the ToCancelled pipeline, I get a YSOD with the following error message:

    Can't create component 'ToCancelled' as it has dependencies to be satisfied.

    'ToCancelled' is waiting for the following dependencies:
    - Component 'Checkout.IncrementInventoryOnHand' (via override) which was not found. Did you forget to register it or misspelled the name? If the component is registered and override is via type make sure it doesn't have non-default name assigned explicitly or override the dependency via name.

     

    Looks like some sort of dependency injection error... Did I miss somewhere I have to add something other than in the pipeline? My ToCancelled.config looks like this:

    <configuration>
    <components>
    <!-- Pipeline Instance -->
    <component id="ToCancelled"
      service="UCommerce.Pipelines.IPipeline`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
      type="UCommerce.Pipelines.OrderProcessing.OrderProcessingPipeline, UCommerce.Pipelines">
    <parameters>
    <tasks>
    <array>
    <!-- 
    Payment processing vendors usually require additional subscription fees for you to be able to access their API.
    Please consult your agreement to see if API access is supported for your particular plan.
    -->
    <!--<value>${ToCancelled.CancelPaymentTask}</value>-->
                <value>${Checkout.IncrementInventoryOnHand}</value>
    </array>
    </tasks>
    </parameters>
    </component>
    <!-- Pipeline Tasks-->
    <component id="ToCancelled.CancelPaymentTask"
      service="UCommerce.Pipelines.IPipelineTask`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
      type="UCommerce.Pipelines.OrderProcessing.CancelPaymentTask, UCommerce.Pipelines" />
        <component id="ToCancelled.IncrementInventoryOnHand"
                 service="UCommerce.Pipelines.IPipelineTask`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
                 type="UCommerce.Pipelines.OrderProcessing.IncrementInventoryOnHandTask, UCommerce.Pipelines" />
      </components>
    </configuration>

     

    uCommerce version is 6.5.2.14331

    Umbraco version is 7.2.0

  • Jesper Nielsen 141 posts 498 karma points
    Jan 13, 2015 @ 14:03
    Jesper Nielsen
    100

    Hello Marianne,

    The increment task has the same dependencies as the decrement.

    The problem is a bit more "down to earth" :-)

    You specify "${Checkout.IncrementInventoryOnHand}" as the component to use.

    But you register "ToCancelled.IncrementInventoryOnHand".

    "Checkout" != "ToCancelled" :-)

    Kind regards,

    Jesper

  • Marianne Hildesheim Bertelsen 26 posts 169 karma points
    Jan 13, 2015 @ 14:38
    Marianne Hildesheim Bertelsen
    0

    *facepalm!*

    I checked the <component> part again and again, but of course the copy+paste error was in the other part. :-)

     

    Please, uCommerce, convert your documentation from code screenshots to actual copyable code :-)

     

    Thanks, Jesper!

Please Sign in or register to post replies

Write your reply to:

Draft