Jump to content

avu

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

avu's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Why dos the <strong>300.00 ฿</strong> not go to the right border and why is it up 2 mm from the rest of the line text? this it the HTML output <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;"> <tr style="float:left;"> <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; "> <td><a href="http://xxxx.com/product_info.php?products_id=29{1}2"><img src="images/185.jpg" alt="Round Ball 18.5 cm (100 balls)" title=" Round Ball 18.5 cm (100 balls) " width="40" height="25" /></a></td> <td><span class="tdbLink"><button id="tdb7" type="submit">Update</button></span><script type="text/javascript">$("#tdb7").button({icons:{primary:"ui-icon-refresh"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script> <input type="text" name="cart_quantity[]" value="1" size="2" /><input type="hidden" name="products_id[]" value="29{1}2" /> 02 Orange Yellow <a href="http://xxxx.com/product_info.php?products_id=29{1}2"> <strong>Round Ball 18.5 cm (100 balls)</strong></a></li> <li style="float:right;width:0%;}" style="list-style: none; padding-left: 0px; margin: 0px; "><strong>300.00 ฿</strong> </td></li> </tr></table></td> </tr> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;"> <tr style="float:left;"> <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; "> <td><a href="http://xxxx.com/product_info.php?products_id=29{1}3"><img src="images/185.jpg" alt="Round Ball 18.5 cm (100 balls)" title=" Round Ball 18.5 cm (100 balls) " width="40" height="25" /></a></td> <td><span class="tdbLink"><button id="tdb8" type="submit">Update</button></span><script type="text/javascript">$("#tdb8").button({icons:{primary:"ui-icon-refresh"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script> <input type="text" name="cart_quantity[]" value="2" size="2" /><input type="hidden" name="products_id[]" value="29{1}3" /> 03 Orange <a href="http://xxxx.com/product_info.php?products_id=29{1}3"> <strong>Round Ball 18.5 cm (100 balls)</strong></a></li> <li style="float:right;width:0%;}" style="list-style: none; padding-left: 0px; margin: 0px; "><strong>300.00 ฿</strong> </td></li> </tr></table></td> </tr> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;"> <tr style="float:left;"> <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; "> <td><a href="http://xxxx.com/product_info.php?products_id=29{1}4"><img src="images/185.jpg" alt="Round Ball 18.5 cm (100 balls)" title=" Round Ball 18.5 cm (100 balls) " width="40" height="25" /></a></td> <td><span class="tdbLink"><button id="tdb9" type="submit">Update</button></span><script type="text/javascript">$("#tdb9").button({icons:{primary:"ui-icon-refresh"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script> <input type="text" name="cart_quantity[]" value="3" size="2" /><input type="hidden" name="products_id[]" value="29{1}4" /> 04 Parstel Pink <a href="http://xxxx.com/product_info.php?products_id=29{1}4"> <strong>Round Ball 18.5 cm (100 balls)</strong></a></li> <li style="float:right;width:0%;}" style="list-style: none; padding-left: 0px; margin: 0px; "><strong>300.00 ฿</strong> </td></li> </tr></table></td> </tr> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;"> <tr style="float:left;"> <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; "> <td><a href="http://xxxx.com/product_info.php?products_id=30"><img src="images/185.jpg" alt="20 CM Ball" title=" 20 CM Ball " width="40" height="25" /></a></td> <td><span class="tdbLink"><button id="tdb10" type="submit">Update</button></span><script type="text/javascript">$("#tdb10").button({icons:{primary:"ui-icon-refresh"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script> <input type="text" name="cart_quantity[]" value="1" size="2" /><input type="hidden" name="products_id[]" value="30" /> </td></li> </tr></table></td> </tr> </table> This is the code <table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php for ($i=0, $n=sizeof($products); $i<$n; $i++) { echo ' <tr>'; $products_name = '<table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;">' . ' <tr style="float:left;">' . ' <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; "><td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . ' <td>' . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']); if (STOCK_CHECK == 'true') { $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); if (tep_not_null($stock_check)) { $any_out_of_stock = 1; $products_name .= $stock_check; } } if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $products_name .= ' ' . '' . $products[$i][$option]['products_options_values_name'] . ' '; $products_name .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><strong>' . $products[$i]['name'] . '</strong></a></li>' . ' ' . '<li style="float:right;width:0%;}" style="list-style: none; padding-left: 0px; margin: 0px; "><strong>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong>'; } } $products_name .= ' </td></li>' . ' </tr>' . '</table>'; echo ' <td valign="top">' . $products_name . '</td>' . ' </tr>'; } ?> </table> also product without attribute missing this code. So I need to make an if no attribute than this code $products_name .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><strong>' . $products[$i]['name'] . '</strong></a></li>' . ' ' . '<li class="right" style="list-style: none; padding-left: 0px; margin: 0px; "><strong>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong>';
  2. It produces array 'total' => string '26' (length=2) also in the date base here are There are also products_attributes that contains products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix attributes_hide_from_groups
  3. I’m not sure what exactly you want to know or how to find it? In the database there are products_options that contains products_options_id, language_id, products_options_name And products_options_values that contains products_options_values_id, language_id, products_options_values_name, and this is the ones I like to spilt up after every15
  4. You got me thinking Actually I think that the $products_options_name is the option group and not the options. So with $products_attributes the new out put count all the option that in this case is 26 <?php if ($products_options_total['total'] == 1) { for($i=0;$i<$products_attributes['total'];$i++) { $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($n = 0 ; $n < count($products_options); $n++) { for ($i = 0; $i < count($cg_attr_prices) ; $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$n]['products_attributes_id']) { $products_options[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices) ; $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($n = 0 ; $n < count($products_options); $n++) { $products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']); if ($products_options[$n]['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } // EOF SPPC attributes mod if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <?php $count = 0; $maxPerList = 15; echo '<ul><li><input type="text" name='.$i.'_quantity value="" style="text-align:right;" size="3">&#8194;'; echo tep_draw_hidden_field($i.'_id[' . $products_options_name['products_options_id'] . ']', $products_options_array[$i]['id']) . $products_options_array[$i]['text']; echo "</li></ul>"; $total = count($products_attributes); $count = 1; echo "<ul>"; foreach($products_attributes as $currValue) { echo "<li>{$currValue}</li>"; if ($count % $maxPerList == 0 && $count != $total) { //Check if remainder is 0 or if it is the last product echo "</ul><ul>"; } $count++; } echo "</ul>"; } } // End of loop } the out put now is <ul><li><input type="text" name=0_quantity value="" style="text-align:right;" size="3">&#8194;<input type="hidden" name="0_id[1]" value="1" />01 Red</li></ul><ul><li>26</li></ul> <ul><li><input type="text" name=1_quantity value="" style="text-align:right;" size="3">&#8194;<input type="hidden" name="1_id[1]" value="2" />02 Orange Yellow</li></ul><ul><li>26</li></ul> <ul><li><input type="text" name=2_quantity value="" style="text-align:right;" size="3">&#8194;<input type="hidden" name="2_id[1]" value="3" />03 Orange</li></ul><ul><li>26</li></ul> <ul><li><input type="text" name=3_quantity value="" style="text-align:right;" size="3">&#8194;<input type="hidden" name="3_id[1]" value="4" />04 Parstel Pink</li></ul><ul><li>26</li></ul>
  5. This is the out put <ul><li><input type="text" name=0_quantity value="" style="text-align:right;" size="3">&#8194;<input type="hidden" name="0_id[1]" value="1" />01 Red</li></ul><ul><li>1</li><li>Color</li></ul> <ul><li><input type="text" name=1_quantity value="" style="text-align:right;" size="3">&#8194;<input type="hidden" name="1_id[1]" value="2" />02 Orange Yellow</li></ul><ul><li>1</li><li>Color</li></ul> <ul><li><input type="text" name=2_quantity value="" style="text-align:right;" size="3">&#8194;<input type="hidden" name="2_id[1]" value="3" />03 Orange</li></ul><ul><li>1</li><li>Color</li></ul>
  6. The $products_options_name is a color For each color are the name and a text felt to put quantity. I don’t get errors but the option name are now 2 line down from the text input felt and the line between there is a number “1” and it must be on same line
  7. What I want to do is show products_options 1-15 than split the listing so row 16-30 come in new column split again and show the next 15 products_options This code list in 3 line per product and do also not cut after 15. $count = 0; $maxPerList = 15; echo '<ul><li><input type="text" name='.$i.'_quantity value="" style="text-align:right;" size="3">&#8194;'; echo tep_draw_hidden_field($i.'_id[' . $products_options_name['products_options_id'] . ']', $products_options_array[$i]['id']) . $products_options_array[$i]['text']; echo "</li></ul>"; $total = count($products_options_name); $count = 1; echo "<ul>"; foreach($products_options_name as $currValue) { echo "<li>{$currValue}</li>"; if ($count % $maxPerList == 0 && $count != $total) { //Check if remainder is 0 or if it is the last product echo "</ul><ul>"; } $count++; } echo "</ul>"; } }
  8. So this must be this part Now with out $count = 0; Can’t figure out if the $count++; has to be before, after or between the <ul><li> echo '<ul><li><input type="text" name='.$i.'_quantity value="" style="text-align:right;" size="3">&#8194;'; echo tep_draw_hidden_field($i.'_id[' . $products_options_name['products_options_id'] . ']', $products_options_array[$i]['id']) . $products_options_array[$i]['text']; echo "</li></ul>"; foreach($products_options_name as $currValue) { if($count == $maxPerList) { echo "<ul>"; echo "<li>"; $count++; echo "</li>"; echo "</ul>"; } }
  9. Ok I got the formatting I think and hope. The tags ul and li now open and close. <?php if ($products_options_total['total'] == 1) { for($i=0;$i<$products_attributes['total'];$i++) { $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($n = 0 ; $n < count($products_options); $n++) { for ($i = 0; $i < count($cg_attr_prices) ; $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$n]['products_attributes_id']) { $products_options[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices) ; $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($n = 0 ; $n < count($products_options); $n++) { $products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']); if ($products_options[$n]['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } // EOF SPPC attributes mod if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <?php $count = 0; $maxPerList = 15; echo '<ul><li><input type="text" name='.$i.'_quantity value="" style="text-align:right;" size="3">&#8194;'; echo tep_draw_hidden_field($i.'_id[' . $products_options_name['products_options_id'] . ']', $products_options_array[$i]['id']) . $products_options_array[$i]['text']; echo "</li></ul>"; foreach($products_options_name as $currValue) { if($count == $maxPerList) { echo "<ul>"; echo "<li>"; $count = 0; echo "</li>"; $count++; echo "</ul>"; } } } }
  10. Sins my PHP/HTML knowledge are limit as well as my English are limit please explain in other words what you want I do so it is not incomplete, badly formatted example. When you said “badly formatted” I think you mean <ul style="list-style: none; padding-left: 0px; margin: 0px; "><li style="list-style: none; "> has to be in the CSS, let me know if I misunderstand? Because that is changed And when you sad “incomplete” you means the missing {} but there are the same numbers
  11. Hi Xyph not sure what you mean, is it this? <?php if ($products_options_total['total'] == 1) { for($i=0;$i<$products_attributes['total'];$i++) { $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($n = 0 ; $n < count($products_options); $n++) { for ($i = 0; $i < count($cg_attr_prices) ; $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$n]['products_attributes_id']) { $products_options[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices) ; $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($n = 0 ; $n < count($products_options); $n++) { $products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']); if ($products_options[$n]['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } // EOF SPPC attributes mod if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <?php $count = 0; $maxPerList = 15; echo '<ul><li><input type="text" name='.$i.'_quantity value="" style="text-align:right;" size="3">&#8194;'; echo tep_draw_hidden_field($i.'_id[' . $products_options_name['products_options_id'] . ']', $products_options_array[$i]['id']) . $products_options_array[$i]['text']; echo "<ul>"; foreach($products_options_name as $currValue) { if($count == $maxPerList) { echo "</ul>"; echo "<ul>"; echo "<li>"; $count = 0; } echo "</li>"; $count++; echo "</ul>"; }} } // End of loop }
  12. Sorry I mean the <li> here echo "</ul>"; echo "<ul>"; echo "<li>"; $count = 0; } echo "</li>"; $count++; echo "</ul>";
  13. Not sure where you want to place the <li> but I think this is the place. sorry for the missing } It dos not split up anything as intended yet. I think the problem is within this code <?php if ($products_options_total['total'] == 1) { for($i=0;$i<$products_attributes['total'];$i++) { $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0"); $list_of_prdcts_attributes_id = ''; $products_options = array(); // makes sure this array is empty again while ($_products_options = tep_db_fetch_array($products_options_query)) { $products_options[] = $_products_options; $list_of_prdcts_attributes_id .= $_products_options['products_attributes_id'].","; } if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') { $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")"; $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $customer_group_id . "'"); while ($pag_array = tep_db_fetch_array($pag_query)) { $cg_attr_prices[] = $pag_array; } // substitute options_values_price and prefix for those for the customer group (if available) if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) { for ($n = 0 ; $n < count($products_options); $n++) { for ($i = 0; $i < count($cg_attr_prices) ; $i++) { if ($cg_attr_prices[$i]['products_attributes_id'] == $products_options[$n]['products_attributes_id']) { $products_options[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix']; $products_options[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price']; } } // end for ($i = 0; $i < count($cg_att_prices) ; $i++) } } // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices)) } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0') for ($n = 0 ; $n < count($products_options); $n++) { $products_options_array[] = array('id' => $products_options[$n]['products_options_values_id'], 'text' => $products_options[$n]['products_options_values_name']); if ($products_options[$n]['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies->display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } // EOF SPPC attributes mod if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <?php $count = 0; $maxPerList = 15; echo '<ul style="list-style: none; padding-left: 0px; margin: 0px; "><li style="list-style: none; "><input type="text" name='.$i.'_quantity value="" style="text-align:right;" size="3">&#8194;'; echo tep_draw_hidden_field($i.'_id[' . $products_options_name['products_options_id'] . ']', $products_options_array[$i]['id']) . $products_options_array[$i]['text']; echo "<ul>"; foreach($products_options_name as $currValue) { if($count == $maxPerList) { echo "</ul>"; echo "<ul>"; $count = 0; } echo "<li>"; echo "</li>"; $count++; echo "</ul>"; }} } // End of loop }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.