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.

  • Robert Mulder 79 posts 272 karma points c-trib
    Nov 07, 2014 @ 16:44
    Robert Mulder
    0

    Automatically assign product SKU

    I'm looking for a way to automatically have a product SKU assigned when creating a new product, but am unable to get this done.

    Looking into the pipelines I found the SaveProduct pipeline, so I figure I add a task to it to generate an Sku whenever the saved product has an empty (or some fixed default like '-') and generate an Sku.

    After adding the task to the pipeline as I've done multiple times already now the task never gets executed when adding or changing a product in the uCommerce backend.

    Is there anything specific I need to do to get this to work?

  • Martin 181 posts 740 karma points
    Nov 12, 2014 @ 18:42
    Martin
    0

    Hi Robert,

    As far I know the SaveProduct pipeline is only executed when a product is saved in the backend and not upon creation. You write that you have created pipeline components before but just for being sure do you have added your pipeline task to the SaveProduct.config?

    Best regards
    Martin 

  • Robert Mulder 79 posts 272 karma points c-trib
    Nov 13, 2014 @ 10:03
    Robert Mulder
    101

    Hi Martin,

    I thought I had deleted this topic as after cleaning the solution, restarting my pc and fully rebuilding the solution my pipeline task did get picked up. I think there was some caching going on that was preventing my newly registered task from being instantiated.

    It's all working great now, but thanks for taking the time to write a reply.

  • Martin 181 posts 740 karma points
    Nov 13, 2014 @ 10:55
    Martin
    0

    Hi Robert,

    Great to hear you found a solution. Just as a side note: uCommerce cache all pipeline/components etc. configuration at start up. So if you make changes to your configs you have to recycle your AppPool, IISExpress or saving the web.config.

    Best regards
    Martin 

  • Robert Mulder 79 posts 272 karma points c-trib
    Nov 13, 2014 @ 11:15
    Robert Mulder
    0

    Yeah, that's what I did before I posted where, which made me think I did something wrong. But in the end it worked after deleting the obj directory, restarting the pc and cleaning and rebuiding the entire project.

    Not sure which of those steps fixed the issue, but it's not uncommon for Visual Studio to mess up a site if you build and edit it while testing it, so I'm not too surprised :)

Please Sign in or register to post replies

Write your reply to:

Draft