Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Contest 1.0 Support Thread


jrwrestling

Recommended Posts

Preseren .. make sure you have this in your admin/includes/functions/general.php

 

// BEGIN Contest for OSC v1.0

function tep_get_contestants_name($entry_id) {

 

$contest_query = tep_db_query("select contestants_name from " . TABLE_CONTEST . " where entry_id = '" . (int)$entry_id . "'");

$contest = tep_db_fetch_array($contest_query);

 

return $contest['contestants_name'];

}

 

function tep_set_entry_status($entry_id, $status) {

if ($status == '1') {

return tep_db_query("update " . TABLE_CONTEST . " set entry_status = '1', last_modified = now() where entry_id = '" . (int)$entry_id . "'");

} elseif ($status == '0') {

return tep_db_query("update " . TABLE_CONTEST . " set entry_status = '0', last_modified = now() where entry_id = '" . (int)$entry_id . "'");

} else {

return -1;

}

}

// END Contest for OSC v1.0

 

 

I may have forgot to add it to the instructions.

Link to comment
Share on other sites

  • Replies 101
  • Created
  • Last Reply

Tac420oma ... are you using some kind of template for your store?

 

If it is a template ... I am not able to help you. I am not familiar with the template mods and avoid them beacuse of hassles.

 

If your using standard os files and have no errors or corrupt files ... the page should load.

 

I have never seen a page come up blank with no kind of error like .. Page Cannot Be Found.

Link to comment
Share on other sites

Insomniac2

 

I added a prize and in my admin are the TOOLS toolbar and OPTIONS is BLUE! Also Displaying Displaying 0 to 0 (of 0 prize contestant entries) but have a prize added...

 

I am just a beginner at php.... It is a Monster Template but I am pretty sure I put something in a wrong spot... On your readme file in the zip... some just say ADD and dont tell you exactly where to put them, and I might have screwed up with that...

 

I really really need this up and running, its the most important thing on my site and need this up ASAP!!! Please help!!!

Link to comment
Share on other sites

Insomniac,

 

Can you give us an idea of processes that this contrib offers for at prize end date:

 

1. selecting and posting a winner in admin at prize expire date

2. clearing out database at prize expire date

 

Are these functions part of the module or not? If not, let's see if we can add these functions in the near future.

Link to comment
Share on other sites

  • 3 weeks later...

Hey guys

 

Got alittle problem with this contrib!!!

 

Right here it goes, First thing is that after i had a competition in admin is doesnt display the contest in the left coloum bar. Unless i take out the if statment and just use <?php require (DIR_WS_BOXES . 'prizes.php'); ?>?

 

Next question is when you call the contest script in a browser it redirects you back to our homepage but using a ssl connection?

 

I'm running a heavily modded ver of oscommerce, so I dont know if another contrib is interfering? but i cant see how?

 

Help me please!!!!!

 

TY in advance :thumbsup:

Link to comment
Share on other sites

I've sort of figured out that it seems that the contest status if statement is not working, when I remove the

 

if (CONTEST_SHOW == 'false') {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'SSL'));
 }

 

 

Out of the contrib files, the pages load but say that there are no current contests active? Does anybody know a workaround for this error?

 

Hey guys

 

Got alittle problem with this contrib!!!

 

Right here it goes, First thing is that after i had a competition in admin is doesnt display the contest in the left coloum bar. Unless i take out the if statment and just use <?php require (DIR_WS_BOXES . 'prizes.php'); ?>?

 

Next question is when you call the contest script in a browser it redirects you back to our homepage but using a ssl connection?

 

I'm running a heavily modded ver of oscommerce, so I dont know if another contrib is interfering? but i cant see how?

 

Help me please!!!!!

 

TY in advance :thumbsup:

Link to comment
Share on other sites

also you have a piece of code missing from a lang file.

 

Open enter_contest.php in the language folder and add

define('ENTRY_EMAIL_ADDRESS_CONFIRM', 'Confirm Address:');

 

under

define('ENTRY_EMAIL', 'E-Mail Address:');

