Zen Cart Logo
Forums / All Other Contributions/Addons / Contest System [support thread]

Contest System [support thread]

Views: 57,864

Results 81 to 100 of 408
2 Aug 2009, 3:22 PM
#81
amebb avatar

amebb

Zen Follower

Join Date:
May 2008
Location:
UK
Posts:
406
Plugin Contributions:
0

Contest System [support thread]

Hi Skip

I need some help please.

I have two zencart sites that i am running and both are upto date versions - v1.38.

The first site is https://www.aps8.net/ML/ and is using the Cherry template

The second site is https://www.aps8.net/ss/ using the silverfish templete.

I have installed the contest script - version 1.5 and all is working fine.

I am testing these sites on Explorer v8 and Firefox.

The issue is when you click on enter the contest you goto the next page. Here you can see the prize etc.
When you click on Click for Contest Rules or
*Click for List of Winners *, you get to the relavant page BUT on the right hand side all the boxes are squashed up.

Have a look at the following links :

a)
http://www.aps8.net/ss/index.php?main_page=contest&action=rules

b)
http://www.aps8.net/ML/index.php?main_page=contest&action=rules

Thanks :huh:

2 Aug 2009, 8:45 PM
#82
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Contest System [support thread]

I looked at both links and they are fine in ie8 and ff3.5.1 maybe someone else looking at them may get your error.

You might want to try this Check Browser Compatibility utility http://browsershots.org/

Skip

2 Aug 2009, 10:34 PM
#83
amebb avatar

amebb

Zen Follower

Join Date:
May 2008
Location:
UK
Posts:
406
Plugin Contributions:
0

Re: Contest System [support thread]

Hi skip

Thank you for your reply.

What i realised is that i am using two zen cart scripts, almost identical apart from the templates etc, the contest script is the only script that is causing small issues.

That is NOT to say its a bad script etc..... MUST ADD THAT POINT !

The script is dam good i like ....:yes:

Now i have had a look at the URL you sent me - Thank you. And, i can see that the script works on nearly all of them apart from MSIE 8......

Typical microsoft hey.....

So, i dont think there is anything you can assist me with - its a Microsoft issue i think.....?

Thank you for your help and good script - keep up the work Bro ...

6 Aug 2009, 1:04 PM
#84
jlcaudio avatar

jlcaudio

New Zenner

Join Date:
Jul 2009
Posts:
53
Plugin Contributions:
0

Re: Contest System [support thread]

skipwater:

Did you do item 2 of the install?

  1. In your admin directory run install-sql-contest-v1.5.php this will up date your
    database. (After running you no longer need this file you may delete it.)
    Note: This sets the product_id to 2 for the prize. If you do not have a product_id
    2 an error will display. Just go to admin->configuration->contest and edit the
    prize id to one of your product IDs.
    Note: Log into your admin after you are logged in paste install-sql-contest-v1.5.php into
    the url address replacing index.php and hit enter. Once it's done you just need to click
    the back button to get back to the admin panel and you will see the 2 menus, 1 in
    configuration and one in reports.

i got it thanks and that was the problem number 2

13 Aug 2009, 6:52 PM
#85
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

Hello everyone!

I have just been able to come back to get this error resolved

I am getting the following error when someone tries to enter my contest:

Error: Your name must not be empty.
Error: Your e-mail address must be a valid e-mail address.
Error: You have not entered an answer to the qualifing question.

But all the information is entered and showing in the admin area as being entered in the contest.

Is there anyway for me to go in the file and just delete that area of the contest entry page?

14 Aug 2009, 2:33 AM
#86
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Contest System [support thread]

divaboutiques:

Hello everyone!

I have just been able to come back to get this error resolved

I am getting the following error when someone tries to enter my contest:

But all the information is entered and showing in the admin area as being entered in the contest.

Is there anyway for me to go in the file and just delete that area of the contest entry page?

I can not recreate what is happing to you.

You say that the contestant data is getting stored in the database then there is no reason that you should get these errors displayed.

Try this test.

  1. Enter a name in the name field only submit the form.

Did it add a contestant record to the database?

