Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Contest 1.0 Support Thread


jrwrestling

Recommended Posts

Ok.. I got everything installed, but Ive got a problem with the admin side of things.. prior to adding the contest products.

 

In:

 

catalog/admin/contest.php

 

I see this TABLE_HEADING_TOOLS Rather than the header, and also have no option to add products/contests at all. Just a blank list with no options to add, remove, edit, etc.

Link to comment
Share on other sites

  • Replies 101
  • Created
  • Last Reply

For the 'TABLE_HEADING_TOOLS' define add the following to

 

catalog/admin/includes/languages/english/contest.php

 

define('TABLE_HEADING_TOOLS', '<font color="0000FF">Tools</font>');

 

The contest box does not show up until you set a prize in Admin.

You should have a Promo Prize Giveaway link under your Admin>Catalog menu. .. which will take you to admin/contest.php

 

From there click Related Products button to take you to admin/prizes.php ... where you can add a prize item and it's details etc.

 

Click Add a Product button to add a prize item.

 

Once you have the date contest expiry date set a Box ini storefront should appear with the Contest Details and Prize etc.

 

When the customer clicks on the link .... ie. Sign up Today for a chance to Win a ... they are taken to the catalog /enter_contest.php ... where they can enter their Name / Location / Email Address

 

If you are not getting the box to show after adding a prize item ... double check your installation. Mainly that catalog/includes/boxes/prizes.php is there and that you added the code to catalog/includes/column_left.php for the box display.

Link to comment
Share on other sites

The contest box does not show up until you set a prize in Admin.

You should have a Promo Prize Giveaway link under your Admin>Catalog menu. .. which will take you to admin/contest.php

 

I just PM'ed you about this also--I go to admin catalog-->promo prize giveaways and there is no option there to do anything at all. Any ideas what I am not seeing? Thanks in advance!

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

Also, I do not use the information box and can not with the layout on the shop I installed this on, so where can I add this code or a modified version of it to get the contest to display on the front page?

if (CONTEST_SHOW == 'true') {
 $info_box_contents[] = array('text' => tep_draw_separator());
 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CONTEST) . '">' . BOX_INFORMATION_CONTEST . '</a>');
 }

I did add the code to column left but still nothing shows up. If I type mydomain.com/contest.php then I see the page to enter the shop and I obviously need to edit the descrip in the pop-up window. And the enter_contest page seems fine too. I just need the link to be on the main page and also how will the customer see what product is being offered? It doesnt show on either of those pages.

 

I was able to add a product to the contest by typing the url to admin/prizes.php but there is no link on admin/contest.php, I suppose I can add a link on that page to prizes.php if that is what is needed.

I hope to get this great contribution working, thanks! :thumbsup:

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

I see your issue, but In mine I can register and the registration shows in admin, but still I see no way for the customer to see the prize they are applying for--hopefully the contributor will wake up soon and help us out--I think this will be a great contribution once it works right

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

Yeah, I really don't know about seeing the prize beforehand.. That could easily be added to contests.php though..

 

If I can get the contestants added- Ill begin working on more advanced modifications and release them

Link to comment
Share on other sites

did you get the contest link to be visible in the left column or anywhere on the main page like the install directions say? I will just add a link on my content area if I have to, no biggie. I would like it to work like it is designed to though with its own box. Hope you get yours working, mine seems to be functioning fine so far, I am still testing and adjusting text, etc...

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

jrwrestling .. you almost have it. You are just missing the prize item box to show on you column left. Thie prize item is also not showing up on your enter_contest.php page ... which means you are missing the file prizes.php that goes in path catalog/includes/boxes/prizes.php

 

Check to see if you have prizes.php there than you should be set.

Link to comment
Share on other sites

rabbitseffort .. if you have some kind of template system or whatever reason you do not have infoboxes than you can use this code or similar for a link to the enter_contest.php

 

Example for a link to the enter contest page:

 

<?php if (CONTEST_SHOW == 'true') {

echo '<a href="' . tep_href_link(FILENAME_ENTER_CONTEST, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTEST . '</a>'); } ?>

 

Example for a link to the contest participants page:

 

<?php if (CONTEST_SHOW == 'true') {

echo '<a href="' . tep_href_link(FILENAME_CONTEST, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTEST . '</a>'); } ?>

 

The same info that is diplayed in the infobox is used to show the Prize Item on the enter contest page and it's details. So as long as you have a prize set ... they should be able to still see the item when they go to the enter contest page.

Link to comment
Share on other sites

Hi Don--good to see you here--I PM'ed you about this again--maybe you can help me to figure out whay the product doesnt show up on contest.php along with the other bugs---and I am not using a template, just a very heavily modified osc store. Thanx again

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

jrwrestling ... just as a test try doing this:

 

 

Where you added this:

 

------------------------------------

/catalog/includes/column_left.php

------------------------------------

 

// BEGIN Contest for OSC v1.0

if (CONTEST_SHOW == 'true') {

if ((basename($PHP_SELF) == FILENAME_ENTER_CONTEST) || (basename($PHP_SELF) == FILENAME_CONTEST)) {

echo '';

} else {

require(DIR_WS_BOXES . 'prizes.php');

}

}

// END Contest for OSC v1.0

 

 

Paste this instead just to see if the box will show up.

 

// BEGIN Contest for OSC v1.0

//if (CONTEST_SHOW == 'true') {

//if ((basename($PHP_SELF) == FILENAME_ENTER_CONTEST) || (basename($PHP_SELF) == FILENAME_CONTEST)) {

//echo '';

//} else {

require(DIR_WS_BOXES . 'prizes.php');

//}

//}

// END Contest for OSC v1.0

 

 

then we will at least know if the box is being recognized or not.