Link to comment
Share on other sites

Still needing assistance!!!

 

But while im waiting, I thought id post a optional upgrade for this contrib. This mod will change the enter_contest.php file to check to see if the user is loged in. If they are logged in it will allow the user to enter his details, if they are not it will display

 

"Our site has detected that you are not loged in. You have to be a regestered member to enter our monthly competition, so if you already have an account with us Please Login . If not Click here to create an account.".

 

Il add the mod to the contrib thread.

 

Thanks guys

Link to comment
Share on other sites

Hey guys

 

Got alittle problem with this contrib!!!

 

Right here it goes, First thing is that after i had a competition in admin is doesnt display the contest in the left coloum bar. Unless i take out the if statment and just use <?php require (DIR_WS_BOXES . 'prizes.php'); ?>?

 

Next question is when you call the contest script in a browser it redirects you back to our homepage but using a ssl connection?

 

I'm running a heavily modded ver of oscommerce, so I dont know if another contrib is interfering? but i cant see how?

 

Help me please!!!!!

 

TY in advance :thumbsup:

 

For your question about the https page...

In the form tag in enter_contest.php change it from this:

 

<?php echo tep_draw_form

('enter_contest', tep_href_link(FILENAME_ENTER_CONTEST, 'action=process', 'SSL'), 'post', 'onSubmit="return checkForm();"'); ?>

To this:

 

<?php echo tep_draw_form

('enter_contest', tep_href_link(FILENAME_ENTER_CONTEST, 'action=process', 'NONSSL'), 'post', 'onSubmit="return checkForm();"'); ?>

 

That should get rid of your ssl page. If not, just work with that form area. Sometimes it's good to use ssl when transferring any data with your client's info, but it's not 100% necessary.

Link to comment
Share on other sites

Thanks but I knew that lol!!

 

What I need to know is why the author has put in the

if (CONTEST_SHOW == 'false') {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'SSL'));
 }

 

And then not tied it will anything in the admin section??? And there are about 100 errors with this mod!!! Me thinks the guy that wrote this needs to lay off the smoke lol.

 

Im going to take a look later tomorrow and probably rewrite this mod and add some needed features. Thanks for the help anyway allwebnow.

 

 

 

For your question about the https page...

In the form tag in enter_contest.php change it from this:

 

<?php echo tep_draw_form

('enter_contest', tep_href_link(FILENAME_ENTER_CONTEST, 'action=process', 'SSL'), 'post', 'onSubmit="return checkForm();"'); ?>

To this:

 

<?php echo tep_draw_form

('enter_contest', tep_href_link(FILENAME_ENTER_CONTEST, 'action=process', 'NONSSL'), 'post', 'onSubmit="return checkForm();"'); ?>

 

That should get rid of your ssl page. If not, just work with that form area. Sometimes it's good to use ssl when transferring any data with your client's info, but it's not 100% necessary.

Link to comment
Share on other sites

Right im going to rewrite this mod, if the author has any objections PM me here.

 

Heres a list of things to do:

  • Actualy give the admin an option to have a question or questionaire for the competition or contest.
  • Tidy up lang files and maybe make this contrib multi lang??? (might need some help with the translation).
  • Get rid of the stupid "you are already a member and you dont need to enter" lol.
  • Give the admin the option to set more that one contest at once?.
  • If registered users name AND email addy are auto added.
  • Winning entry automaticly seleted at random and sent a email letting them know they have won.

If anybody wants anything else added let me know and il add it but be quick because i need this out of the way by the end of the week.

Link to comment
Share on other sites

How do I fix the Division by Zero error

 

Hey dawn

 

Its because you have enabled error display in your php settings?

 

you could edit your php.ini file or you could add "php_flag display_error off" to a .htaccess file and dump it in your catalog folder.

 

This will work for now and i am looking into this .

 

