Copied to clipboard

Flag this post as spam?

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


  • Gonçalo Assunção 39 posts 68 karma points
    Dec 29, 2014 @ 17:34
    Gonçalo Assunção
    0

    Create a "Features Compare table" macro

    Hello guys!

    So, I'm using Umbraco 6 and Ucommerce. In UCommerce, I have:

    Stores
     Site
       Catalog
        Product type

    In "Product type", I have 3 products, with the same "product type", which I created in the definitions.
    The product type has 3 bolean data type, which I called "Feature_1", "Feature_2" and "Feature_3".

    The 1st product has the Feature_1 = true, and the other 2 = false.
    The 2nd product has the Feature_1 and Feature_2 = true, and the other = false.
    The 3rd product has all features = true.

    I want to create a Macro that returns a "Feature comparison" table.I have the layout of the table all ready with 4 columns. 1 for the feature description, and the other 3 for feature comparison of the 3 products.

    I need to recreate something like this:

    Description:   Prod_1   Prod_2  Prod_3
    Feature_1       yes        yes        yes
    Feature_2       no          yes        yes
    Feature_3       no          no          yes

    I figure I need to hold the products and the features in separate arrays, and run a loop to match the product with the features..

    I have researched the Ucommerce API documentation, but I figured I need somekind of jumpstart to do this..

    Thank you all in advance

Please Sign in or register to post replies

Write your reply to:

Draft