Copied to clipboard

Flag this post as spam?

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


  • Rich Green 2246 posts 4008 karma points
    Feb 04, 2010 @ 11:25
    Rich Green
    0

    Sortable only DataType which displays unique nodes from specific DocTypes?

    Hi,

    I'm looking to solve this a problem with either an existing Datatype or building a new one.

    The client would like to *add* and *sort* the optional extras available to a car at Manufacturer, Range and Model level.

    Here's the structure, everything marked with a * needs to be sortable

    Manufacturer - Model - Optional Extras

    VW

    - GOLF

    - Sunroof *

    - Metallic Paint *

    - BORA

    - CD Player *

    - Leather Seats *

    - Sunroof *

    - Touran 

    - 4 Wheel Drive *

    - Sunroof *

    - Leather Seats *

    AUDI

    - A3

    - Sat Nav *

    - Sunroof *

    - A4 

    - Leather Seats *

    - Heated Seats *

    - Sunroof *

     

    Configuration Section

    - All Optional Extras

    - Sunroof

    - Metallic Paint

    - CD Player

    - Leather Seats

    - Sunroof

    - 4 Wheel Drive

    - Sat Nav

    - Heated Seats

     

    The client will add the optional extras at a MODEL level, so for the GOLF they can add sunroof and Metallic Paint and then order these i so that when a user on the FRONT END selects, VW - GOLF - the optional extras will show in the order selected in the BACK END.

    The above is solved by using the "Tree Multipicker" with compatibility mode set to "Ultimate Picker" so up to now everything is fine, however here's where it gets a little tricky.

     

    The client would like to sort the optional extras at Range model (GOLF, TOURAN etc.) they will sort these optional extras based on ONLY the optional extras which have been selected previously at MODEL Level.

    So in the example everything with * must be Sortable

    They CANNOT ADD* at this level because it's assumed that if an optional extra is not available at MODEL level it cannot be available at Manufacturer level.

    VW

    - Metallic Paint *

    - CD Player *

    - Sunroof *

    - 4 Wheel Drive *

    - Leather Seats *

    AUDI

    - Sat Nav *

    - Sunroof *

    - Leather Seats *

    - Heated Seats *

     

    As far as I can tell there are two ways I can solve this:

     

    1) Have a datatype at Manufacturer level that displays and allows sorting of *unique* nodes from the Model doctype child nodes.

    2) Use the Event model to add an Optional Extra to the Manufacturer level when it's added at a Model Level and then a data type to sort these but not add or remove them.

    Are there any DataTypes that can help me achieve 1) or 2) ? I think option 1) would be the best way as it's guaranteed that at any time the Optional Extra's will be 'IN SYNC' with the child nodes, whereas option 2 relies should work 99% of the time.

    If you've got this far thanks so much for reading, hope it makes sense!

    Many thanks

    Rich

Please Sign in or register to post replies

Write your reply to:

Draft