Jump to content

Thomp

Members
  • Content count

    36
  • Joined

  • Last visited

Profile Information

  1. Has anyone been able to merge this contrib with anti-robot registrations? I tried doing a merger and it did not work out that well. Here is my code: (ive got no clue why it does not work) <?php /* $Id: wholesale.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $ 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'); // BOF Anti Robot Validation v2.5 if (ACCOUNT_VALIDATION == 'true' && WHOLESALE_VALIDATION == 'true') { require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_VALIDATION); include_once('includes/functions/' . FILENAME_ACCOUNT_VALIDATION); } // EOF Anti Robot Registration v2.5 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_WHOLESALE); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { // BOF Anti Robotic Registration v2.5 if (ACCOUNT_VALIDATION == 'true' && WHOLESALE_VALIDATION == 'true') { $sql = "SELECT * FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "' LIMIT 1"; if( !$result = tep_db_query($sql) ) { $error = true; $entry_antirobotreg_error = true; $text_antirobotreg_error = ERROR_VALIDATION_1; } else { $entry_antirobotreg_error = false; $anti_robot_row = tep_db_fetch_array($result); if (( strtoupper($HTTP_POST_VARS['antirobotreg']) != $anti_robot_row['reg_key'] ) || ($anti_robot_row['reg_key'] == '') || (strlen($antirobotreg) != ENTRY_VALIDATION_LENGTH)) { $error = true; $entry_antirobotreg_error = true; $text_antirobotreg_error = ERROR_VALIDATION_2; } else { $sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "'"; if( !$result = tep_db_query($sql) ) { $error = true; $entry_antirobotreg_error = true; $text_antirobotreg_error = ERROR_VALIDATION_3; } else { $sql = "OPTIMIZE TABLE " . TABLE_ANTI_ROBOT_REGISTRATION . ""; if( !$result = tep_db_query($sql) ) { $error = true; $entry_antirobotreg_error = true; $text_antirobotreg_error = ERROR_VALIDATION_4; } else { $entry_antirobotreg_error = false; } } } } if ($entry_antirobotreg_error == true) $messageStack->add('wholesale_submit', $text_antirobotreg_error); } // EOF Anti Robotic Registration v2.5 $name = tep_db_prepare_input($HTTP_POST_VARS['name']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); $store_name = tep_db_prepare_input($HTTP_POST_VARS['store_name']); $store_phone = tep_db_prepare_input($HTTP_POST_VARS['store_phone']); $store_address = tep_db_prepare_input($HTTP_POST_VARS['store_address']); $store_tax_id = tep_db_prepare_input($HTTP_POST_VARS['store_tax_id']); // BOF Anti Robot Registration v2.5 if (tep_validate_email($email_address)) { $error = true; $messageStack->add('wholesale_submit', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } elseif (!$entry_antirobotreg_error == true) { tep_mail(STORE_OWNER, WHOLESALE_EMAIL, EMAIL_SUBJECT, 'Store Name: ' . $store_name . "\r\n\r\n" . 'Name: ' . $name . "\r\n\r\n" . 'Phone: ' . $store_phone . "\r\n\r\n" . 'Address: ' . $store_address . "\r\n\r\n" . 'Tax ID: ' . $store_tax_id . "\r\n\r\n" . 'Background information: ' . $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_WHOLESALE, 'action=success')); } // EOF Anti Robotic Registration v2.5 } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_WHOLESALE)); ?> <!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"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" 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('wholesale_request', tep_href_link(FILENAME_WHOLESALE, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('wholesale_submit') > 0) { ?> <tr> <td><?php echo $messageStack->output('wholesale_submit'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><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 { ?> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><font size="2"><?php echo ENTRY_WHOLESALE_TEXT; ?></font><br><br> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo ENTRY_NAME; ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo tep_draw_input_field('name'); ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo ENTRY_EMAIL; ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo tep_draw_input_field('email'); ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo ENTRY_STORE_NAME; ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo tep_draw_input_field('store_name'); ?> </td> </tr> <tr> <td class="main" colspan="2"><?php echo ENTRY_STORE_PHONE; ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo tep_draw_input_field('store_phone'); ?> </td> </tr> <tr> <td class="main" width="40%"><?php echo ENTRY_STORE_ADDRESS; ?></td> <td> </td> </tr> <tr> <td class="main" width="40%"><?php echo tep_draw_textarea_field('store_address', 'soft', 20, 4); ?></td> <td> </td> </tr> <tr> <td class="main" colspan="2"><?php echo ENTRY_STORE_TAX_ID; ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo tep_draw_input_field('store_tax_id'); ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo ENTRY_ENQUIRY; ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td> </tr></table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php // BOF Anti Robot Registration v2.5 if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'wholesale_submit') && WHOLESALE_VALIDATION == 'true') { ?> <tr> <td class="main"><b><?php echo CATEGORY_ANTIROBOTREG; ?></b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="2" cellpadding="2"> <tr> <?php if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'wholesale_submit') && WHOLESALE_VALIDATION == 'true') { if ($is_read_only == false || (strstr($PHP_SELF,'wholesale_submit')) ) { $sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE timestamp < '" . (time() - 3600) . "' OR session_id = '" . tep_session_id() . "'"; if( !$result = tep_db_query($sql) ) { die('Could not delete validation key'); } $reg_key = gen_reg_key(); $sql = "INSERT INTO ". TABLE_ANTI_ROBOT_REGISTRATION . " VALUES ('" . tep_session_id() . "', '" . $reg_key . "', '" . time() . "')"; if( !$result = tep_db_query($sql) ) { die('Could not check registration information'); } ?> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" width="100%" NOWRAP><span class="main"> <?php echo ENTRY_ANTIROBOTREG; ?></span></td> </tr> <tr> <td class="main" width="100%"> <?php $check_anti_robotreg_query = tep_db_query("select session_id, reg_key, timestamp from anti_robotreg where session_id = '" . tep_session_id() . "'"); $new_guery_anti_robotreg = tep_db_fetch_array($check_anti_robotreg_query); $validation_images = '<img src="validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id'] . '">'; if ($entry_antirobotreg_error == true) { ?> <span> <?php echo $validation_images . ' <br> '; echo tep_draw_input_field('antirobotreg') . ' <br><b><font color="red">' . ERROR_VALIDATION . '<br>' . $text_antirobotreg_error . '</b></font>'; } else { ?> <span> <?php echo $validation_images . ' <br> '; echo tep_draw_input_field('antirobotreg', $account['entry_antirobotreg']) . ' ' . ENTRY_ANTIROBOTREG_TEXT; } } } ?> </span> </td> </tr> </table></td> </tr> </table></td> </tr> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } // EOF Anti Robot Registration v2.5 ?> <tr> <td><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 tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> </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 //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Appreciate any help greatly!! Thanks!! -thomp
  2. Thomp

    Column Banner Advertisement

    Great job! I think this is a great contribution! What I would like to see though is functionality where you could use different language banners. This would be especially important for multilanguage sites. So you would see the english banners for the english language and french banners for the french language etc. Also, If there would be a way to move the duration of months etc variables to the admin pages, that would be great. But nice job, thanks for the contrib! -thomp
  3. Ok, I havent been able to find a contribution or a solution to this, I cant believe it hasnt already been solved so either I'm dumb as shit or stumbling upon something totally new. Anyway, I have a website that is live and running perfectly. I've got two languages installed and would like to install a third. How do I install a third language without showing it in the front end as I'm editing and adding text etc? Is there a way to make the new language inactive while the editing is being done? How do I hide the new language from the active shop without taking the whole language box out of the picture (already have two working languages). Would love to hear if this has already been addressed.. Thanks!
  4. Thomp

    options price per language

    nothing huh? no one knows or have ever heard of such a thing?
  5. Is there such a contribution? I need to have the options price change with the different languages a user selects. Is this even possible? I looked that the options values reside in PRODUCTS_OPTIONS_VALUES table, while the language id resides in PRODUCT_ATTRIBUTES. Somehow I would need to have the language added into the first mentioned table, and then have in the product_attributes.php an option to insert a price per different languages. Has anyone ever tried this? I know it sounds like a ridiculous contribution, but it would work for what I'm building. Thanks!
  6. I'm sure most of you havent even noticed but admin/options_images.php does not work with multiple languages. It correctly populates the different options but fails to duplicate or add the thumbnails to other than the default language. The field products_options_values_name gets populated perfectly, the languge functionality works. But, the products_options_values_thumbnail does not, its just a blank. I've tried to figure out what is going on in the code but have no clue how to fix it. If any of you guru's have a moment to take a look, I'm sure its a simple fix since the products_options_values_name gets populated, so I dont understand why the thumbnail doesnt. Anyone who helps, positively rocks! <?php /* $Id: options_images.php,v 1.0 2003/08/18 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $language_id = '1'; require('includes/application_top.php'); //check that destination directory exists and is writeable if (is_dir(DIR_FS_CATALOG_IMAGES . 'options/')) { if (!is_writeable(DIR_FS_CATALOG_IMAGES . 'options/')) $messageStack->add(ERROR_OPTIONS_IMAGES_DIRECTORY_NOT_WRITEABLE, 'error'); } else { $messageStack->add(ERROR_OPTIONS_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error'); } if ($HTTP_GET_VARS['action']) { switch ($HTTP_GET_VARS['action']) { case 'save': $image_source = $HTTP_POST_FILES['value_image_input']['tmp_name']; $filename = $HTTP_POST_FILES['value_image_input']['name']; $image_destination = DIR_FS_CATALOG_IMAGES . 'options/' . $filename; $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); copy($image_source , $image_destination) or die("unable to copy $image_source to location $image_destination"); tep_db_query("update " . TABLE_PRODUCTS_OPTIONS_VALUES . " set products_options_values_thumbnail = '" . tep_db_input($filename) . "' where products_options_values_id = '" . tep_db_input($cID) . "' and language_id = '" .$language_id . "'"); tep_redirect(tep_href_link(FILENAME_OPTIONS_IMAGES, '&cID=' . $cID . '&box_id=' . $HTTP_GET_VARS['box_id'])); break; case 'update_enabled': tep_db_query("update " . TABLE_PRODUCTS_OPTIONS . " set products_options_images_enabled = 'false'"); foreach ($HTTP_POST_VARS ['option_select'] as $options_selected){ tep_db_query("update " . TABLE_PRODUCTS_OPTIONS . " set products_options_images_enabled = 'true' where products_options_id = '" . $options_selected . "'"); } break; } } ?> <!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> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADER_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> <tr><td class="smalltext">Select an option category to edit: <?php if (isset($HTTP_POST_VARS['box_select'])) $options_id = $HTTP_POST_VARS['box_select']; else if (isset($HTTP_GET_VARS['box_id']))$options_id = $HTTP_GET_VARS['box_id']; else if (isset($HTTP_GET_VARS['cID'])){ $options_query = tep_db_query("select products_options_id from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " where products_options_values_id='" . $HTTP_GET_VARS['cID'] . "'"); $options = tep_db_fetch_array ($options_query); $options_id = $options['products_options_id']; } else $options_id = 1; $options_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id='" . $language_id . "'"); $i=0; while ($options = tep_db_fetch_array ($options_query)){ $values[$i]['id']= $options['products_options_id']; $values[$i]['text']= $options['products_options_name']; $i++; } echo tep_draw_form('box_selection', FILENAME_OPTIONS_IMAGES,''); echo tep_draw_pull_down_menu('box_select', $values, $options_id, 'onChange="this.form.submit();"'); echo '</form>'; ?> </td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NAME; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_IMAGE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_IMAGE_NAME; ?></td> </tr> <?php $query1 = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " where products_options_id = '" . $options_id . "'" ); //First find all the products options values that belong to the selected product option while ($result1 = tep_db_fetch_array($query1)) { $products_options_values_id = $result1['products_options_values_id']; //Now pull their details from the database $query2 = tep_db_query ("select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . $products_options_values_id . "' and language_id = '" .$language_id . "'"); while ($result2 = tep_db_fetch_array($query2)) { $products_options_values_name = $result2['products_options_values_name']; $products_options_values_thumbnail = $result2['products_options_values_thumbnail']; if ($HTTP_GET_VARS['cID'] == $products_options_values_id){ $selected_value['name'] = $products_options_values_name; $selected_value['image'] = $products_options_values_thumbnail; $selected_value['id'] = $products_options_values_id; } if ( (isset($selected_value['id'])) && ($products_options_values_id == $selected_value['id']) ) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_OPTIONS_IMAGES, '&cID=' . $products_options_values_id . '&box_id=' . $options_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_OPTIONS_IMAGES, '&cID=' . $products_options_values_id . '&box_id=' . $options_id ) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $products_options_values_name ?></td> <td class="dataTableContent" align="center"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . '/options/' . $products_options_values_thumbnail, $products_options_values_name, '50', '50') ?></td> <td class="dataTableContent"><?php echo $products_options_values_thumbnail ?></td> </tr> <?php } } ?> </table></td> <?php $heading = array(); $contents = array(); switch ($HTTP_GET_VARS['action']) { case 'edit': $heading[] = array('text' => '<b>'.$selected_value['name'].'</b>'); $contents = array('form' => tep_draw_form('value_image_input', FILENAME_OPTIONS_IMAGES, '&cID=' . $selected_value['id'] . '&box_id=' . $options_id . '&action=save', 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '<br>' . TEXT_SELECT_FILE . '<br>' . tep_draw_file_field('value_image_input')); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_OPTIONS_IMAGES, '&cID=' . $selected_value['id']) . '&box_id=' . $options_id .'">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset ($selected_value['id'])){ $heading[] = array('text' => '<b>' . $selected_value['name'] . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_OPTIONS_IMAGES, '&cID=' . $selected_value['id'] . '&box_id=' . $box_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_OPTIONS_IMAGES, '&cID=' . $selected_value['id']. '&box_id=' . $box_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); break; } } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top" align="center">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> <tr><td> <?php echo tep_draw_form('update_enabled_options', FILENAME_OPTIONS_IMAGES, '&cID=' . $selected_value['id'] . '&box_id=' . $options_id . '&action=update_enabled', 'post'); echo '<tr><td class="smalltext">You currently have Options as Images enabled for the following options categories:</td></tr>'; $options_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $language_id . "'"); echo '<tr><td class="smalltext">'; while ($options = tep_db_fetch_array ($options_query)){ if ($options['products_options_images_enabled'] == 'true') $checked = true; else $checked = false; echo $options['products_options_name'] . tep_draw_selection_field('option_select[' . $options['products_options_id'] . ']', 'checkbox', $options['products_options_id'], $checked) . ' | '; } echo tep_image_submit('button_update.gif', IMAGE_UPDATE); echo '</td></tr>'; ?> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  7. Tried installing the anti-robot for the review system but all I get is an empty box in the review page. Has anyone been able to install this mod to the anti-robot contrib? -Thomp
  8. Thomp

    fast easy checkout

    Has anyone tried combining FEC with Anti Robot Registration, or SuperContact US mods? I've run into a brick wall with trying to integrate the FEC create_account3.php file and the create_account.php that the Anti Robot requires. The real problem I guess arises from the account_box.php and account_box2.php files. I was able to get the account_box.php to work but the latter just doesnt seem to work. Here is the code I've done so far. If anyone would be able to help, it would be much appreciated, and I'm sure others would love to see it too since I couldnt find anyone doing this yet! I have a feeling this is a easy fix, but please help me out here! From account_box2.php <?php if($fromlogin!=1){ ?> <tr> <td class="main"><b><?php if($fromlogin!=1){echo CATEGORY_CREATE_ACCOUNT;}else{echo CATEGORY_PASSWORD;} ?></b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="2" cellpadding="2"> <?php if($fromlogin!=1){ ?> <tr> <td class="main"><?php echo ENTRY_CREATEACCOUNT; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_checkbox_field('createaccount', 'Y',$checked = false ,'id="toggle"' ) . ' ' . YES_ACCOUNT; ?></td> </tr> <tr><td> <p id="lorem" ><span class="infoBoxContents"><?php echo ENTRY_PASSWORD.' '; ?> <?php echo tep_draw_password_field('password') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?><br><span class="infoBoxContents"> <?php echo ENTRY_PASSWORD_CONFIRMATION; ?> <?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '': '</span>'); ?> </p></td></tr> </table></td> </tr> </table> <?php } ?></td> </tr> <!-- // BOF Anti Robot Registration v2.6--> <?php if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'create_account') && ACCOUNT_CREATE_VALIDATION == 'true') { ?> <tr> <td class="main"><b><?php echo CATEGORY_ANTIROBOTREG; ?></b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="2" cellpadding="2"> <tr> <?php if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'create_account') && ACCOUNT_CREATE_VALIDATION == 'true') { if ($is_read_only == false || (strstr($PHP_SELF,'create_account')) ) { $sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE timestamp < '" . (time() - 3600) . "' OR session_id = '" . tep_session_id() . "'"; if( !$result = tep_db_query($sql) ) { die('Could not delete validation key'); } $reg_key = gen_reg_key(); $sql = "INSERT INTO ". TABLE_ANTI_ROBOT_REGISTRATION . " VALUES ('" . tep_session_id() . "', '" . $reg_key . "', '" . time() . "')"; if( !$result = tep_db_query($sql) ) { die('Could not check registration information'); } ?> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" width="100%" NOWRAP><span class="main"> <?php echo ENTRY_ANTIROBOTREG; ?></span></td> </tr> <tr> <td class="main" width="100%"> <?php $check_anti_robotreg_query = tep_db_query("select session_id, reg_key, timestamp from anti_robotreg where session_id = '" . tep_session_id() . "'"); $new_guery_anti_robotreg = tep_db_fetch_array($check_anti_robotreg_query); $validation_images = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id']); if ($entry_antirobotreg_error == true) { ?> <span> <?php echo $validation_images . ' <br> '; echo tep_draw_input_field('antirobotreg') . ' <br><b><font color="red">' . ERROR_VALIDATION . '<br>' . $text_antirobotreg_error . '</b></font>'; } else { ?> <span> <?php echo $validation_images . ' <br> '; echo tep_draw_input_field('antirobotreg', $account['entry_antirobotreg']) . ' ' . ENTRY_ANTIROBOTREG_TEXT; } } } ?> </span> </td> </tr> </table></td> </tr> </table></td> </tr> </tr> </table></td> </tr> </table></td> </tr> <!-- // EOF Anti Robot Registration v2.6--> <?php }else{include('includes/fec/account_box.php'); } ?>
  9. Thomp

    Multi_Vendor_Shipping new thread

    Craig, Thanks for your Help! Exactly as I thought, it was the mysql version that was causing the problems. I have now switched servers and have the same setup as above. Everything works beautifully! On a side note, I'm still trying to merge MVS and FEC but the checkout_shipping.php is giving me all sorts of headaches. You mentioned sometime back that you knew of someone who had succesfully merged them, could you point me in their direction or is there a way to get in touch with that person. I would love to see their checkout_shipping.php file and get this thing solved! Thanks again!! Regards, Thomp
  10. Thomp

    Multi_Vendor_Shipping new thread

    Hi Craig, Just to follow up on my problem. I did some testing to see if the other contribs that I've installed were at fault. So I made a vanilla install of OsC and then installed MVS on that. Assuming that the installation package of MVS is rock solid, and other users are installing it successfully then it should work with a vanilla OsC. Well the end result was the same. The damn shipping modules in the vendor management would not update. Basically no values are being passed forward. So assuming that there are no problems with the MVS package, then its gotta be the MySQL? Again I read that an older version of MySQL cant handle certain syntax that a newer one can, so some of the code in MVS is not compatible with MySQL 3.23. With the rest of OsC showing no signs of incompatibility or problems, I just cant make any other sense of this. <_< I'm seriously thinking of dumping my current hosting service and switching to another one with newer MySQL version, but taking that step just because of a hypothesis makes me a little uneasy. Could it possibly be anything else? :blink: -Thomp ps. I'm sure you've noticed that I'm a persistent little bugger.. (or just plain stubborn) :lol:
  11. Thomp

    Multi_Vendor_Shipping new thread

    I started thinking, could this be caused by an old version of mysql not working with the MVS code? Particularly subqueries? As far as I know, the mysql that is on my server is version 3.23.37 If this is the case, how would I go about fixing this? -thomp
  12. Thomp

    Multi_Vendor_Shipping new thread

    Hi Craig, Thanks for your help with this. I'm really miffed. Ive gone over the vendor_modules.php a few times new, compared it with modules.php and cant really find anything a miss. :blink: I just dont get it. The modules.php works just fine, but the vendor_modules.php doesnt. Like you said, the values are not being passed between the database and the form. I just cant figure out how to fix it.. or where to even begin! :'( could it possibly be some other file that is messing the update up? I dont even get any error messages into my server logs. Its just really really weird. The database looks correct, just as the installation says. I've tirelessly tried to check the other contribs; FEC, HTC and Ultrapics that they dont interfere with MVS. What am I missing here? Appreciate your help!! -thomp :'(
  13. Thomp

    Multi_Vendor_Shipping new thread

    Thanks. I did that and got this in response: :'( the $value: 1 and the $key: I'm able to do changes elsewhere in the shop, its just the MVS module that is not updating the database. Are the session variables different somehow than what I am running right now? Ive got the latest version of OsC. -thomp :blink:
  14. Thomp

    Multi_Vendor_Shipping new thread

    Hi Craig, thanks for your help! I tried adding the echo to the location you suggested. Nothing happened after I had installed it and tinkered around with the shipping options in the vendor shipping module admin side. No text, no info, no update. I wouldnt think my environment is the culprit, but could my other contribs be preventing MVS from working? I have BOF, SEO and FEC installed. All are running just fine. Have you heard any incompatibility issues with these and MVS? If there is, which files could be causing the problem? I've been going over all the modified files and just cant see what could cause this problem. Thanks again! -Tuomo
  15. Thomp

    Multi_Vendor_Shipping new thread

    RonR, thanks for the reply. I'm sure some people have done that.. but trust me.. I aint one of those people.. -thomp
×