washley Posted March 14, 2008 Share Posted March 14, 2008 I think I have this fixed for use with google checkout now, here is my fix: INTEGRATING GOOGLE CHECKOUT with PRODUCT ATTRIBUTES OPTION TYPE FEATURE catalog/googlecheckout/gcheckout.php FIND (line 142): $attr_value = $attributes_values['products_options_values_name']; CHANGE TO: // Product Option Type if ($value == PRODUCTS_OPTIONS_VALUE_TEXT_ID) { $attr_value = $products[$i]['attributes_values'][$option] . tep_draw_hidden_field('id[' . $products[$i]['id'] . '+++' . $i . '][' . TEXT_PREFIX . $option . ']', $products[$i]['attributes_values'][$option]); } else { $attr_value = $attributes_values['products_options_values_name'] . tep_draw_hidden_field('id[' . $products[$i]['id'] . '+++' . $i. '][' . $option . ']', $value); } // End Product Option Type catalog/googlecheckout/responsehandler.php FIND (line 631): 'products_options_values' => $attributes_values['products_options_values_name'], CHANGE TO: 'products_options_values' => $order->products[$i]['attributes'][$j]['value'], // Product Options Changed FIND (line 644) $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name']; CHANGE TO: // Product Option Type contribution $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . tep_decode_specialchars($order->products[$i]['attributes'][$j]['value']); // $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name']; Thanks so much for this solution. I've put in the changes and it does allow (any number of) text field(s) from OTF to go through in Goolge Commerce. The problem is that, though that variable goes through correctly - strangely - only *one* non-text attribute will go through after that, the rest come out a as a string of what I think are theur IDs in the databse (i.e. "{10}133{15}181{20}179{27}162{28}17"). Any idea what could be causing this? Quote Link to comment Share on other sites More sharing options...
accarter Posted March 19, 2008 Share Posted March 19, 2008 Hi, I am trying to install this to a heavily modified site and am wondering if anyone else has either encountered this problem or could help me solve it. Basically part of the install instructions clash with the attribute sort add-on. Below is my product_info.php code - any ideas about how to make this work? Thank you! Best, Allison <?php /* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <div id="content"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="200" valign="top"><table border="0" width="190" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-bottom: 2px #e4e3bc solid; padding:10px;"> <?php if ($product_check['total'] < 1) { ?> <tr> <td colspan="3"><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { //BOF UltraPics //BOF Original /* $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); */ //EOF Original $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); //EOF UltraPics $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } //DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED if(tep_session_is_registered('wishlist_id')) { ?> <tr> <td colspan="3" class="messageStackSuccess"><?php echo PRODUCT_ADDED_TO_WISHLIST; ?></td> </tr> <?php tep_session_unregister('wishlist_id'); } ?> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="0" vspace="0"') . '</a>'; ?>'); //--></script> <?php if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') include(DIR_WS_MODULES . 'additional_images.php'); ?> </td> <td class="main" align="left" valign="top"> </td> </tr> <tr style="padding-top:10px;"> <td><br/><?php echo $products_name; ?> <?php echo $products_price; ?></td></tr> </table></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td colspan="3" class="main"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"><!--BOF UltraPics--> <?php if ($product_info['products_image_med']!='') { $new_image = $product_info['products_image_med']; $image_width = MEDIUM_IMAGE_WIDTH; $image_height = MEDIUM_IMAGE_HEIGHT; } else { $new_image = $product_info['products_image']; $image_width = SMALL_IMAGE_WIDTH; $image_height = SMALL_IMAGE_HEIGHT; } ?> <!--EOF UltraPics--> </td> </tr> </table> <?php } ?> <p align="left"><?php echo stripslashes($product_info['products_description']); ?></p> <?php $products_attributes_query = tep_db_query("select count(*) as total 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 . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $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 . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); //commented out for attributes sort module // $products_options_query = 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 = '" . //(int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); $products_options_query = 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 = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.attribute_sort"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (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; } ?> <tr> <td class="main" valign="top"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main" valign="top"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> <td align="right"></td> </tr> <?php } ?> </table> <?php } ?> </td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr><td colspan="3" align="center"></td> <tr> <td colspan="3" class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td colspan="3" class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td colspan="3" align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td colspan="3" align="center" class="smallText"></td> </tr> <?php } ?> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><br><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if($registry_mode_id == 0){ ?> <tr> <td class="main"></td> <td width="15%" height="40" align="right" class="main"></td> </tr> <?php }else{ ?> <tr> <td class="main"></td> <td class="main" align="left" valign="middle"> <!--test to see if 2 submit buttons work!? //--> <input type="text" name="products_quantity_registry" value="1" size="2"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_registry.gif', IMAGE_BUTTON_ADD_TO_REGISTRY, 'name="submit_registry"'); ?><br/><br/><br/> </td> <td width="15%" height="40" class="main" align="left" valign="middle"> <br/><br/><br/> </td> </tr> <?php } ?> <tr> <td align="center" valign="top"> <p align="center" style="margin-left:0px;"><span style="margin-left:0px;"><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></span> </p> <p align="center" class="smallText"> <table width="100%" cellspacing="1" cellpadding="2" > <tr> <td></td> </tr> </table></td> <td align="center" valign="top"><span style="margin-left:0px;"><span class="smallText"> <input name="image" type="image" title=" Tell A Friend " src="includes/languages/english/images/buttons/button_tell_a_friend.gif" alt="Tell A Friend" vspace="3px" border="0"> <input type="hidden" name="products_id" value="###PRODUCT ID###"> <br> <input type="text" name="to_email_address" size="15"> <br/> Email A Friend! </span></span></td> <td align="center" valign="top" style="margin-right:100px;"><span style="margin-left:0px;"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'name="submit_cart"'); ?></span></td> </tr> <tr> <td colspan="3"> <!-- start gift registry //--> </table></td> </tr> <tr> <!-- end gift registry //--> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> </table> </form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <!-- footer_eof //--> Quote Link to comment Share on other sites More sharing options...
Amadeo Posted March 31, 2008 Share Posted March 31, 2008 IM STILLL STOCK. INSTEAD OF TEXT BOX WHERE CUSTOMER CAN ENTER TEXT, I GOT DROP DOWN MENU. ANY ONE KNOWS WHAT'S THE FIX? DEO Quote Link to comment Share on other sites More sharing options...
tomislav_ Posted April 5, 2008 Share Posted April 5, 2008 Hi, I have been struggling with the installation of the Product Attributes contribution, but finally got it installed an running I think. I downloaded the latest OSC 2.2 MS2 from the osCommerce site and tried to implement the Product Attributes addon (http://www.oscommerce.com/community/contributions,160). The feature is exactly what I was looking for, its a great contribution. However I have some questions. - When I have added an item with text to the cart, is there a way/fix for the customer to edit an item from the cart without creating a new item instance? Or is this the way it is suppose to work? - Is there a package of the Product Attributes addon for OSC 2.2 MS2? I went through all packages (http://www.oscommerce.com/community/contributions,160) but could only find support for OSC 2.2 MS 1, or did I miss a package? Br, T. Quote Link to comment Share on other sites More sharing options...
Davewalters Posted April 7, 2008 Share Posted April 7, 2008 Installed this a while ago and it worked fine - have since installed order editor and now OTF has stopped working properly. It passes the details the user has inputted into the shopping cart and through ordering but will not pass the details any further. In admin when reviewing the order and also on the order emails I'm just getting the name of the field and "TEXT" instead of the user submitted info. I'm assuming this has something to do with order editor?? Help. Quote Link to comment Share on other sites More sharing options...
g_p Posted April 9, 2008 Share Posted April 9, 2008 I don't know if this is the answer you need or not. But I noticed this note/code in the bottom of my catalog/includes/functions/general.php // nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n) function tep_convert_linefeeds($from, $to, $string) { if ((PHP_VERSION < "4.0.5") && is_array($from)) { return ereg_replace('(' . implode('|', $from) . ')', $to, $string); } else { return str_replace($from, $to, $string); } } Maybe try adding that function to see if it handles the linefeeds any better? Thank you candycanuck, that did indeed solve my issue. Cheers! Quote Link to comment Share on other sites More sharing options...
kanreikai Posted April 13, 2008 Share Posted April 13, 2008 I don't know if this has been discussed before because I read all of the entries in this thread but I did not find it in search. However, I have installed the latest version (2.02) as well as the optional feature of Dynamic Force attribute selection. If you have both a text input field on a page as well as a "select" pull down menu field on the page, the Dynamic Force attribute will not work if the Text field window is ahead (alphabetically) of the select fields. However, if you rearrange the order on the page (you have to do it alphabetically by renaming the fields) so that the text input field appears last on the page it works fine. Any 'Select' fields below the 'Text' input field will not work in Dynamic Force and no message will appear if no selection is made for those fields. Quote Link to comment Share on other sites More sharing options...
tomislav_ Posted April 21, 2008 Share Posted April 21, 2008 Great contribution. However seems like I have missed something when I merged it to my eShop... Can anyone guide me or tell me where I have gone wrong? 1. I add attributes to the product "text text" and add it to the cart 2. I view the cart and it looks fine but when I make an update (quantity) or if I have more products and remove one item all the attributes of the product are gone... Please anyone... any ideas on where I have gone wrong? Best Regards, T Quote Link to comment Share on other sites More sharing options...
markfinstro Posted April 23, 2008 Share Posted April 23, 2008 Quote Link to comment Share on other sites More sharing options...
spencermjax Posted May 9, 2008 Share Posted May 9, 2008 I am having a problem. The problem is when someone was entering text into a text field and they used a comma, it produced an error. On the site I have SPPC (Separate Pricing Per Customer). There are no problems for not logged in and for accounts categorized as retailers but for the other account type (wholesaler) the error is still occurring. I typed in : Savannah November 12, 2006 and got this error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2006) and pg.customers_group_id = '2'' at line 1 select pg.products_id, customers_group_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks from products_groups pg where pg.products_id in (209, 12 2006) and pg.customers_group_id = '2' [TEP STOP] Quote Link to comment Share on other sites More sharing options...
SharingDOODLES Posted June 10, 2008 Share Posted June 10, 2008 Hello, First of all, well done on the contribution, it works a treat, But can i just ask a question please, The comment is restricted to 32 but i was wondering how i go about increasing it, i have changed it in the database but it dont seem to make no differance, If you could please shed some light it would be much appreciated Quote Link to comment Share on other sites More sharing options...
mhsdrake Posted October 27, 2008 Share Posted October 27, 2008 Hello all, Is there a way to add a dropbox to the attributes? I love this contri but I need a some dropboxes too with my products. I'm looking for hours now, but can't find anything to resolve my problem.. Thanks! You'll kick yourself, but the default option (select) is the dropdown choice. Enter the attribute title and leave the dropdown on "select" and you'll get your dropdown. SD, you probably figured it out by now, but you need to change the maxlength on the form fields in addition to the DB. Nice contribution with a lot of flexibility! Quote Link to comment Share on other sites More sharing options...
Guest Posted November 7, 2008 Share Posted November 7, 2008 Can I get someone to assist me with this contrib? I'm using a custom theme and well, I'm having some trouble finding exactly where to make the changes in certain files. Please shoot me a message here or you can find me at upfrontben on Yahoo. I'm willing to pay for some assistance. Thanks, Ben Quote Link to comment Share on other sites More sharing options...
Guest Posted November 7, 2008 Share Posted November 7, 2008 After I've implemented this contributions, I added a new product option titled 'Monogram" with a length of 10 and selected Text. That added just fine. I went down to the Product Attributes at the bottom of the screen, selected my product, set 'Monogram' as the Option Name and 'TEXT" as Option Value. Upon hitting Insert, I get this error: 1136 - Column count doesn't match value count at row 1 insert into products_attributes values (null, '37', '3', '0', '0', '+') [TEP STOP] Any ideas? Quote Link to comment Share on other sites More sharing options...
Guest Posted November 7, 2008 Share Posted November 7, 2008 Disregard above question. I fixed it by replacing the following code in admin/product_attributes.php // tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')"); // tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '" . (int)$products_options_sort_order . "','')"); // 1136 - Column count doesn't match value count at row 1 insert into products_attributes values (null, '91', '11', '0', '0', '+', '0','') tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " ( products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order) values ('" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '" . (int)$products_options_sort_order . "')"); Quote Link to comment Share on other sites More sharing options...
potatocake Posted December 27, 2008 Share Posted December 27, 2008 Hi, I just installed this contribution and its working great but I have a question. I have multiple currencies on my site with AUD as default but when I set an option value of a product attribute to be a certain amount for example: AUD40 and when the user switch currencies to USD this amount gets converted. Is there any way to stop this conversion? As I would like to set it as the amount of 40 for all currencies. So say: Currency is selected as AUD Product A Option Price = AUD40 Currency is selected as USD Product A Option Price = USD40 If any1 has any idea that a contribution or modification to the OTF that would do that, i would very much like some help or information. :) thank you Quote Link to comment Share on other sites More sharing options...
Guest Posted January 5, 2009 Share Posted January 5, 2009 (edited) I've just installed the Product Attributes-Option Type Feature contribution on a client's shopping cart and I'm getting the following error messages... This one occurs when I try to add or edit an attribute: Warning: Cannot modify header information - headers already sent by (output started at /home/robyn6/public_html/store/includes/configure.php:46) in /home/robyn6/public_html/store/admin/includes/functions/general.php on line 22 (although the new attribute or changes seem to take effect anyway) On the store home page this error has popped up: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/robyn6/public_html/store/includes/configure.php:46) in /home/robyn6/public_html/store/includes/functions/sessions.php on line 102 The installation instructions were a bit confusing about the changes to the configure.php file. At the start it says you will modify the: /catalog/includes/configure.php But then further into the instructions it says the /catalog/includes/local/configure.php (create it if it doesn't exist). I made the modifications to the /catalog/includes/configure.php file. Also, my text box is showing up for the customer to type in special instructions, but you can't type anything in it. The site with the error is http://robynwarne.com/store/index.php Help! Sharon [email protected] Edited January 5, 2009 by sweetpatoodies Quote Link to comment Share on other sites More sharing options...
Guest Posted January 5, 2009 Share Posted January 5, 2009 I figured out my error messages... white space at the end of the general.php and configure.php files. But I still haven't fixed the problem of not being about to type in a text box attribute. Sharon [email protected] Quote Link to comment Share on other sites More sharing options...
Guest Posted January 5, 2009 Share Posted January 5, 2009 the no typing in textbox seems to have fixed itself, after I walked away and selpt for 3-4 hours and came back. I guess the oscommerce elves were at work! Quote Link to comment Share on other sites More sharing options...
Guest Posted January 28, 2009 Share Posted January 28, 2009 I just installed this contribution last week, I am having a few issues; 1. I am using this with eay populate, it there a way to configure the csv file with adding a textbox? 2. when I add a text box for custom text to text be added to the order, it is not adding the extra cost for this is is set to add a 3.00 fee for this option any help would be great thank you Quote Link to comment Share on other sites More sharing options...
The Mort Posted February 5, 2009 Share Posted February 5, 2009 I have been using this contribution for quite a while with no problems but before christmas we started losing the option choices for certain products which meant we had to contact the customer to find out what it was they wanted. We have just installed oscommerce 2.2rc2a following an upgrade on the server to php 5 and put the latest version of Product Attributes option type feature on but I still have the problem of it not passing the option values through if the products are selected before the customer logs in. I have tried the various different solutions shown in the contributions either individually or using all of them together to no avail. Can anyone help? The only other contribution that I have on is the How Did You Hear but I don't think that it edits any of the same files as the product attributes. Many thanks Quote Link to comment Share on other sites More sharing options...
cmjennings21 Posted February 6, 2009 Share Posted February 6, 2009 I've just installed v2.o2 of this contribution as the previous version wasn't passing text to the shopping cart. I'm a step further now,if a customer fills in a text field it now displays in th eshopping cart, however go the next step and press checkout and all attributes except the text can be seen, consequently the text doesn't come through on the order. Does anyone have any ideas on how to fix this? Many Thanks Quote Link to comment Share on other sites More sharing options...
robi23 Posted April 25, 2009 Share Posted April 25, 2009 Hi: Option Type Feature no work with ajax attribute in mode text? Any idea Thanks Quote Link to comment Share on other sites More sharing options...
dreamsfloat Posted September 7, 2009 Share Posted September 7, 2009 I recently installed product attributes option types 2.02. Everything is working great, but when I add the textarea it is really skinny and will only hold one character. I tried in the admin section to change the length, but no matter what I put in it didn't change. I did find in the product_info.php file where is has how long the box was (5 rows). Is there some code that I can add to make it wider? I don't really understand code to much. I am really good at copy and paste, so I don't know how to fix this problem. Thanks so much for your help! Quote Link to comment Share on other sites More sharing options...
bamamythili Posted November 12, 2009 Share Posted November 12, 2009 Hii, I need the same..could you got idea about this? Thanks Any way to make the text options attribute required (customer must enter info into text box) before the order proceeds? Quote 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.