Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 1 votes

Custom Computer Creator v9 Support


538 replies to this topic

#21 Unified

  • Community Member
  • 97 posts
  • Real Name:Jiten
  • Location:London

Posted 26 December 2003, 13:26

Hi Stephen

Here is the snippet of code from my catalog/includes/classes/order.php file:

      $index = 0;

// BEGIN - Product Serial Numbers
      $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, products_serial_number from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
// END - Product Serial Numbers

      while ($orders_products = tep_db_fetch_array($orders_products_query)) {
   
   //BOF CCC
      $description_query = tep_db_query("select products_description as desc_info from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = " . $orders_products['products_id']);
      $description_info = tep_db_fetch_array($description_query);
      //EOF CCC
   
        $this->products[$index] = array('qty' => $orders_products['products_quantity'],
                                     'id' => $orders_products['products_id'],
          //BOF CCC 
               	 'description' => $description_info['desc_info'],
            //EOF CCC
                                        'name' => $orders_products['products_name'],
                                        'model' => $orders_products['products_model'],
                                        'tax' => $orders_products['products_tax'],
                                        'price' => $orders_products['products_price'],
          // BEGIN - Product Serial Numbers
                                        'serial_number' => $orders_products['products_serial_number'],
          // END - Product Serial Numbers
                                        'final_price' => $orders_products['final_price']);

        $subindex = 0;

Note that I am using serial numbers contribution - but that shouldn't be causing any problems

Here is my code snippet from catalog/shopping_cart.php

      $info_box_contents[$cur_row][] = array('align' => 'center',
                                             'params' => 'class="productListing-data" valign="top"',
                                             'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], false,'onFocus="advisecustomer();"'));

/*
      $products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
                       '  <tr>' .
                       '    <td class="productListing-data" align="center"><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 class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';
*/

// BOF CCC nb replaces above
if ($products[$i]['name'] == "Custom Computer"){
$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
' <tr>' .
' <td class="productListing-data" align="center">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</td>' .
' <td class="productListing-data" valign="top"><b>' . $products[$i]['name'] . '</b>' .
'<br><small><i>' . $products[$i]['description'] . '</small></i>';
}else{
$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
' <tr>' .
' <td class="productListing-data" align="center"><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 class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';
}
// EOF CCC

      if (STOCK_CHECK == 'true') {

I am using the Options type feature contribution by Chandra - changes to shopping_cart.php, orders.php etc were also made - may this be causing any problems?

Thank you

Jiten

#22 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 13:28

try that other code i just posted and see if it makes it work.

good thing i am keeping this on record, i am tired of going through this every time
i release a contribution i forget to put all the edits in, i will be posting the edited readme file whem i get a few of you guys worked out so i can hopefully get all the edits included.

Edited by sw45859, 26 December 2003, 13:31.


#23 Unified

  • Community Member
  • 97 posts
  • Real Name:Jiten
  • Location:London

Posted 26 December 2003, 13:43

Stephen

I inserted the other change and still nothing.

Can you expand on the database information.

I do have descriptions for the products but they have html in it - will this cause any problems? Also I am using header tags controller by Linda McGrath and this has altered the products_description table


Also another prob noted - I am losing my sessions. If i have products in my cart and then I goto ccc.php the select a FSB speed, I lose my session - If i am logged in i also get logged out?

Regards

Jiten

#24 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 13:51

as far as the sessions, i have to add them, i didn't think about the sessions but it is a problem that will be fixed, and for the products description table, as long as the prodcut_id matches with the product_id under the products table it should pull it up, let me look and see if there are any other changes i may have missed.

#25 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 13:58

OOOOOOOKKK, heres another one i forgot, in
catalog/includes/classes/shopping_cart.php around line 281 replace:
          $products_array[] = array('id' => $products_id,
                                    'name' => $products['products_name'],
                                    'model' => $products['products_model'],
                                    'image' => $products['products_image'],
                                    'price' => $products_price,
                                    'quantity' => $this->contents[$products_id]['qty'],
                                    'weight' => $products['products_weight'],
                                    'final_price' => ($products_price + $this->attributes_price($products_id)),
                                    'tax_class_id' => $products['products_tax_class_id'],
                                    'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''));
with
          $products_array[] = array('id' => $products_id,
                                    'name' => $products['products_name'],
                                    'model' => $products['products_model'],
                                    'image' => $products['products_image'],
     //CUSTOM COMPUTER
                                    'description' => $products['products_description'],
     //DONE
                                    'price' => $products_price,
                                    'quantity' => $this->contents[$products_id]['qty'],
                                    'weight' => $products['products_weight'],
                                    'final_price' => ($products_price + $this->attributes_price($products_id)),
                                    'tax_class_id' => $products['products_tax_class_id'],
                                    'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : ''));
that is updated in the new readme as well, now.

#26 Unified

  • Community Member
  • 97 posts
  • Real Name:Jiten
  • Location:London

Posted 26 December 2003, 14:05

Hi stephen - still no luck

Not too sure what it could be.

I am gonna try to see if it works on a clean install of MS2.

This way if it works - then it is likely to be another contribution or amendment I am using/have made.

Will let you know how it goes - give me a couple of minutes

Regards

Jiten

#27 Unified

  • Community Member
  • 97 posts
  • Real Name:Jiten
  • Location:London

Posted 26 December 2003, 14:38

Hi stephen

Just did a fresh install and redid all installation steps.

Now I have encountered a problem mentioned earlier. When adding a product and clicking on the radio button - nothing happens?

I think a function may be needed in admin/includes/function/general.php ?

Maybe when I installed it on my previous shop a function must have been inserted through another contribution?

Any ideas?

Regards

Jiten

#28 Mibble

  • Community Member
  • 13,404 posts
  • Real Name:JAO
  • Location:MA (US): 42n22, 71w04, Massachusetts

Posted 26 December 2003, 14:38

Hello,

For those of us who may wish to help debug this, have all the changes being discussed here been transferred to the contrib source code, so it can be uploaded?

#29 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 14:47

do you have it accessible from the web, i would like to see the problem or i can't see what is actually wrong.

#30 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 15:05

i will add the readme file to the contribution area, all changes up to now should be in it, i would really like to see this submit issue if anyone is having it that can show it to me.

#31 Unified

  • Community Member
  • 97 posts
  • Real Name:Jiten
  • Location:London

Posted 26 December 2003, 15:08

ok i have figured out the issue of adding products

I was wrong it was NOT general.php

THE file that needs changing is admin/includes/functions/html_output.php

Basically I do not know exactly what needs doing but the required code needed to make the adding of products work comes from the ADMIN ACCESS WITH LEVELS CONTRIBUTION. Here is a copy of my html_output.php file with the code from admin access with levels - I just included the whole code from that contribution in my html_output file as when i tried to be selective I was getting errors!

<?php
/*
  $Id: html_output.php,v 1.29 2003/06/25 20:32:44 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

////
// The HTML href link wrapper function
  function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
    if ($page == '') {
      die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
    }
    if ($connection == 'NONSSL') {
      $link = HTTP_SERVER . DIR_WS_ADMIN;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL == 'true') {
        $link = HTTPS_SERVER . DIR_WS_ADMIN;
      } else {
        $link = HTTP_SERVER . DIR_WS_ADMIN;
      }
    } else {
      die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
    }
    if ($parameters == '') {
      $link = $link . $page . '?' . SID;
    } else {
      $link = $link . $page . '?' . $parameters . '&' . SID;
    }

    while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

    return $link;
  }

  function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
    if ($connection == 'NONSSL') {
      $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL_CATALOG == 'true') {
        $link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG;
      } else {
        $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
      }
    } else {
      die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
    }
    if ($parameters == '') {
      $link .= $page;
    } else {
      $link .= $page . '?' . $parameters;
    }

    while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

    return $link;
  }

////
// The HTML image wrapper function
  function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {
    $image = '<img src="' . $src . '" border="0" alt="' . $alt . '"';
    if ($alt) {
      $image .= ' title=" ' . $alt . ' "';
    }
    if ($width) {
      $image .= ' width="' . $width . '"';
    }
    if ($height) {
      $image .= ' height="' . $height . '"';
    }
    if ($params) {
      $image .= ' ' . $params;
    }
    $image .= '>';

    return $image;
  }

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
  function tep_image_submit($image, $alt = '', $parameters = '') {
    global $language;

    $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

    if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

    if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

    $image_submit .= '>';

    return $image_submit;
  }

////
// Draw a 1 pixel black line
  function tep_black_line() {
    return tep_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '1');
  }

////
// Output a separator either through whitespace, or with an image
  function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
    return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
  }

////
// Output a function button in the selected language
  function tep_image_button($image, $alt = '', $params = '') {
    global $language;

    return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $params);
  }

////
// javascript to dynamically update the states/provinces list when the country is changed
// TABLES: zones
  function tep_js_zone_list($country, $form, $field) {
    $countries_query = tep_db_query("select distinct zone_country_id from " . TABLE_ZONES . " order by zone_country_id");
    $num_country = 1;
    $output_string = '';
    while ($countries = tep_db_fetch_array($countries_query)) {
      if ($num_country == 1) {
        $output_string .= '  if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";
      } else {
        $output_string .= '  } else if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";
      }

      $states_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $countries['zone_country_id'] . "' order by zone_name");

      $num_state = 1;
      while ($states = tep_db_fetch_array($states_query)) {
        if ($num_state == '1') $output_string .= '    ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n";
        $output_string .= '    ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states['zone_name'] . '", "' . $states['zone_id'] . '");' . "\n";
        $num_state++;
      }
      $num_country++;
    }
    $output_string .= '  } else {' . "\n" .
                      '    ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" .
                      '  }' . "\n";

    return $output_string;
  }

////
// Output a form
  function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = '') {
    $form = '<form name="' . tep_output_string($name) . '" action="';
    if (tep_not_null($parameters)) {
      $form .= tep_href_link($action, $parameters);
    } else {
      $form .= tep_href_link($action);
    }
    $form .= '" method="' . tep_output_string($method) . '"';
    if (tep_not_null($params)) {
      $form .= ' ' . $params;
    }
    $form .= '>';

    return $form;
  }

////
// Output a form input field
  function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
    $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

    if (isset($GLOBALS[$name]) && ($reinsert_value == true) && is_string($GLOBALS[$name])) {
      $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
    } elseif (tep_not_null($value)) {
      $field .= ' value="' . tep_output_string($value) . '"';
    }

    if (tep_not_null($parameters)) $field .= ' ' . $parameters;

    $field .= '>';

    if ($required == true) $field .= TEXT_FIELD_REQUIRED;

    return $field;
  }

////
// Output a form password field
  function tep_draw_password_field($name, $value = '', $required = false) {
    $field = tep_draw_input_field($name, $value, 'maxlength="40"', $required, 'password', false);

    return $field;
  }

////
// Output a form filefield
  function tep_draw_file_field($name, $required = false) {
    $field = tep_draw_input_field($name, '', '', $required, 'file');

    return $field;
  }

//Admin begin
////
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
//  function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') {
//    $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';
//
//    if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';
//
//    if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) {
//      $selection .= ' CHECKED';
//    }
//
//    $selection .= '>';
//
//    return $selection;
//  }
//
////
// Output a form checkbox field
//  function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '') {
//    return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare);
//  }
//
////
// Output a form radio field
//  function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') {
//    return tep_draw_selection_field($name, 'radio', $value, $checked, $compare);
//  }
////
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
  function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '', $parameter = '') {
    $selection = '<input type="' . $type . '" name="' . $name . '"';
    if ($value != '') {
      $selection .= ' value="' . $value . '"';
    }
    if ( ($checked == true) || ($GLOBALS[$name] == 'on') || ($value && ($GLOBALS[$name] == $value)) || ($value && ($value == $compare)) ) {
      $selection .= ' CHECKED';
    }
    if ($parameter != '') {
      $selection .= ' ' . $parameter;
    }   
    $selection .= '>';

    return $selection;
  }

////
// Output a form checkbox field
  function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '', $parameter = '') {
    return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare, $parameter);
  }

////
// Output a form radio field
  function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '', $parameter = '') {
    return tep_draw_selection_field($name, 'radio', $value, $checked, $compare, $parameter);
  }
//Admin end

////
// Output a form textarea field
  function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
    $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

    if (tep_not_null($parameters)) $field .= ' ' . $parameters;

    $field .= '>';

    if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
      $field .= stripslashes($GLOBALS[$name]);
    } elseif (tep_not_null($text)) {
      $field .= $text;
    }

    $field .= '</textarea>';

    return $field;
  }

////
// Output a form hidden field
  function tep_draw_hidden_field($name, $value = '', $parameters = '') {
    $field = '<input type="hidden" name="' . tep_output_string($name) . '"';

    if (tep_not_null($value)) {
      $field .= ' value="' . tep_output_string($value) . '"';
    } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
      $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
    }

    if (tep_not_null($parameters)) $field .= ' ' . $parameters;

    $field .= '>';

    return $field;
  }

////
// Output a form pull down menu
  function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
    $field = '<select name="' . tep_output_string($name) . '"';

    if (tep_not_null($parameters)) $field .= ' ' . $parameters;

    $field .= '>';

    if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

    for ($i=0, $n=sizeof($values); $i<$n; $i++) {
      $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
      if ($default == $values[$i]['id']) {
        $field .= ' SELECTED';
      }

      $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '&quot;', '\'' => ''', '<' => '&lt;', '>' => '&gt;')) . '</option>';
    }
    $field .= '</select>';

    if ($required == true) $field .= TEXT_FIELD_REQUIRED;

    return $field;
  }
?>

This was added to an unmodified html_output.php file

MAKE SURE YOU BACKUP!!!

Regards

Jiten

#32 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 15:18

but there are no changes in that file that i made

#33 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 15:25

chrisstylez, calm down a little and tell me the problem, as i said before i always forget to add things and some of these problems i cannot recreate so i don't know what is causing them without see it first.

#34 Unified

  • Community Member
  • 97 posts
  • Real Name:Jiten
  • Location:London

Posted 26 December 2003, 15:26

Did you install the admin access with levels before creating CCC?

maybe it allows some function or something to occur that the stock MS2 version does not?

I am not sure what is happening as I do not really know PHP!!! ;)

I use trial and error! :blink:

But when I added the code from admin access with levels it worked! Other than that piece of code and your code for CCC I have a completely fresh test version of MS2!

Dunno whats going on?!

regards

Jiten

#35 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 15:27

i don't have it installed

#36 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 15:30

i got it
i did change that file and forgot to mark it
ok in the includes/functions/html_output.php change:
// Output a form radio field
 function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') {
   return tep_draw_selection_field($name, 'radio', $value, $checked, $compare);
 }
to
// Output a form radio field
 function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '', $params = '') {
   return tep_draw_selection_field($name, 'radio', $value, $checked, $compare, $params);
 }
and on line 209 replace:
  function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') {
with
  function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '', $params = '') {

Edited by sw45859, 26 December 2003, 15:33.


#37 Unified

  • Community Member
  • 97 posts
  • Real Name:Jiten
  • Location:London

Posted 26 December 2003, 15:35

wow! thats wierd?

I do not have a clue? I reverted back to the original html_output file and products would not add.

sorry I cannot be of much more use as i have no idea what it could be?

I have commented out the original code and below it but the new code supplied by admin access with levels. The new code is this:

// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
  function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '', $parameter = '') {
    $selection = '<input type="' . $type . '" name="' . $name . '"';
    if ($value != '') {
      $selection .= ' value="' . $value . '"';
    }
    if ( ($checked == true) || ($GLOBALS[$name] == 'on') || ($value && ($GLOBALS[$name] == $value)) || ($value && ($value == $compare)) ) {
      $selection .= ' CHECKED';
    }
    if ($parameter != '') {
      $selection .= ' ' . $parameter;
    }   
    $selection .= '>';

    return $selection;
  }

////
// Output a form checkbox field
  function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '', $parameter = '') {
    return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare, $parameter);
  }

////
// Output a form radio field
  function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '', $parameter = '') {
    return tep_draw_selection_field($name, 'radio', $value, $checked, $compare, $parameter);
  }
//Admin end

Hope this helps?

Jiten

#38 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 15:41

Admin/Includes/Functions /html_output.php
Around Line 209 Replace: 
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
  function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') {
    $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

    if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';

    if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) {
      $selection .= ' CHECKED';
    }

    $selection .= '>';

    return $selection;
  }
  
With: 
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
  function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '', $params = '') {
    $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

    if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';
    if (tep_not_null($params)) $selection .= $params;

    if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) {
      $selection .= ' CHECKED';
    }

    $selection .= '>';

    return $selection;
  }
 
Around Line 231 Replace: 
// Output a form radio field
  function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') {
    return tep_draw_selection_field($name, 'radio', $value, $checked, $compare);
  }
  
With: 
// Output a form radio field
  function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '', $params = '') {
    return tep_draw_selection_field($name, 'radio', $value, $checked, $compare, $params);
  }
that should fix that problem

#39 Unified

  • Community Member
  • 97 posts
  • Real Name:Jiten
  • Location:London

Posted 26 December 2003, 15:45

Sorry you beat me to the posting!

OK - with the previous changes that you have made I have got the listing of products on account_history_info.php! GREAT

But it still does not show in the shopping_cart.php, checkout_confirmation.php nor anywhere in the admin side.

Thanks

Jiten

#40 sw45859

  • Community Member
  • 308 posts
  • Real Name:stephen walker
  • Location:Arkansas

Posted 26 December 2003, 15:47

Unified, on Dec 26 2003, 11:45 AM, said:

Sorry you beat me to the posting!

OK - with the previous changes that you have made I have got the listing of products on account_history_info.php! GREAT

But it still does not show in the shopping_cart.php, checkout_confirmation.php nor anywhere in the admin side.

Thanks

Jiten
ok can you click on the name in the cart and get the description?