If NO

  1. Enter a name in the name field and a valid email in the email field. submit the form.

Did it add a contestant record to the database?

If NO

  1. Fill out the whole form and submit the form.

Did it add a record to the database?

Let me know

Skip

14 Aug 2009, 7:49 PM
#87
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

I can not recreate what is happing to you.

You say that the contestant data is getting stored in the database then there is no reason that you should get these errors displayed.

Try this test.

  1. Enter a name in the name field only submit the form.

Did it add a contestant record to the database?

If NO

  1. Enter a name in the name field and a valid email in the email field. submit the form.

Did it add a contestant record to the database?

If NO

  1. Fill out the whole form and submit the form.

Did it add a record to the database?

1st. Did it add a contestant record to the database? No it didn't add the information to the database

2nd. Did it add a contestant record to the database? Yes it added the information to the database, but I still received this error at the top of the contestant page, and I only see 6 entries but I can't see the contestant name & information now

Error: Your name must not be empty.
Error: Your e-mail address must be a valid e-mail address.

3rd. 3. Fill out the whole form and submit the form? Yes it added the information to the database, but I still received this error at the top of the contestant page, and I only see 6 entries but I can't see the contestant name & information now
Error: Your name must not be empty.
Error: Your e-mail address must be a valid e-mail address.

So I don't know what happened now!

14 Aug 2009, 8:51 PM
#88
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Contest System [support thread]

So I don't know what happened now!

Now you need to edit the file includes/templates/YOUR_TEMPLATE/templates/tpl_contest_default.php to do some more testing.

At around line 18 find

  $show_invite = false; 

Now insert this right above it so it looks like this.

	
       // testing use only
	if ($error == false) {
	 echo 'ERROR FALSE<br />';
	} else {
	 echo 'ERROR TRUE<br />';
	 // should not be set to true here reset to false
	 $error = false;
	}

$show_invite = false; 

Next find around line 82

// echo $entry_email_address.'<br/>'.$entry_name.'<br/>'.$entry_valid;

And just remove the two(2) // so it looks like this

echo $entry_email_address.'<br/>'.$entry_name.'<br/>'.$entry_valid;

Now when you run the contest you will see this information.
Displayed on your screen.

What is there ?

Skip

20 Aug 2009, 5:21 PM
#89
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

I did what you said do for the file, but when I enter the contest it still give this error, also I still can't see the contestant entry emails and names

Error: Your name must not be empty.
Error: Your e-mail address must be a valid e-mail address.

20 Aug 2009, 6:24 PM
#90
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

I went through all my files and made sure everything was uploaded correctly and uploaded in the right directories/folders.

I so love this module, but after going through everything. I have 3 problems right now with my contest module:

1st. I'm getting 2 errors at the top of the contest page, when customers enter there name & email address, but the data is in the system.

2nd. I can't see any Contest Prize Entries, but again the data is in the sytem because it giving a number of how many people have entered the contest. it was working fine before with the older version, until I think I upgraded

3rd. When I click on add customers, to add every customer that have purchased something within the contest time frame it's blank, but there are customer who have purchased within the contest period

I need help on clearing these problems

20 Aug 2009, 8:06 PM
#91
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Contest System [support thread]

When you added the debug code you did get the following that is shown in the image I attached?

21 Aug 2009, 1:55 AM
#92
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

Do I need to add the debug code?

21 Aug 2009, 2:13 AM
#93
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

I don't see anything like that I also tried to run the debug fix, but I wasn't successful

21 Aug 2009, 2:29 AM
#94
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Contest System [support thread]

but I wasn't successful
Why did I miss something in how to add the code?

Skip

21 Aug 2009, 3:21 PM
#95
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

Where would I find the debug code?

21 Aug 2009, 4:38 PM
#96
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Contest System [support thread]

divaboutiques:

Where would I find the debug code?

You need to add the code per this last post:

skipwater:

Now you need to edit the file includes/templates/YOUR_TEMPLATE/templates/tpl_contest_default.php to do some more testing.

At around line 18 find

$show_invite = false;

