Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

app lodgic

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

app lodgic

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

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

app lodgic

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

app lodgic

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

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

app lodgic

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

app lodgic

You would need to make the size an array.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

app lodgic

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 :)

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

app lodgic

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/...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

app lodgic

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

app lodgic

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

Return to “Issues”