pilot1 Posted April 10, 2003 Share Posted April 10, 2003 my eyeballs are hanging out! Quote What goes up MUST come down Link to comment Share on other sites More sharing options...
pilot1 Posted April 10, 2003 Share Posted April 10, 2003 I have errors on includes/classes/shopping_cart.php seems to use same lines of code Quote What goes up MUST come down Link to comment Share on other sites More sharing options...
pilot1 Posted April 11, 2003 Share Posted April 11, 2003 Going down the wrong road here! Too many conlicts. Â somehow its going to have to be modification to chandras Mod. you can't use contre's code for it, as there seems to be too many forks in code at the same place. Quote What goes up MUST come down Link to comment Share on other sites More sharing options...
redman Posted April 11, 2003 Share Posted April 11, 2003 Yes, it is impossible to merge these two. Â Is there anybody who is able to add a text-input feature in ConteZero's Contribution??? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 ok i'm gonna attempt this today. Â watch this space. Â cheers barry Quote Link to comment Share on other sites More sharing options...
pilot1 Posted April 11, 2003 Share Posted April 11, 2003 0-0  All eyes on you !! Good luck  Another little gem!  An attribute that has a value, get multiplied by the product quantity. How do you get an attribute to just add the value so it does'nt change when you input 30 products against 1 product.  This is driving me mad! Quote What goes up MUST come down Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 does anyone have a working clean version of conte mod that i could reference. Â cheers barry Quote Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 by the way i'll need admin access, private message me the details  cheers barry Quote Link to comment Share on other sites More sharing options...
pilot1 Posted April 11, 2003 Share Posted April 11, 2003 the address for conte's Mod is  http://www.oscommerce.com/community/contri...ions,766/page,2  and down load a fresh copy  I could set up contes on a test server tomorrow, but I broke the one I was working on and will have to start again :oops: Quote What goes up MUST come down Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 its cool, i already have the mod here but it aint installed. Â cheers barry Quote Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 Did i read somewhere that someone had the admin side of this mod completed.  if so are there any changes between this and chandras admin side  cheers barry Quote Link to comment Share on other sites More sharing options...
redman Posted April 11, 2003 Share Posted April 11, 2003 Yes there are some, will upload them this afternoon. The problem seems not to be in the admin area. i considered problems with the catalo/product_info and catalog/shopping_cart, receiving lots of parse-errors or "nothing" Â conte handles the different option-types as cases right now i'm trying to add a new case, using the other cases (from conte) as reference. without modifying the rest of contes file. Â I'll let you know in a few Quote Link to comment Share on other sites More sharing options...
redman Posted April 11, 2003 Share Posted April 11, 2003 :D :D :D :D :D :D :roll: :D :D :D :D :D :D Quote Link to comment Share on other sites More sharing options...
redman Posted April 11, 2003 Share Posted April 11, 2003 catalog/product_info.php WWOOOOORKS  Needs only a little tuning  now lets check the shopping_cart, puh Quote Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 catalog/product_info.php WWOOOOORKS Needs only a little tuning  now lets check the shopping_cart, puh  how you getting on, i have product_info.php showing the attributes but it won't let me add anything to the cart i think it have something to do with the switch/case statement.  mmmmm  cheers barry Quote Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 ok i got it working all but one thing. Â I am just working on how to display more than one checkbox at a time, other wiswe it is working, all attributes get added to the basket and you can checkout. Â you can see this working on my test site (address below) and the attributes are set up on 'A Bugs Life' Â Â cheers barry Quote Link to comment Share on other sites More sharing options...
pilot1 Posted April 11, 2003 Share Posted April 11, 2003 Well Done Barry!! Â Thats coooooooooooooooool!!!! Do you have the the quantity controller installed too. Â This should be a contribution in itself! Quote What goes up MUST come down Link to comment Share on other sites More sharing options...
teksigns Posted April 11, 2003 Share Posted April 11, 2003 I am just working on how to display more than one checkbox at a time    yes i had this all working except the same thing back on march 19th .  http://www.oscommerce.com/forums/viewtopic.php...er=asc&start=20  i was asking how to fix this and noone ever replyed. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 i have got it to now display more than one checkbox on product info but it is only adding one to the cart. Â I added a while statement into product info to get the extra checkboxes. Â The saga continues. Â cheers barry Quote Link to comment Share on other sites More sharing options...
teksigns Posted April 11, 2003 Share Posted April 11, 2003 case ($products_options_name['products_options_type'] == PRODUCTS_OPTIONS_TYPE_CHECKBOX):        //CLR 2003-03-18 Add logic for checkboxes        $products_attribs_query = tep_db_query("select distinct patrib.options_values_id, patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'");        $products_attribs_array = tep_db_fetch_array($products_attribs_query);        echo '<tr><td class="main" valign="top">' . $products_options_name['products_options_name'] . ': </td><td class="main">';        $products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");       echo '<tr><td class="main"><br><b>' . $products_options_name_values['products_options_name'] . ':</b></td><td> </td></tr>' . "n";       while ($products_options_values = tep_db_fetch_array($products_options)) {        //$linked_attrib = tep_linked_attributes($products_options_values['0'],$HTTP_GET_VARS['products_id']);        $name_checkbox = 'id[' . $products_options_name['products_options_id'] . ']';        $value_checkbox = $products_options_values['products_options_values_id'];        if (strchr($products_options_values['price_prefix'],'s')) {         $special_class = 'productSpecialPrice';        } else {         $special_class = 'main';        }        echo '<tr><td class="' . $special_class . '">  ' . $products_options_values['products_options_values_name'];        if (($products_options_values['options_values_price'] != '0') && (!strchr($products_options_values['price_prefix'],'i'))) {         echo ' (' . tep_prefix_view($products_options_values['price_prefix']) . ' '. $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';        }        echo '</td><td>' . tep_draw_checkbox_field($name_checkbox, $value_checkbox) . '</td></tr>' . "n";       }     break;    this is how i had mine displaying more than one checkbox however it would not add more than one of them to the cart.    if you know how to fix that problem let me know  i have 62 mods on my shopping cart and its becomming a real pain to add contributions. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 here is how i have implemented it     case ($products_options_name['products_options_type'] == PRODUCTS_OPTIONS_TYPE_CHECKBOX):      //CLR 2003-03-18 Add logic for checkboxes      $products_attribs_query = tep_db_query("select distinct patrib.options_values_id, patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'");                  while ($products_attribs_array = tep_db_fetch_array($products_attribs_query)) {      echo '<tr><td class="main">' . $products_options_name['products_options_name'] . ': </td><td class="main">';      echo tep_draw_checkbox_field('id[' . $products_options_name['products_options_id'] . ']', $products_attribs_array['options_values_id']);            echo $products_options_name['products_options_comment'];      if ($products_attribs_array['options_values_price'] != '0') {       echo '(' . $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], $product_info_values['products_tax_class_id']) .') ';      }   }      echo '</td></tr>';     break;  and i've tried yours and it solves a problem i had that although i was getting the right amount of checkboxes the option name was not displayed. Thank you.  I think that between the others participating on this thread i'm sure we could sort this mod to give us full functionality. :)  I too have a lot of mods installed and it can be a bit mindboggling at times. :?  cheers barry Quote Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 ok i've figured it out, well what the problem is anyway, and i'm working on a solution.  The reason this happens is because when the checkbox is drawn the name is assigned based on the product options id in my store i have 1 checkbox set up with name top, it has an id of 7.  When i add 1 to a product, 1 shows up in product_info.php and one gets added to the cart. When i add 2 to a product, 2 show up in product_info.php and only one gets added to the cart.  What i have done so far is modify the code to look like this;  case ($products_options_name['products_options_type'] == PRODUCTS_OPTIONS_TYPE_CHECKBOX):          //CLR 2003-03-18 Add logic for checkboxes          $products_attribs_query = tep_db_query("select distinct patrib.options_values_id, patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'");          $products_attribs_array = tep_db_fetch_array($products_attribs_query);          echo '<tr><td class="main" valign="top">' . $products_options_name['products_options_name'] . ': </td><td class="main">';          $products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");            echo '<tr><td class="main"><br><b>' . $products_options_name_values['products_options_name'] . ':</b></td><td> </td></tr>' . "n";            $turn='';     while ($products_options_values = tep_db_fetch_array($products_options)) {     //$linked_attrib = tep_linked_attributes($products_options_values['0'],$HTTP_GET_VARS['products_id']);             $name_checkbox = 'id[' . $products_options_name['products_options_id'] . $turn . ']';             $value_checkbox = $products_options_values['products_options_values_id'];             if (strchr($products_options_values['price_prefix'],'s')) {              $special_class = 'productSpecialPrice';             } else {              $special_class = 'main';             }             echo '<tr><td class="' . $special_class . '">  ' . $products_options_values['products_options_values_name'];             if (($products_options_values['options_values_price'] != '0') && (!strchr($products_options_values['price_prefix'],'i'))) {              echo ' (' . tep_prefix_view($products_options_values['price_prefix']) . ' '. $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';             }             echo '</td><td>' . tep_draw_checkbox_field($name_checkbox, $value_checkbox) . '</td></tr>' . "n";            $turn++;     }  i added a variable define for $turn, set it to zero and then appended it to the checkbox 'id' like this;  $name_checkbox = 'id[' . $products_options_name['products_options_id'] . $turn . ']';  then i incremented it at the bottom using  $turn++;  if you go to my test site and go to A bugs life, try it out and see the results. This code change adds one of the checkboxes to the cart and a blank attribute to the cart, you'll see this if you try it.  looking for more ideas.   cheers barry Quote Link to comment Share on other sites More sharing options...
pilot1 Posted April 11, 2003 Share Posted April 11, 2003 Is this right? tep_linked_attributes($products_options_values['0'],$HTTP_GET_VARS['products_id']); ? ? ? ? ? ? ? ? ? ? ? ? ?$name_checkbox = 'id[' . Quote What goes up MUST come down Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2003 Share Posted April 11, 2003 Is this right? tep_linked_attributes($products_options_values['0'],$HTTP_GET_VARS['products_id']); Â Â Â Â Â Â Â Â Â Â Â Â $name_checkbox = 'id[' . Â i don't think that needs to be there, i have used the code that tekdesigns posted earlier for the checkbox section, which looks like it came from contre's mod, that's not what's causing the problem though. Â cheers barry Quote Link to comment Share on other sites More sharing options...
pilot1 Posted April 11, 2003 Share Posted April 11, 2003 The product info.php was the one of the Files that seemed to 'merge' product_info.php   case '2' : // checkbox $products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.collegamento from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "' and pa.options_type_id = 2 order by pa.attribute_order"); echo '<tr><td class="main"><br><b>' . $products_options_name_values['products_options_name'] . ':</b></td><td> </td></tr>' . "n"; while ($products_options_values = tep_db_fetch_array($products_options)) { $linked_attrib = tep_linked_attributes($products_options_values['collegamento'],$HTTP_GET_VARS['products_id']); $selected = false; $name_checkbox = 'id[]'; $value_checkbox = '{' . $products_options_name_values['products_options_id'] . '}' . $products_options_values['products_options_values_id'] . $linked_attrib; for ($ciclo=0;$ciclo<sizeof($cart->contents[$HTTP_GET_VARS['products_id']]['attributes']);$ciclo++) { if ($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$ciclo][$products_options_name_values['products_options_id']] == $products_options_values['products_options_values_id']) { $selected = true; }   and so on  and the order detail_php  order_details.php // Delete box only for shopping cart if (strstr($PHP_SELF, FILENAME_SHOPPING_CART)) { echo ' <td align="center" valign="top">' . tep_draw_checkbox_field('cart_delete[]', $products[$i]['id']) . '</td>' . "n"; }  there should be a solution in contres mod Quote What goes up MUST come down Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.