Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

moosey_jude

Archived
  • Posts

    19
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Tone

moosey_jude's Achievements

  1. hello, i have the same problem you had for your contrib, but still cant fix can you please tell me what your problem was so i can try trouble shoot

    thank you

  2. Hi Dennis As long as GD is installed on your PHP server you could try uploading a truetype font to your server and providing the full server path to the uploaded font for the 'TrueType font used' in Admin. eg as a test if you uploaded arial.ttf from your windows/fonts folder to ..somepath.../images/fonts/arial.ttf you would enter ...somepath.../image/fonts/arial.ttf in Admin. You could then try turning TrueType back on. Tone.
  3. Ok thanks for that. Can you try the following piece of code and let me know if it produces the text 'Simple Text' in a rectangle please. <?php header ("Content-type: image/png"); $im = @imagecreatetruecolor(120, 20) or die("Cannot Initialize new GD image stream"); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 5, 5, 5, "Simple Text", $text_color); imagepng($im); imagedestroy($im); ?> Thanks, Tone.
  4. It may be that you have no GD library support on your PHP server. Tone.
  5. Oh forgot - you can also provide the server path to the font file in the admin panel. So instead of just typing the font name for the 'Truetype font used' you can provide a complete path eg on a windows server it would be something like c:/windows/fonts/arial.ttf. Tone.
  6. The truetype font support requires the GD library to be available in PHP. You can check for this using Admin | Tools | Server Info from your store Admin. Look for gd listed under the PHP configuration details. If it's not there you will need to see if your host can make this available. If gd support is enabled, then the server environment variable GDFONTPATH points to the truetype font directory. Again, your host should be able to tell you which fonts are available. If you want to use your own truetype fonts you can set this variable to point to a directory of your own using PHP for example something like: <?php // Set the enviroment variable for GD fonts putenv('GDFONTPATH=' . 'images/fonts/')); ?> Good luck, Tone.
  7. Have you changed the configuration options for Anti Robot in Admin configuration? The default install settings should reproduce the appearance of the 2.5 code - however try the following settings: Use Truetype fonts: false Background color: 0xFFFFFF Text color: 0x000000 Apply noise filter? false Apply scatter filter? false Apply interlace filter? false Apply grayscale filter? false This should produce the validation code as black text on a white background using a plain PHP bitmap font and with no attempt to distort the image. If that's good then try re-introducing the noise then scatter filter options. If that's OK then try settings Use Truetype fonts to true. At what point does it break? If that fails, then I would try AlexStudio's suggestion of replacing the validation_png.php file with the version from 2.5 to see if it's a 2.6 issue. Let me know how you get on. Tone.
  8. Okay - try this: Find: require('includes/application_top.php'); Paste after it: // BOF Anti Robot Validation v2.4 if (ACCOUNT_VALIDATION == 'true' && ACCOUNT_CREATE_VALIDATION == 'true') { require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_VALIDATION); include_once('includes/functions/' . FILENAME_ACCOUNT_VALIDATION); } // EOF Anti Robot Registration v2.4 Find: $error = false; Paste above it: // BOF Anti Robot Registration v2.4 if (ACCOUNT_VALIDATION == 'true' && ACCOUNT_CREATE_VALIDATION == 'true') { $antirobotreg = tep_db_prepare_input($HTTP_POST_VARS['antirobotreg']); } // EOF Anti Robot Registration v2.4 Find: $error = true; $messageStack->add('submit_link', ENTRY_LINKS_DUPLICATE_ERROR); } } Paste after it: // BOF Anti Robotic Registration v2.4 if (ACCOUNT_VALIDATION == 'true' && ACCOUNT_CREATE_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('submit_link', $text_antirobotreg_error); } // EOF Anti Robotic Registration v2.4 Finally, find: <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> </table></form></td> <!-- body_text_eof //--> And paste before it: <!-- // BOF Anti Robot Registration v2.4--> <?php if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'links_submit') && 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,'links_submit') && ACCOUNT_CREATE_VALIDATION == 'true') { if ($is_read_only == false || (strstr($PHP_SELF,'links_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 = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id'] . '&' . time() . '.png'); 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> <!-- // EOF Anti Robot Registration v2.4--> Good Luck!
  9. Hi Tracy It will be a client or server caching issue. Try the following: Example in create_account.php change $validation_images = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id']); to $validation_images = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id'] . '&' . time() . '.png'); This forces a change to the url on each refresh by appending a parameter based on the current time. Good luck!
  10. For those with modded oscommerce stores that have the 'no validation image showing on the web page' problem and have the same issue with the suggested post-install test. have you made any mods to application_top.php? if so you may be outputting headers etc prior to the content-type output in validation_png.php. you may wish to try the following as a solution: comment out require('includes/application_top.php'); at the top of validation_png.php insert the following code beneath the newly commented line // include necessary pre-amble error_reporting(0); require_once('includes/configure.php'); define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG); require_once(DIR_WS_INCLUDES . 'filenames.php'); require_once(DIR_WS_INCLUDES . 'database_tables.php'); require_once(DIR_WS_FUNCTIONS . 'database.php'); tep_db_connect() or die('Unable to connect to database server!'); $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION); while ($configuration = tep_db_fetch_array($configuration_query)) { define($configuration['cfgKey'], $configuration['cfgValue']); } // End - include Hope that helps somebody! Good luck!
  11. :blush: ahem, well I located the problem to a stupid typo in the ot_shipping module which was storing the wrong value in the orders total table. Problem solved now! Thanks for the help.
  12. Hi I'm not getting any javascript errors. On investigating further I've noticed that the value is incorrect when the edit_orders page loads - however changing a vendors base price for shipping causes the code you've identified to be called and the values are then updated correctly. So it appears to be the initialisation of the field values that's causing my problem. Again, if you can point me in the right direction I'd be grateful. In the meantime I'll look at my code further and see if I can spot what I've done wrong.
  13. Thanks for the contribution! In mvs order edit 1.1, for both mvs and non-mvs orders, my order edit page is showing overall shipping as 10x the value it should be - eg in edit_orders it shows with the product correctly as $7.50 but in the overall combined shipping field it is showing as $75.00 (and it's value is 75 in the calculations). Any pointers to the right area of the code to look at would be gratefully received. Tony.
  14. I've ported the multi-geozone multi-table (mzmt) shipping module to MVS0.94 and posted to the contribution. Any feedback is welcome. Tony.
  15. Craig Thanks for the encouraging comments. I have to say being new to the contribution I got a bit confused. So having now set the Tare weight in the Vendor Admin rather than the standard Shipping/Packaging module :-" I now observe that a single Tare weight is added where multiple numbers of an item are placed in the cart. I would expect the desired behaviour to be that the Tare weight is added for each item above a single item. Thanks for the pointers into the code - I'll investigate and post any mods back to the forum. Tony.
×
×
  • Create New...