> 
> Now insert this right above it so it looks like this.
> ```php
	
       // testing use only
	if ($error == false) {
	 echo 'ERROR FALSE<br />';
	} else {
	 echo 'ERROR TRUE<br />';
	 // should not be set to true here reset to false
	 $error = false;
	}

$show_invite = false; 

Next find around line 82

// echo $entry_email_address.'<br/>'.$entry_name.'<br/>'.$entry_valid;

> 
> And just remove the two(2) // so it looks like this
> ```php
echo $entry_email_address.'<br/>'.$entry_name.'<br/>'.$entry_valid;

Now when you run the contest you will see this information.
Displayed on your screen.

What is there ?

Skip

After you have entered the extra code in the includes/templates/YOUR_TEMPLATE/templates/tpl_contest_default.php file. You will see the ERROR info that I had posted earlier.

Skip

22 Aug 2009, 3:31 AM
#97
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

Okay so I entered the code where it's needed:

This is how the code looks, hopefully I put it in the right spot

<?php /** * $Id tpl_contest_default.php V1.5 04.01.2009 * Written by SkipWater <[[email protected]](mailto:"[email protected]")> * * @package page template * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: Define Generator v0.1 $ * * osCommerce, Open Source E-Commerce Solutions * [http://www.oscommerce.com](http://www.oscommerce.com/) * Copyright (c) 2007 osCommerce * Released under the GNU General Public License * Orginal OSC contributed Written by Carl Skerritt */ ** // testing use only if ($error == false) { echo 'ERROR FALSE<br />'; } else { echo 'ERROR TRUE<br />'; // should not be set to true here reset to false $error = false; }** $show_invite = false; $prossed_complete = 0; // Check if we should display this page, incase someone accesses it directly. if (CONTEST_SHOW == 'true') { $show_invite = true; // Check if we are a registered customer if ($_SESSION['customer_id'] && CONTEST_ALLOW_CUSTOMERS == 'false') { $show_invite = false; } // Check if we are a guest if (!$_SESSION['customer_id'] && CONTEST_ALLOW_GUESTS == 'false') { $show_invite = false; } // Check if within dates of contest $start_date = strtotime(CONTEST_START_DATE); $close_date = strtotime(CONTEST_CLOSE_DATE); $now = strtotime(date("m/d/y")); if ($now >= $start_date && $now <= $close_date) { } else { $show_invite = false; } } if ($show_invite == false) { // Start Contest Closed // Contest Closed calls define_contestend.php $file_contestend = substr($define_page, 0, strpos($define_page, '.')); // strip extention $define_page_contest_end = $file_contestend.'end.php'; require_once($define_page_contest_end); echo '   <a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true">'.zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT).'</a>'; } else { // Contest NOT Closed // Retrieve Prize details $sql_query = "select p.products_id, p.products_image, p.products_price, 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)CONTEST_PRIZE_ID . "' and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' limit 1"; $contest_prize = $db->Execute($sql_query); if (!$contest_prize->RecordCount() > 0) { // Data base error display warning echo '<center><br/><table width="80%" border="0" cellpadding="3" cellspacing="3" bgcolor="#FFFF00" >'. '<tr> '. '<td align="center"><strong>ADMIN ERROR:</strong> The selected Prize Could Not Be Found.</td>'. '</tr>'. '</table></center>'; } if (isset($_GET['action']) && ($_GET['action'] == 'process')) { $error = false; $entry_email_address = zen_db_prepare_input($_POST['entry_email_address']); $entry_name = zen_db_prepare_input($_POST['entry_name']); $entry_valid = zen_db_prepare_input($_POST['entry_qualify_answer']); **echo $entry_email_address.'<br/>'.$entry_name.'<br/>'.$entry_valid;** if (empty($entry_name)) { $error = true; $messageStack->add('contest', ERROR_TO_NAME); } if (!zen_validate_email($entry_email_address)) { $error = true; $messageStack->add('contest', ERROR_TO_ADDRESS); } // Check if we have already entered $check_email_query = "select count(*) as total from " . TABLE_CONTEST . " where contestant_email = '" . $entry_email_address . "' AND contest_code = '" . CONTEST_CODE . "'"; $check_email = $db->Execute($check_email_query); if ($check_email->fields['total'] > 0) { $error = true; $messageStack->add('contest', TEXT_ALREADY_ENTERED); } // If this is a members only contest, check that address entered matchs the one held on the account if (CONTEST_ALLOW_CUSTOMERS == 'true' && CONTEST_ALLOW_GUESTS == 'false') { // $check_members_email_query = "select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . zen_db_input($entry_email_address) . "' and customers_id = '" . (int)$customer_id . "' AND contest_code = '" . CONTEST_CODE . "'"; $check_members_email_query = "select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . zen_db_input($entry_email_address) . "' and customers_id = '" . (int)$customer_id . "'"; $check_members_email = $db->Execute($check_members_email_query); if ($check_members_email->fields['total'] = 0) { $error = true; $messageStack->add('contest', ERROR_TO_MEMBERS_ADDRESS); } } $validated = "Y"; if (CONTEST_QUALIFY == 'true') { if (empty($entry_valid)) { $error = true; $messageStack->add('contest', ERROR_TO_VALID); } else { // Check if question was answered if (strtoupper($entry_valid{0}) == strtoupper(CONTEST_ANSWER)) { $validated = "Y"; } else { $validated = "N"; } } } if ($error == false && $show_invite == true) { $db->Execute("insert into " . TABLE_CONTEST . " (contestant_name, contestant_email, contestant_ip_address, date_entered, validated, contest_code) values ('" . zen_db_input($entry_name) . "', '" . zen_db_input($entry_email_address) . "', '" . $_SERVER['REMOTE_ADDR'] . "', now(), '" . zen_db_input($validated) . "', '" . zen_db_input(CONTEST_CODE) . "')"); $prossed_complete = 1; } } // end of Process echo zen_draw_form('contest', zen_href_link(FILENAME_CONTEST, 'action=process')); ?> <!-- bof tpl_contest_default.php --> <div class='centerColumn' id='contest'> <h1 id='contest-heading'><?php echo HEADING_TITLE; ?></h1> <div id='contest-content' class='content'> <?php if ($messageStack->size('contest') > 0) { echo $messageStack->output('contest'); } if (isset($_GET['action']) && ($_GET['action'] == 'winner')){ // Winners List Start // Contest Winner Page calls define_contestwinner.php $file_contestwinner = substr($define_page, 0, strpos($define_page, '.')); // strip extention $define_page_contest_winner = $file_contestwinner.'winner.php'; require_once($define_page_contest_winner); echo '<a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true">'.zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT).'</a>'; } else { // Winners List if (isset($_GET['action']) && ($_GET['action'] == 'rules')){ // Rules Start // Call define contest page (page that user can edit contest rules) require($define_page); echo '<a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true">'.zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT).'</a>'; } else { // Rules // User Successful entry if ($prossed_complete > 0){ echo TEXT_CONTEST_ENTRY_SUCCESSFUL; echo 'The Winner will be notified by emailed after '.CONTEST_CLOSE_DATE.'<br/>'; echo '<br/><a href="' . zen_href_link(FILENAME_DEFAULT) . '">' . zen_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; } else { ?> <!-- Display Prize --> <hr> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="infoNotice" width=75% align="left" valign="top"> <?php echo '<strong>Contest Starts: </strong>'.CONTEST_START_DATE.' 12:00am <strong>Ends: </strong>'.CONTEST_CLOSE_DATE.' 11:59pm<br/><br/>'; echo '<hr>'; echo 'The PRIZE is <b>'. $contest_prize->fields['products_name'].'</b><br/>' . $contest_prize->fields['products_description']; ?> </td> <td class="main" width=25% align="center" valign="top"> <?php // Display rules link echo '<a href="' . zen_href_link('contest&action=rules') . '">Click for Contest Rules</a><br/>'; // Display Winners link echo '<a href="' . zen_href_link('contest&action=winner') . '">Click for List of Winners</a>'; echo '<hr>'; echo zen_image(DIR_WS_IMAGES . $contest_prize->fields['products_image'], $contest_prize->fields['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2); echo '<br/>MSRP ' . ((zen_has_product_attributes_values((int)$contest_prize->fields['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$contest_prize->fields['products_id']); ?> </td> </tr> </table> <!-- End Prize --> <fieldset id="contestForm"> <legend><?php echo HEADING_FORM_TITLE; ?></legend> <div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div> <br class="clearBoth" /> <label class="inputLabel" for="contestname"><?php echo FORM_FIELD_ENTRY_NAME; ?></label> <?php echo zen_draw_input_field('entry_name', $name, ' size="40" id="contestname"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" /> <label class="inputLabel" for="email-address"><?php echo FORM_FIELD_ENTRY_EMAIL; ?></label> <?php echo zen_draw_input_field('entry_email_address', ($error ? $_POST['entry_email_address'] : $entry_email_address), ' size="40" id="email-address"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" /> <?php if (CONTEST_QUALIFY == "true") { echo FORM_FIELD_QUALIFING_QUESTION.'<br/>'; // Retrived from Data Base echo CONTEST_QUESTION; ?> <label class="inputLabel" for="entry_qualify_answer"><?php echo FORM_FIELD_QUALIFING_ANSWER; ?></label> <?php echo zen_draw_input_field('entry_qualify_answer', $entry_qualify_answer, ' size="1" id="entry_qualify_answer"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?> <br class="clearBoth" /> <?php } // End Qualify Question ?> </fieldset> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SUBMIT, BUTTON_SUBMIT_ALT); ?> </div> </form> <?php } // End Success } // End Rules } // End Winners List } // End Contest Closed echo '</div></div>'; ?>

