Multiple lists

4 posts by 2 authors in: Forums > CMS Builder
Last Post: November 9, 2010   (RSS)

By Oakweb - November 6, 2010

Hi

I am using a multi-selection list box to display a list of product sizes

<?php echo join(', ', getListLabels('doors', 'sizes', $doorsRecord['sizes'])); ?>

They currently display on the viewer as - item1, item 2, item 3 etc - all on one line.

I would like to display them 1 per line instead.

Is there an easy way to achieve this?

Also whilst I have been writing this it appears to have got more complicated.
[/#000000]

The site I am working on displays doors that are available in a selection of different sizes and a selection of different prices[/#000000]

I want to get it so that the client can input each and it displays on the site. Foir example, one door might be avaialble in sizes 12"x78"x35mm, 15"x78"x35mm, 18"x78"x35mm, 21"x78"x35mm with a price of 120 each whist anothe door might be available the same sizes but different prices for each.[/#000000]

It would then need to display something like this:[/#000000]

[font "Arial"]78x24"x35mm £75 To order.


[font "Arial"]78x27"x35mm £75 To order.


[font "Arial"]78x30"x35mm £80To order.


[font "Arial"]80x32"x35mm £75 To order.


[font "Arial"]78x33"x35mm £75 To order.

[font "Arial"]2040x726x40mm £80 To order.

[font "Arial"]2040x826x40mm £80 To order.

Any advice would be much appreciated - assuming any of what I hae said makes sense.[/#000000]

Re: [Oakweb] Multiple lists

By Jason - November 8, 2010

Hi,

You can easily get each label on a separate line by replacing the comma with a break like this:

<?php echo join('<br/>', getListLabels('doors', 'sizes', $doorsRecord['sizes'])); ?>

As for the second part of your question, where is the pricing information for each size stored? Let me know and we'll see what we can do.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Oakweb] Multiple lists

By Jason - November 9, 2010

Hi Paul,

I think I see what you're saying. Once you have a field for price, I can help you get that value into your string.

Another tip would be to use only 1 section editor for doors. You could store all doors in there and then have a drop down where you can specify if a particular door is oak, mahogany, teak, etc. This would simply searching as you would only have to search one section instead of several.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/