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.

  • Davor Zlotrg 6 posts 96 karma points
    Jan 14, 2014 @ 16:18
    Davor Zlotrg
    0

    Products - flag that some mandatory fields are missing.

    Hi, I am using ucommerce and so far I really like it :)

    I have an issue, it's not actually an issue but something I would like to see. I have quite a few mandatory fields set up in my product definition and I don't want to show those products until all those fields are inserted.

    Is there any way I can know that a product is created but not all mandatory fields are set up, something like umbraco does with the nodes, you can save but not publish, plus those nodes are grayed out.

    I know I can write my own query, something like Products.All().Where(p => p.ProductProperties.All(pp => ...)) that will check for those properties and values but I don't like this because those properties may change and I would have to change the code as well.

    It would be nice if there was a property on a product or something like that? I suspect I would be getting a lot of support requests from my customers for not showing products on the frontend (if those products were grayed out on the backend it would be easier for them to spot that something is wrong, that they missed entering some of the fields).

  • Lars Horne-Mortensen 40 posts 184 karma points
    Jan 17, 2014 @ 12:19
    Lars Horne-Mortensen
    100

    Hi Davor,

    It's not a feature that we are currently planning on implementing. It should be possible for you to implement your own implementation though. You could do something where you go through all the product properties, and check if they have a value, and if they do, the product is shown.

    Something like this

    var shownProducts = Product.All().Where(x => 
        x.ProductProperties.All(y => y.Value != "")
    );
    

    Hope that helps,

    Lars

Please Sign in or register to post replies

Write your reply to:

Draft