Not done a great lot with this mod at the mo :( ive added a few missing text links, taken out the registed members are already entered part and replaced it with users have to register to enter. Also added a confirmation page and a few other things. if you wana check out how far im at, visit my site @

Link to comment
Share on other sites

  • 1 month later...

Nice work on this contribution guys.

 

I was wondering thou...

 

we spend all this time capturing and signing people up for a prize giveaway and have their personal email addresses to contact them... if the user doesnt sign up for an account we dont really have a way of keeping the relationship going by sending them monthly newsletters to notify them of new product... HUGE loss in return revenue there.

 

There should also be an email that is sent to the LOSERS of the contest to offer them a 10-15% discount on their next purchase just for trying.

 

With that little golden nugget of an email address... we need to keep them coming back to the site with more offers.

 

Thoughts?

 

~Roq

 

;)

Link to comment
Share on other sites

I pretty much gave up on this contribution especially since the original author has given up on it. Too many errors and not worth the hassle.

 

You can find this new one here which works great!

 

http://www.oscommerce.com/community/contributions,5107

 

Maybe after installing it some of the users can improve upon it. It works straight out from the box.

 

Note that in competition.php under /includes/boxes/ has one error in it.

 

Line 53 should read: new infoBoxHeading($info_box_contents, false, false);

Link to comment
Share on other sites

  • 1 month later...
I pretty much gave up on this contribution especially since the original author has given up on it. Too many errors and not worth the hassle.

 

You can find this new one here which works great!

 

http://www.oscommerce.com/community/contributions,5107

 

Maybe after installing it some of the users can improve upon it. It works straight out from the box.

 

Note that in competition.php under /includes/boxes/ has one error in it.

 

Line 53 should read: new infoBoxHeading($info_box_contents, false, false);

 

Hello

 

Do you have a URL for a site where this is working ?

 

The URL below given by the author doesn't show this mode now

 

http://www.theuniquegiftemporium.co.uk

Link to comment
Share on other sites

Just released an Update Package for Contest v1.02 in the contributions section.

 

 

Hello Insomniac2

 

I have this contribution installed and nearly working

though haven't seen a site where it works properly.

 

Everything in the admin works fine for me.

In the catalog I get the info box and

the enter_contest.php loads properly.

However when you type in the name and E mail and

click PROCESS, the form simply reloads withour any

error message.(in the server )

 

It looks like the java script fails to do the form check

and output the result properly

 

Could you please take a look at http://affiliatesexcel.com

and give me some idea what to do ?

 

Shall appreciate your help to get this working

Cheers

Shred

Link to comment
Share on other sites

  • 3 months later...

any news about this contribution?

i installed the last version of it with the last upgrade, and i have a question:

 

if all registered member are entitled already in the contest, why there aren't their name in the Contestant Entries List ?

Link to comment
Share on other sites

  • 1 month later...

I have just neated the contrib up slightly with a tiny mod:

 

add this to your stylesheet.css

 

/*added for contest mod:*/
TD.mediumText {
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
}

 

and in catalog/contest.php find:

 

<td><?php echo TEXT_RESULT_PAGE . ' ' . $contest_split->display_links(CONTEST_MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></td>

 

there are two line of that and replace it with:

 

<td class="mediumText"><?php echo TEXT_RESULT_PAGE . ' ' . $contest_split->display_links(CONTEST_MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></td>

 

It just neatens up the Result pages text.

 

I plan to mod the code and updating it abit... but thats just a plan heh :)

Link to comment
Share on other sites

  • 3 months later...
I have just neated the contrib up slightly with a tiny mod:

 

add this to your stylesheet.css

 

/*added for contest mod:*/
TD.mediumText {
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
}

 

and in catalog/contest.php find:

 

<td><?php echo TEXT_RESULT_PAGE . ' ' . $contest_split->display_links(CONTEST_MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></td>

 

there are two line of that and replace it with:

 

<td class="mediumText"><?php echo TEXT_RESULT_PAGE . ' ' . $contest_split->display_links(CONTEST_MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></td>

 

It just neatens up the Result pages text.

 

I plan to mod the code and updating it abit... but thats just a plan heh :)

Can you please post the URL of your site where it is working ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...