Link to comment
Share on other sites

ok, the box will not show on the mainpage and the product will not show up on the enter contest page until an expiration date is set on the prize you are set to giveaway, so this is a bug maybe? maybe not--I didnt set an expiration date on my test and so it didnt show up, now with an expiration date set it shows up on the enter contest page and on the main page.

 

Getting closer!

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

also, I noticed this needs to be added to catalog/includes/languages/english.php:

 

define('BOX_HEADING_CONTEST', 'Enter To Win !!!');

 

of course change the text to say whatever you want your heading to say--I will make an image to use there myself

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

I'm having problems with SQL

 

# --------------------------------------------------------
#
#
# Table structure for table `configuration`
#

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Show Prize Giveaways', 'CONTEST_SHOW', 'false', 'Show Prize Giveaways in the store. [ True / False ]', 50, 1, NULL, now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Display Contestant Entries', 'CONTEST_MAX_DISPLAY_ENTRIES', '6', 'Maximum number of contest entries to display in prize contestants page.', 50, 2, NULL, now(), NULL, NULL);
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Number of Contest Page Links', 'CONTEST_MAX_DISPLAY_PAGE_LINKS', '5', 'Number of \'number\' links use for page-sets on prize contestants page.', 50, 3, NULL, now(), NULL, NULL);
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Min. Length of Contestants Name \'Full Name\'', 'ENTRANTS_NAME_MIN_LENGTH', '4', 'Minimum length of \'Full Name\' on enter contest page.', 50, 4, NULL, now(), NULL, NULL);
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Min. Length of Contestants \'Comments\'', 'CONTEST_TEXT_MIN_LENGTH', '25', 'Minimum length of \'Comments\' text on enter contest page.', 50, 5, NULL, now(), NULL, NULL);
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Location of Prev/Next Navigation Bar (1-top, 2-bottom, 3-both)', 'CONTEST_PREV_NEXT_BAR_LOCATION', '3', 'Sets the location of the Prev/Next Navigation Bar on the Prize Contestants page.<br> [ 1-top<br> 2-bottom<br> 3-both ]', 50, 6, NULL, now(), NULL, NULL);


# --------------------------------------------------------

#
# Table structure for table `configuration_group`
#

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('50', 'Promo Prize Giveaways', 'Enter settings for promotional Prize Contests.', '50', '1');

 

i already have number 50 in configuration ... so if i change it here in sql insert (i.e. 5678), must i change to the other number (5678) somewhere else too?

Link to comment
Share on other sites

umm .. when adding last piece of install code in general.php .. i receieve error in admin

 

Fatal error: Cannot redeclare tep_set_entry_status() (previously declared in /home/web/domain.com/www/admin/includes/functions/general.php:38) in /home/web/domain.com/www/admin/includes/functions/general.php on line 1640

 

untill here everything was ok ..

Link to comment
Share on other sites

gregy,

 

That error just means the congiguration group of 50 is already taken.

 

Yes just change all of the numbers 50 to something else ie. 5678

until you find a number where you get no SQL Errors.

 

 

for your Fatal error: Cannot redeclare tep_set_entry_status() (previously declared

 

Just don't put this piece in general.php ... as it is complaining that you already have that piece of code. There should only be one instance of the code.

 

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;

}

}

Link to comment
Share on other sites

thanx for reply .. everything works .. now let's get to some questions :)

 

- admin/prizes.php .. this file should be called directly with url .. it doesn't have any link in any admin infobox !?

- is it possible to add a link into product_info.php to take customer directly to contest for that product .. if available?

- on catalog/enter_contest.php if visitor is already a member .. is there any easier way to login or must he go to login page?

- when already logged, when i click on submit (no image for IMAGE_BUTTON_SUBMIT?) it takes me to create_account.php? .. but submittion is logged into database?

 

thanx

Link to comment
Share on other sites

gregy,

 

all of your ideas are good .. give it time lol ;-)

 

there is a button in admin contest.php called 'ADD A PRIZE' that rabbitseffort created. Get the latest version Contest v1.02 (old version it was 'Add a product' or something like that.

 

For IMAGE_BUTTON_SUBMIT you can change that in the code to whatever button you want to use ... and add the button to admin/includes/languges/english/buttons/

 

It is possible to put a link in the produc info page for prize items. Just noone has had time to do it yet.

 

To change the redirect to create account .. for now you can just change this line to whatever you want ... until proper logic is added to the contrib.

 

FIND:

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, tep_get_all_get_params(array('action'))));

 

Change FILENAME_CREATE_ACCOUNT to whatever file path you want like FILENAME_DEFAULT or something.

Link to comment
Share on other sites

Ill be battling my way through this install in the next couple days. Ill point out things I notice that are incorrect as I go, and hopefully you guys can help me out.

 

Install directions dont include all of the files to upload(missing some image files)

 

As already stated, nothing comes up on the admin>contest.php page(no buttons or links to prizes.php). Some help on this one would be greatly appreciated.

 

in admin>contest.php- "TEXT_INFO_CONTEST_LANGUAGES_NAME" should be "TEXT_INFO_CONTESTANT_LANGUAGES_NAME"

Link to comment
Share on other sites

on catalog/contest.php page-

 

next to "Displaying 1 to 5 (of 5 prize contestant entries)" im getting an error. I believe its where the navigation bars should be(since it's at the top and bottom of this page)-

Warning: Division by zero in /home/mysite/public_html/catalog/includes/classes/split_page_results.php on line 86

Warning: Division by zero in /home/mysite/public_html/catalog/includes/classes/split_page_results.php on line 89

 

My split page results works fine for the searches on my site, so ill assume it's some coding in contest.php thats causing it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...