Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Show attribute checkboxes 1 per line

Show attribute checkboxes 1 per line

Views: 985

Results 1 to 6 of 6
13 Jan 2014, 4:33 PM
#2
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Show attribute checkboxes 1 per line

setup your product_attributes CSS class to show those in list format:

<ul> <li> content here </li> <li> content here </li> <li> content here </li> </ul>
13 Jan 2014, 4:48 PM
#3
picaflor_azul avatar

picaflor_azul

Totally Zenned

Join Date:
Jul 2009
Location:
picaflor-azul.com
Posts:
6,940
Plugin Contributions:
28

Re: Show attribute checkboxes 1 per line

mkx900:

How do I show the attribute checkboxes on per line? I researched and played around with this for an hour with no luck. This is what it looks like now:

https://www.ushobby.com/dji-phantom-2-h32d-zenmuse-gimbal-ready-p-243.html?cPath=88

The attributes show one per line in the default template. I would take a look at the includes/templates/override/templates/tpl_modules_attributes file to see what changes have been made. You might even try backing up the file and then deleting it to see if the default works again.

Thanks,

Anne

13 Jan 2014, 5:16 PM
#4
mkx900 avatar

mkx900

New Zenner

Join Date:
Jan 2014
Posts:
4
Plugin Contributions:
0

Re: Show attribute checkboxes 1 per line

Here is my mj-template.css file lines, do I edit this? If so where?:

}
.product_attributes{
width:78%;
float:left;
}
.product_attributes > input, #addressBookDefault .product_info_left .change_add{
margin-right: 3px;
}
.product_attributes > label {
margin-right: 10px;
}

30 Jan 2014, 6:03 AM
#5
mkx900 avatar

mkx900

New Zenner

Join Date:
Jan 2014
Posts:
4
Plugin Contributions:
0

Re: Show attribute checkboxes 1 per line

Can anyone help? This is very important, looks messy

25 Sep 2015, 8:47 AM
#6
tamya avatar

tamya

Zen Follower

Join Date:
Feb 2007
Posts:
336
Plugin Contributions:
0

Re: Show attribute checkboxes 1 per line

Check around' line 650 of your file /public_html/includes/modules/attributes.php for this code

                    switch ($products_options_names->fields['products_options_images_style']) {

                      case '0':

                       $tmp_checkbox .= zen_draw_checkbox_field('id[' .  $products_options_names->fields['products_options_id'] .  ']['.$products_options_value_id.']', $products_options_value_id,  $selected_attribute, 'id="' . 'attrib-' .  $products_options_names->fields['products_options_id'] . '-' .  $products_options_value_id . '"') . '<label class="attribsCheckbox"  for="' . 'attrib-' .  $products_options_names->fields['products_options_id'] . '-' .  $products_options_value_id . '">' . $products_options_details .  '</label><br />' . "\n";

                      break;

                      case '1':

                       $tmp_checkbox .= zen_draw_checkbox_field('id[' .  $products_options_names->fields['products_options_id'] .  ']['.$products_options_value_id.']', $products_options_value_id,  $selected_attribute, 'id="' . 'attrib-' .  $products_options_names->fields['products_options_id'] . '-' .  $products_options_value_id . '"') . '<label class="attribsCheckbox"  for="' . 'attrib-' .  $products_options_names->fields['products_options_id'] . '-' .  $products_options_value_id . '">' .  ($products_options->fields['attributes_image'] != '' ?  zen_image(DIR_WS_IMAGES .  $products_options->fields['attributes_image'], '', '', '' ) . '  ' :  '') . $products_options_details . '</label><br />' . "\n";

                      break;

                      case '2':

                       $tmp_checkbox .= zen_draw_checkbox_field('id[' .  $products_options_names->fields['products_options_id'] .  ']['.$products_options_value_id.']', $products_options_value_id,  $selected_attribute, 'id="' . 'attrib-' .  $products_options_names->fields['products_options_id'] . '-' .  $products_options_value_id . '"') . '<label class="attribsCheckbox"  for="' . 'attrib-' .  $products_options_names->fields['products_options_id'] . '-' .  $products_options_value_id . '">' . $products_options_details .  ($products_options->fields['attributes_image'] != '' ? '<br />'  . zen_image(DIR_WS_IMAGES .  $products_options->fields['attributes_image'], '', '', '' ) : '') .  '</label><br />' . "\n";

                      break;

Make sure it has <br /> after <lable> in all 3 places.