Page 1 of 1

app lodgic

Posted: Sun Oct 20, 2013 3:31 pm
by Michael4771079

Hi,
I need help to decide whats the best app lodgic to use to achieve the following

I have a collapsible block in a grid.
I want to map a collection to the grid and the components in the block

2 of the columns in the collection are strings and need to be mapped to 2 labels

the other component in the collapsible block is a selectmenu
for which I have a size for the label of the selectmenu and price for the value

do I need to arrange label and price for selectmenu as array like this

size and price array

["{size=Eight Inch, price=2.50}","{size=Ten Inch, price=3.50}","{size=Ten Inch Stuffed Crust, price=5.00}","{size=Twelve Inch, price=4.50}","{size=Twelve Inch Stuffed Crust, price=6.50}","{size=Fourteen Inch, price=6.00}","{size=Fourteen Inch, price=8.00}"]

or do I heed 2 arrays, 1 for size and 1 for price, like this

["Eight Inch","Ten Inch","Ten Inch Stuffed Crust","Twelve Inch","Twelve Inch Stuffed Crust","Fourteen Inch","Fourteen Inch Stuffed Crust"]

["2.50","3.50","5.00","4.50","6.50","6.00","8.50"]

this is screenshot of block

Image

this is the selectmenu hand coded to show you the required result

Image


app lodgic

Posted: Sun Oct 20, 2013 3:52 pm
by maxkatz

And this data will be coming from a service..?


app lodgic

Posted: Sun Oct 20, 2013 3:58 pm
by Michael4771079

thats what I was hoping to Max, as they have more than 1 outlet and it would make it easier to compile for each shop.


app lodgic

Posted: Sun Oct 20, 2013 5:39 pm
by maxkatz

You could try to return a collection of pizza's and then it will have another collection inside that would be the size.


app lodgic

Posted: Sun Oct 20, 2013 5:51 pm
by Michael4771079

Not sure what you mean Max,
do you have an example?
thanks

I do have a service and it returning the labels fine i.e pizza name and description, see screenshots.
any array I have tried with selectmenu either returns the whole array to the selectmenu label

Image

Image


app lodgic

Posted: Sun Oct 20, 2013 9:15 pm
by maxkatz

You would need to make the size an array.


app lodgic

Posted: Sun Oct 20, 2013 9:56 pm
by Michael4771079

Max,
do you mean add $ under "size" and add array
Eight Inch
Ten Inch
Ten Inch Stuffed Crust

and them map the $ to where?
I really need an example for this Max, see what you can do :)


app lodgic

Posted: Mon Oct 21, 2013 11:33 am
by Maryna Brodina

Hello! It's better to use data this way pre["{size=Eight Inch, price=2.50}","{size=Ten Inch, price=3.50}","{size=Ten Inch Stuffed Crust, price=5.00}","{size=Twelve Inch, price=4.50}","{size=Twelve Inch Stuffed Crust, price=6.50}","{size=Fourteen Inch, price=6.00}","{size=Fourteen Inch, price=8.00}"] /pre and parse them as we suggested you here https://getsatisfaction.com/apperyio/...


app lodgic

Posted: Mon Oct 21, 2013 12:13 pm
by Michael4771079

Hi Marina,
I think this is different, as I have the array as you suggested in my collection, I am trying to populate the selectmenu with a get from database, here are screenshots,

Max mentioned "You would need to make the size an array"
but dont know what he nmeans.

Image Image


app lodgic

Posted: Mon Oct 21, 2013 1:08 pm
by Maryna Brodina

Please try the same way as suggested with a link above.