wilma2 Posted November 25, 2008 Share Posted November 25, 2008 Got it to work, but where do I change the text that states "Click below for a chance to win these spectacular glass goblets" ????!!!! EDIT: Fixed it. Hi Victor can you tell me how you did it? thanks Quote Link to comment Share on other sites More sharing options...
random183 Posted November 25, 2008 Share Posted November 25, 2008 Hi Victor can you tell me how you did it? thanks It's in catalog\includes\languages\english\competition.php around line 21 Mat Quote Link to comment Share on other sites More sharing options...
wilma2 Posted November 25, 2008 Share Posted November 25, 2008 It's in catalog\includes\languages\english\competition.php around line 21 Mat wow Mat thank you for the incredibly fast answer I appreciate it. On another note I have the prize draw on my main page but when someone clicks on it it comes up internal server error is this a host thing? Quote Link to comment Share on other sites More sharing options...
random183 Posted November 25, 2008 Share Posted November 25, 2008 wow Mat thank you for the incredibly fast answer I appreciate it. On another note I have the prize draw on my main page but when someone clicks on it it comes up internal server error is this a host thing? Hi. I have to admit I'm no expert in this, i just got to know this contribution because it cost me a bit of time to get it working :) You do have a competition setup? Otherwise it could be many different things... 1st stage would be to check each modification you did to make sure they're right. In the past I've found a simple missing character in a language file can cause this error for example. Another thing to check is your database to make sure the additions went in there properly. I wouldn't think it's your server, if it can host osCommerce it can do the extra bit for the competitions.. Mat Quote Link to comment Share on other sites More sharing options...
wilma2 Posted November 25, 2008 Share Posted November 25, 2008 Hi. I have to admit I'm no expert in this, i just got to know this contribution because it cost me a bit of time to get it working :) You do have a competition setup? Otherwise it could be many different things... 1st stage would be to check each modification you did to make sure they're right. In the past I've found a simple missing character in a language file can cause this error for example. Another thing to check is your database to make sure the additions went in there properly. I wouldn't think it's your server, if it can host osCommerce it can do the extra bit for the competitions.. Mat I did some research and it had to do with the permissions of the file and making them 755 that worked. But i have found I am having another problem in the admin section under reports i only have a capital A nothing else. I also can not set question options. thanks again Mat Quote Link to comment Share on other sites More sharing options...
johnnybebad Posted December 15, 2008 Share Posted December 15, 2008 I did some research and it had to do with the permissions of the file and making them 755 that worked. But i have found I am having another problem in the admin section under reports i only have a capital A nothing else. I also can not set question options. thanks again Mat Had a go with installing thic contribution, but struggling a little bit now. It works to a fashion but I cant provide any details on answers A, B or C, same goes for when you try and enter it says select a,b or C but theres nothing to select. Can anyone please advise. Thanks Johnny Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 15, 2008 Share Posted December 15, 2008 (edited) Hi how would I change it to get radio buttons for the competitors selection? As it looks better if you have the three radio options to select rather then entering the answer A, B or C in the little box currently provided. Thanks Johnny Edited December 15, 2008 by johnnybebad Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 16, 2008 Share Posted December 16, 2008 (edited) Okay I have got me admin section so I can type individual values for A, B and C rather than type it in text in the question. And it transfers the information to my database. more luck than skill. However having trouble getting the A, B and C answers as radio buttons with the options at the side instead of being part of the question. I can get them the options with radio buttons, but they Don't have A, B and C by there side. The code I currently have been playing with is <!-- <td class="main"><span class="main">Please indicate A, B, or C</span> <input type="radio" name="entry_qualify_answer" CHECKED> <span class="inputRequirement">*</span></td>--> <td class="main" STYLE="padding:15px;"><b>A</b> <input type="radio" name="entry_qualify_answer" value="A"><?php echo tep_draw_input_field('configuration_value', COMPETITION_ANSWER_A); ?><br><input type="radio" name="entry_qualify_answer" value="B"><?php echo tep_draw_input_field('configuration_value', COMPETITION_ANSWER_B); ?><br> <input type="radio" name="entry_qualify_answer" value="C"><?php echo tep_draw_input_field('configuration_value', COMPETITION_ANSWER_C); ?><br> Can anyone tell me how to get this fully functional so I have :- A radio button answer a B radio button answer b C radio button answer c I think the submission will be just A, B or C as before rather than the full answer, so the only change is how its presented and selected for submission? I have the radio buttons in place, the answers a, b and c in place, but just the A is showing and the next two boxes are no B and C showing, also the answers a, b and c are in a box where the values can be changed by anyone, which defeats the points of having fixed values. Also have the original script that gives a box for you to enter the answer in which i want to get rid of altogether. It may be easier to see looking at the code to start with. Thanks Edited December 16, 2008 by johnnybebad Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 16, 2008 Share Posted December 16, 2008 Okay I worked it out and its working. I have added the information to prize draw contribution. The files allow:- 1. Insert radio buttons for answers A, B and C 2. To update these values in admin when you setup the prize draw. The only problem was I did not change the auto database configurer to update the configuration table with 3 new enteries (answer a, b and c) Any problems give us a shout and I will do my best to help, would be nice if we had one of those calendars where you can select the date rather than type it in. Thanks Johnny Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2008 Share Posted December 17, 2008 I just installed this contribution (competition v1.2) and get the following error, It only happens when allow guest to enter is set to false. Error: 1054 - Unknown column 'competition_code' in 'where clause' select count(*) as total from customers where customers_email_address = '' and customers_id = '1' AND competition_code = '001' [TEP STOP] I have reinstalled it several times and tried to use the manual sql also. Have even tried on stock shop as well. Any help is appreciated. oscommerce-2.2ms2-060817 mysql 5 php5 Quote Link to comment Share on other sites More sharing options...
johnnybebad Posted December 17, 2008 Share Posted December 17, 2008 I just installed this contribution (competition v1.2) and get the following error, It only happens when allow guest to enter is set to false. Error: 1054 - Unknown column 'competition_code' in 'where clause' select count(*) as total from customers where customers_email_address = '' and customers_id = '1' AND competition_code = '001' [TEP STOP] I have reinstalled it several times and tried to use the manual sql also. Have even tried on stock shop as well. Any help is appreciated. oscommerce-2.2ms2-060817 mysql 5 php5 Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 17, 2008 Share Posted December 17, 2008 Hi, I am sorting out my files for the upload to the contribrution. As i messed it up previously. The mods I mod to the version 1.2 are below:- 1a). the stats_prize_draw.php in admin Around line 133 after tep_db_query("UPDATE `" . TABLE_CONFIGURATION . "` SET `configuration_value` = '" . tep_db_input($HTTP_GET_VARS ['products_id']) . "' WHERE `configuration_key` = 'PRIZE_ID' LIMIT 1;"); add:- tep_db_query("UPDATE `" . TABLE_CONFIGURATION . "` SET `configuration_value` = '" . tep_db_input($HTTP_GET_VARS ['answer_a']) . "' WHERE `configuration_key` = 'COMPETITION_ANSWER_A' LIMIT 1;"); tep_db_query("UPDATE `" . TABLE_CONFIGURATION . "` SET `configuration_value` = '" . tep_db_input ($HTTP_GET_VARS['answer_b']) . "' WHERE `configuration_key` = 'COMPETITION_ANSWER_B' LIMIT 1;"); tep_db_query("UPDATE `" . TABLE_CONFIGURATION . "` SET `configuration_value` = '" . tep_db_input ($HTTP_GET_VARS['answer_c']) . "' WHERE `configuration_key` = 'COMPETITION_ANSWER_C' LIMIT 1;"); 1b) Around line 380 after echo '<tr><td class="main" width="15%">Question</td><td class="main" align="left">' . tep_draw_input_field('question', 'type your question here','size="60", onclick=value=""') . ' </td></tr>'; add:- echo '<tr><td class="main" width="15%">Question</td><td class="main" align="left">' . tep_draw_input_field('question', 'type your question here','size="60", onclick=value=""') . ' </td></tr>'; echo '<tr><td class="main" width="15%">Answer A</td><td class="main" align="left">' . tep_draw_input_field('answer_a', 'type answer a here','size="30", onclick=value=""') . ' </td></tr>'; echo '<tr><td class="main" width="15%">Answer B</td><td class="main" align="left">' . tep_draw_input_field('answer_b', 'type answer b here','size="30", onclick=value=""') . ' </td></tr>'; echo '<tr><td class="main" width="15%">Answer C</td><td class="main" align="left">' . tep_draw_input_field('answer_c', 'type answer c here','size="30", onclick=value=""') . ' </td></tr>'; echo '<tr><td class="main" width="15%">Answer</td><td class="main" align="left">' . tep_draw_pull_down_menu('answer', $answer_array,'size="1"') . ' </td></tr>'; 2. swap the following code in catalog/competition.php (this gives radio button options with those previously entered in admin) Find the following:- <td class="main"><?php echo '<span class="main">' . FORM_FIELD_QUALIFING_ANSWER . '</span> ' . tep_draw_input_field('entry_qualify_answer','','size="1"') . ' <span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>'; ?></td> Replace with:- <td class="main" STYLE="padding:15px;"><b>A</b> <input type="radio" name="entry_qualify_answer" value="A"><?php echo COMPETITION_ANSWER_A; ?><br><b>B</b> <input type="radio" name="entry_qualify_answer" value="B"><?php echo COMPETITION_ANSWER_B; ?><br><b>C</b> <input type="radio" name="entry_qualify_answer" value="C"><?php echo COMPETITION_ANSWER_C; ?><br> </td><td> 3. Need to add to your shops database configuration table configuration_title configuration_key configuration_group_id Competition Answer A COMPETITION_ANSWER_A (number to be same as other competion entry information) Competition Answer B COMPETITION_ANSWER_B (number to be same as other competion entry information) Competition Answer C COMPETITION_ANSWER_C (number to be same as other competion entry information) To find the number search in the configuration table for %like% competition under title, then look at the value in configuration_group_id, when you insert the new entries use the same configuration_group_id. 4a.In catalog/includes/languages/english/competition.php This replaces the win these goblets text, Find;- define('BOX_COMPETITION_INVITE','Click below for a chance to win these spectacular glass goblets<BR>'); replace with define('BOX_COMPETITION_INVITE','Click below for a chance to win this great prize.<BR>'); 4b) This automaically puts the end date of the competition find:- define('FORM_COMPETITION_DETAILS','Thank you for visting our site and taking the time to look around.<BR><BR>Before you leave, why not enter our free prize draw for a chance to win this fabulous prize.' . '<BR><BR>This prize draw will be running until the 25th May 2007.<BR><BR>The Winner will be notified by email after this date.<BR><BR><span class="smalltext">(terms & conditions apply)</span>'); and replace with ;- define('FORM_COMPETITION_DETAILS','Thank you for visting our site and taking the time to look around.<BR><BR>Before you leave, why not enter our free prize draw for a chance to win this fabulous prize.' . '<BR><BR>This prize draw will be running until the ' . tep_date_long (COMPETITION_CLOSE_DATE) . '<BR><BR>The Winner will be notified by email after this date.<BR><BR><span class="smalltext">(terms & conditions apply)</span>'); Can somone please verify this coding, as I get it to work on my site but i am new to this so it would be great if someone else could check it out. Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
jan64 Posted December 20, 2008 Share Posted December 20, 2008 Also after the update's i still getting: 1062 - Duplicate entry 'name@name.nl-0001' for key 2 insert into contest (contestant_name, contestant_email, date_entered, validated, competition_code) values ('name name', 'name@name.nl', now(), 'N', '0001') Still nobody who has the same problem solved? regards, Jan Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
johnnybebad Posted December 20, 2008 Share Posted December 20, 2008 Also after the update's i still getting: 1062 - Duplicate entry 'name@name.nl-0001' for key 2 insert into contest (contestant_name, contestant_email, date_entered, validated, competition_code) values ('name name', 'name@name.nl', now(), 'N', '0001') Still nobody who has the same problem solved? regards, Jan Hopefully have the answer later today on this one with some more mods Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 20, 2008 Share Posted December 20, 2008 Okay, I have the answer. It appears theres a little bit of code missing. catalog/competition.php // Check if we have already entered $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CONTEST . " where contestant_email = '" . $referrals_data['customers_email_address'] . "' AND competition_code = '" . COMPETITION_CODE . "'"); $check_email = tep_db_fetch_array($check_email_query); if ($check_email['total'] > 0) { $error = true; $messageStack->add('competition', TEXT_ALREADY_ENTERED); This should read // Check if we have already entered $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CONTEST . " where contestant_email = '" . $referrals_data['customers_email_address'] . "' AND competition_code = '" . COMPETITION_CODE . "'"); $check_email = tep_db_fetch_array($check_email_query); if ($check_email['total'] > 0) { $error = true; if ($error == true && $show_invite == true) $messageStack->add('competition', TEXT_ALREADY_ENTERED); please let me know how you get on, just tried it and it worked for me Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 20, 2008 Share Posted December 20, 2008 okay its not the answer but nearly there. Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 20, 2008 Share Posted December 20, 2008 can someone verify this please it appears to be working. in catalog/competition.php find:- if ($error == false && $show_invite == true) { tep_db_query("insert into " . TABLE_CONTEST . " (contestant_name, contestant_email, date_entered, validated, competition_code) values ('" . tep_db_input($entry_name) . "', '" . tep_db_input($entry_email_address) . "', now(), '" . tep_db_input($validated) . "', '" . tep_db_input(COMPETITION_CODE) . "')"); tep_redirect(tep_href_link(FILENAME_COMPETITION, 'action=success')); replace with if ($error == true && $show_invite == true) $messageStack->add('competition', TEXT_ALREADY_ENTERED); } else { if ($error == false && $show_invite == true) { tep_db_query("insert into " . TABLE_CONTEST . " (contestant_name, contestant_email, date_entered, validated, competition_code) values ('" . tep_db_input($entry_name) . "', '" . tep_db_input($entry_email_address) . "', now(), '" . tep_db_input($validated) . "', '" . tep_db_input(COMPETITION_CODE) . "')"); tep_redirect(tep_href_link(FILENAME_COMPETITION, 'action=success')); Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 20, 2008 Share Posted December 20, 2008 going crazy, though I had it running something changes slighlty and I lose it. either that or the systems is lagging behind or something. lets crack on and get it nailed Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 21, 2008 Share Posted December 21, 2008 Okay, the catalog competition file should read as follows:- <?php /* $Id: competition.php Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License Written by Carl Skerritt */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_COMPETITION); $show_invite = false; // Check if we should display this page, incase someone accesses it directly. if (SHOW_COMPETITION == 'true') { $show_invite = true; // Check if we are a registered customer if (tep_session_is_registered('customer_id') && COMPETITION_ALLOW_CUSTOMERS == 'false') { $show_invite = false; } // Check if we are a guest if (!tep_session_is_registered('customer_id') && COMPETITION_ALLOW_GUESTS == 'false') { $show_invite = false; } // Check if within dates of competition $start_date = COMPETITION_START_DATE; $close_date = COMPETITION_CLOSE_DATE; $now = date("Y-m-d"); if ($now >= $start_date && $now < $close_date) { } else { $show_invite = false; } } if ($show_invite == false) { tep_redirect(tep_href_link(FILENAME_LOGIN)); } // Retrieve {Prize details $competition_prize_query = tep_db_query("select p.products_id, p.products_price, p.products_image, pd.products_name, pd.products_description from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and p.products_id ='" . (int)PRIZE_ID . "' and pd.language_id = '" . (int)$languages_id . "' limit 1"); if (tep_db_num_rows($competition_prize_query) >0) { $prizes = tep_db_fetch_array($competition_prize_query); } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) { $error = false; $entry_email_address = tep_db_prepare_input($HTTP_POST_VARS['entry_email_address']); $entry_name = tep_db_prepare_input($HTTP_POST_VARS['entry_name']); $entry_valid = tep_db_prepare_input($HTTP_POST_VARS['entry_qualify_answer']); if (empty($entry_name)) { $error = true; $messageStack->add('competition', ERROR_TO_NAME); } if (!tep_validate_email($entry_email_address)) { $error = true; $messageStack->add('competition', ERROR_TO_ADDRESS); } // Check if we have already entered $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CONTEST . " where contestant_email = '" . $entry_email_address . "' AND competition_code = '" . COMPETITION_CODE . "'"); $check_email = tep_db_fetch_array($check_email_query); if ($check_email['total'] > 0) { $error = true; $messageStack->add('competition', TEXT_ALREADY_ENTERED); } // If this is a members only competition, check that address entered matchs the one held on the account if (COMPETITION_ALLOW_CUSTOMERS == 'true' && COMPETITION_ALLOW_GUESTS == 'false') { $check_members_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " cu, contest ct where cu.customers_email_address = '" . tep_db_input($entry_email_address) . "' and cu.customers_id = '" . (int)$customer_id . "' AND ct.competition_code = '" . COMPETITION_CODE . "'"); $check_members_email = tep_db_fetch_array($check_members_email_query); if ($check_members_email['total'] = 0) { $error = true; $messageStack->add('competition', ERROR_TO_MEMBERS_ADDRESS); } } $validated = "Y"; if (COMPETITION_QUALIFY == 'true') { if (empty($entry_valid)) { $error = true; $messageStack->add('competition', ERROR_TO_VALID); } else { // Check if question was answered if (strtoupper($entry_valid{0}) == strtoupper(COMPETITION_ANSWER)) { $validated = "Y"; } else { $validated = "N"; } } } if ($error == false && $show_invite == true) { tep_db_query("insert into " . TABLE_CONTEST . " (contestant_name, contestant_email, date_entered, validated, competition_code) values ('" . tep_db_input($entry_name) . "', '" . tep_db_input($entry_email_address) . "', now(), '" . tep_db_input($validated) . "', '" . tep_db_input(COMPETITION_CODE) . "')"); tep_redirect(tep_href_link(FILENAME_COMPETITION, 'action=success')); } } // end of Process $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_COMPETITION)); ?> <!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; ?>"> <style type="text/css"> TD.infoNotice, DIV.infoNotice { font-family: Verdana, Arial, sans-serif; font-size: 14px; font-weight: bold; color: #666666; } </style> <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('competition', tep_href_link(FILENAME_COMPETITION, 'action=process')); ?><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 sprintf(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('competition') > 0) { ?> <tr> <td><?php echo $messageStack->output('competition'); ?></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="infoNotice" align="center"><?php echo TEXT_COMPETITION_ENTRY_SUCCESSFUL; ?></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="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo FORM_TITLE_ENTRY_DETAILS; ?></b></td> <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="infoNotice" width=50% align="left" valign="top"><?php echo FORM_COMPETITION_DETAILS; ?></td> <td class="main" width=50% align="center" valign="top"><?php echo tep_image(DIR_WS_IMAGES . $prizes['products_image'], $prizes['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '<BR>' . '<b>' . $prizes['products_name'] . '</B><BR>' . $prizes['products_description']; ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo FORM_FIELD_ENTRY_NAME; ?></td> <td class="main"><?php echo tep_draw_input_field('entry_name') . ' <span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>'; ?></td> </tr> <tr> <td class="main"><?php echo FORM_FIELD_ENTRY_EMAIL; ?></td> <td class="main"><?php echo tep_draw_input_field('entry_email_address') . ' <span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>'; ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php if (COMPETITION_QUALIFY == "true") { ?> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo FORM_FIELD_QUALIFING_QUESTION; ?></td> </tr> <tr> <td class="main" colspan="2"><b><?php echo COMPETITION_QUESTION; ?></b></td> </tr> <tr> <td class="main"><?php echo '<span class="main">' . FORM_FIELD_QUALIFING_ANSWER . '</span> ' . tep_draw_input_field('entry_qualify_answer','','size="1"') . ' <span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>'; ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> </table></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><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></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'); ?> ?> Please note this does not give the radio buttons. but it appears to stop the duplicate entry error. Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
jan64 Posted December 21, 2008 Share Posted December 21, 2008 Hi, thanks for your reaction. i can't try it at the moment, but you here from asap. regards, Jan Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
johnnybebad Posted December 21, 2008 Share Posted December 21, 2008 Hi, thanks for your reaction. i can't try it at the moment, but you here from asap. regards, Jan Hi Jan, I am learning and have had this working several times, but think it got over complicated because alterations i made in the file didnt filter through or had cache issues distorting the picture. A good night sleep and another look cleared things up quickly, putting together the full package right now so it be great if you can confirm the changes work. Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
johnnybebad Posted December 22, 2008 Share Posted December 22, 2008 added contribution V1.3. This has all the files (I hope) tested it on my site from scratch build on OS 2.2 RC2a Have included Admin 1. Entry of dates using java calendar rather than having to type them in. 2. Entry values for Answers A, B and C rather than including in as part of question 3. E-mail sent to winner with auto filled store information SHOP 1. Automatic end date of competition displayed 2. Radio buttons displayed to select answer rather than typing a value. 3. Duplicate entry error fixed Any problems give us a shout, Merry Christmas and a Happy New Year Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
jan64 Posted December 22, 2008 Share Posted December 22, 2008 Hi, I have installed the new version but i can't see the java calendar. it's not available. any idea where it goes wrong? regards, Jan Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
jan64 Posted December 22, 2008 Share Posted December 22, 2008 (edited) Hi, I have installed the new version but i can't see the java calendar. it's not available. any idea where it goes wrong? regards, Jan I have the answer, there were some letters written in capitel (i hope you understand my english) and that was wrong. see edit code below: <!-- header_eof //--> <link rel="stylesheet" type="text/css" href="includes/javascript/spiffycal/spiffycal_v2_1.css"> <script language="JavaScript" src="includes/javascript/spiffycal/spiffycal_v2_1.js"></script> <script language="javascript"> var dateAvailable = new ctlspiffycalendarBox("dateAvailable", "setupnew", "start_date","btnDate1","",scBTNMODE_CUSTOMBLUE); var dateAvailableEnd = new ctlspiffycalendarBox("dateAvailableEnd", "setupnew", "end_date","btnDate2","",scBTNMODE_CUSTOMBLUE); </script> <!-- body //--> And then it works for me, maybe somebody needs this solution also. Thanks johnnybebad, and the others, for these great contri. regards, Jan Merry Xmas and a Happy New Year! Edited December 22, 2008 by jan64 Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
jan64 Posted December 22, 2008 Share Posted December 22, 2008 (edited) I was a little to fast, a small problem occurs. See image below: The questions and the answer is filled in but the answers aren't showing in the prizedraw page. and that one is a real problem for me. So if somebody knows what goes wrong, please help me. regards, Jan Edited December 22, 2008 by jan64 Quote Dreams can come true, if you help them a littlebit 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.