Copied to clipboard

Flag this post as spam?

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


  • Louis Ferreira 69 posts 265 karma points
    Apr 03, 2017 @ 13:42
    Louis Ferreira
    0

    Multi-product Picker by Specific Collection in BO?

    Hi Rusty,

    Is there a way in the back office to be able to display a dialog that allows the user to select multiple products (like the Multi-Product Picker) but for a specific collection? Currently, the Multi-Product Picker only allows picking products from all collections.

    So for example, a user wants to be able to pick a collection, then select more than one product from that collection? More specifically, in the document type, I want to be able to specify which collection to use, and the user can only select one or more products from that collection in the content section? This is similar to Umbraco's content picker whereby you can select which is the 'start node', and only allows child nodes from there to be selected.

    If not, then where is a good place to start creating my own angular dialog for this? I'm thinking to copy the Multi-product dialog components and build on top of that one?

    Hope you can help

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Apr 10, 2017 @ 15:43
    Rusty Swayne
    100

    Hey Louis - sorry for the delay, I was on a little holiday =)

    You would need to create a custom datatype for this. It'll be a bit similar to the constraint used for selecting products valid for a coupon (with the exception it will be a datatype and will have a collection picker rather than a search):

    Here is the view:

    https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web.UI.Client/src/views/Marketing/dialogs/marketing.offerconstraint.productselectionfilter.html

    Here is the controller:

    https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web.UI.Client/src/views/Marketing/dialogs/marketing.offerconstraint.productselectionfilter.controller.js

  • Louis Ferreira 69 posts 265 karma points
    Apr 11, 2017 @ 13:17
    Louis Ferreira
    1

    Hi Rusty,

    Thanks for the reply. I wish I knew that before I started the route I went down... I ended up writing my own dialog editors and angular controllers by copying and extending the multi-product ones and adding them to the package manifest.

    Anyway, it was a good exercise as I now have a deeper understanding of the underlying nuts and bolts of Merchello as a result.

    I guess I'm pushing Merchello to it's limits, but good job and great product! I'm a fan of it.

Please Sign in or register to post replies

Write your reply to:

Draft