Now once I do the following where do I go and see if I get the error for the contest, I notice from your screenshot the error showed up from the looks of it on the shopping cart . I tired to replicate the same error on the shopping cart, but nothing showed up

22 Aug 2009, 3:40 AM
#98
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

Okay so I looked realllllllll close and I show this at the top of the contest page.
I tried also to enter the contest again and I still get this error though at the top

Error: Your name must not be empty.
Error: Your e-mail address must be a valid e-mail address.

Now that I see it what is the next step, since the error is still showing up?

22 Aug 2009, 4:38 PM
#99
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Contest System [support thread]

That is what you should see.
The rest would be if you entered a name that would have shown under the ERROR FALSE

So without a name or email showing you have a mod or SEO loaded that is trapping the input that I can not test.

A list of mods might help.

Skip

23 Aug 2009, 4:22 PM
#100
divaboutiques avatar

divaboutiques

Zen Follower

Join Date:
Feb 2007
Location:
Worldwide Web
Posts:
191
Plugin Contributions:
0

Re: Contest System [support thread]

I have alot of modules added to the site that I use, hopefully one of these listed can help and see if they are conflicting with my contest module:

P.S. I didn't go through all the modules or add on's so I might have missed some that are not listed>

About us page
Add customer from admin
Admin login as customer
AskCost Automated Store Feed System API v1.0 for Zen Cart
Auction Lister Pro for Zen Cart
Better Together
Better Together Promotional Page
Captialize Sign-up Fields
Change product name to proper Case
Contest System
Credit card fraud detection
Cross Sell
Cross sell advanced
Cross-Sell Products
Easy Populate
Ebay Exporter
eBay Exporter Configuration
Editor - FCKeditor Plugin
Email Address Exporter
Enhanced Who's Online
Excrypted Master password
Export email addresse
FAQ module
Fast and Easy Checkout for Zencart
Gaeneric Conversion Tracking for Zencart
Google Analytics by andrew
How to checkout page
Improved Whos online
Links Manager
Master password
News and Article Manager & Optional Sideboxes
Recover Cart Sales
Reward Point Full Suite
Restructured Add Product Page for Admin
Reward Points
RSS Feed
Simple Google Analytics
Simple SEO URL
Sitewide Mark Up
Social Bookmarking
Telephone not required on signup
Testimonials Manager
Ty Package Tracker
USPS Auto-Fill Config
Wordpress on Zencart
Yahoo! Product Submit Feeder