Latest News: (loading..)
Sign in to follow this  
Followers 0
Benjjj6

Prize Draw Competition help

120 posts in this topic

Hi

 

Under Reports in "Prize Draw Entries" when I purchase an item within the period of the competition my account is not added to the list which shows accounts that can be added to the competition.

 

I have installed the entire contribution and there were no install problems, the only slight problem was that I dont have a right hand column on my site. However, the way I understood it was that customers can either:

 

1) automatically enter themselves via the box in the right hand column or

2) when they purchase an item they are added to a list and then the admin can add them into the competition

 

is this right?

 

maybe the contribution is functioning completely fine, and I have misunderstood. Although, I thought that the customers name should appear in Prize Draw Entries when they purchase an item, however it doesn't.

 

 

Could anyone help explain this to me? or what i may have done wrong.

 

thanks,

 

Ben :thumbsup:

Edited by Benjjj6

Share this post


Link to post
Share on other sites

The add customer function should work. To add customers to the competition who have purchased from you during the competition period, you need to go into the Admin Prize Draw Report screen and Press the Add Customers button. This then goes off and queries the order table for all customers who have purchased from you between the dates of the competition. It then checks if their email address is already entered into the competition and then displays those who haven't entered in a list. You then need to confirm this list, by pressing the Confirm button and they are added to the competition.

 

I checked this again today, when I recieved your mail, just to check the functionality. If this is not working for you. Check how you have the dates specified in the Configuration section. This start and end dates must be entered in US format MM-DD-YYYY. Also check that the test purchase you made is within the start & end dates specified for the competition. You must do the add customer bit before picking a winner and closing the competition.

 

Hope this helps

Share this post


Link to post
Share on other sites

Thanks for your reply Carl.

 

I'm afraid I still cant tell what could be wrong, the only slight problem is on the Prize Draw Entries report page it says "TEXT_DISPLAY_NUMBER_OF_REFERRALS" im not sure what this means?

 

I have entered the date in US format and I tried UK format as I changed my store to work with UK format for D.O.B etc. but still it doesnt bring up the list of customers who have placed an order in that period.

 

Is it possible to change the date format to dd/mm/yyyy what file should I edit? considering the rest of my store works in this way it may solve the problem.

 

thanks again,

 

Ben

Edited by Benjjj6

Share this post


Link to post
Share on other sites

update: I changed the date format from mm/dd/yyyy to dd/mm/yyyy in admin>stats_prize_draw.php but unfortunately it still doesnt work.

 

do you have any idea what may be causing the problem?

Share this post


Link to post
Share on other sites

Ben,

 

sorry you are having problems.

 

Firstly the 'TEXT_DISPLAY_NUMBER_OF_REFERRAL' error. Looks like I missed this entry out out of the language file.

 

Add into "admin\includes\languages\english.php" the following entry.

 

define('TEXT_DISPLAY_NUMBER_OF_REFERRALS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> sources)');

 

This should resolve that issue.

 

I also have Paypal IPN, so your problem isn't due to that. I think I may have worked out the problem though.

 

Have you changed your Order Statuses? The SQL code looks for order_status = 5. This in a standard osC install is the value of given to Completed orders.

 

If you have changed your order statuses, your Completed status may not be 5. Another user had a similar issue, where his Completed Status has a value of 21 in his store.

 

Can you check this. If this is the issue then change the value in the SQL statement at line 103 in the admin\stat_prize_draw.php

 

Hope this is it.

 

Carl

Share this post


Link to post
Share on other sites

Hey Carl,

 

Thankyou soooo much for your response, you've been so helpful. Thankfully everything now works, I implemented the code change you recommened, changed the date back to mm/dd/yyyy and thought about what you said about the order status.

 

I realised that when I was placing test orders i wasnt actually going through with the full order process and completing the payment via PayPal, because of this the order status stayed at 'Pending' instead of changing to 'Preparing [PayPal IPN]' which has order_status=5 when I manually changed the status of the test order to 'Preparing [PayPal IPN]' the customer was added to the list and I was able to add them to the competition.

 

This is actually a really good feature, only the customers I have received payment from are added to the competition, and those that don't pay are not.

 

Thankyou! :D

 

It all works great, this is a great contribution and an easy install,

 

Thanks again,

 

Ben

Share this post


Link to post
Share on other sites

Hi Carl,

 

I have installed and altered the "Competitions" page under configuration in osCommerce admin and the Competition box on the Left isn’t being displayed on the home page. Have a missed out on something here? Also from the screen shots you provided, "Competition Setup Screen" where can I locate this?

 

I would appreciate your help. Thanks!

Share this post


Link to post
Share on other sites

3 Things...

 

When I set Show competition invitation To true I get the top and lef hand colum of Catalog showing but the rest is blank..

 

Shouldn't there be a box showing on the left...

 

and last but not least where is the Setup New Competition feature.....

Share this post


Link to post
Share on other sites
3 Things...

 

When I set Show competition invitation To true I get the top and lef hand colum of Catalog showing but the rest is blank..

 

Shouldn't there be a box showing on the left...

 

and last but not least where is the Setup New Competition feature.....

 

Hi, im having some problems too, wherew do you insert the install-configuration.php into it, please advice

 

To create the new contest table and new configuration options for Admin

 

 

10) run install-configuration.php to create new contest table and set up the configuration data.

 

 

11) Once run, DELETE install-configuration.php for security reasons, e.g. so that it cannot be executed by a user

Share this post


Link to post
Share on other sites
Hi, im having some problems too, wherew do you insert the install-configuration.php into it, please advice

 

To create the new contest table and new configuration options for Admin

10) run install-configuration.php to create new contest table and set up the configuration data.

11) Once run, DELETE install-configuration.php for security reasons, e.g. so that it cannot be executed by a user

 

Hi, i'm have install the configuration.php and install ok, but at admin-reports-prize draw entries right, it does not show the page of it, what im suppose to do, please help me...

 

advance thanks you

Alson

Share this post


Link to post
Share on other sites
Hi, i'm have install the configuration.php and install ok, but at admin-reports-prize draw entries right, it does not show the page of it, what im suppose to do, please help me...

 

advance thanks you

Alson

 

 

How come the competition box not shown in the website??

please advice

 

thanks you

Share this post


Link to post
Share on other sites
How come the competition box not shown in the website??

please advice

 

thanks you

 

Hi, i'm try to add customer, but somehow did not show my customer name, so what are the solutions??please

Share this post


Link to post
Share on other sites
Hi, i'm try to add customer, but somehow did not show my customer name, so what are the solutions??please

 

 

did you add the style sheet -- then it show show.. I have it working on my site.

check my profile for site info

noppie

Share this post


Link to post
Share on other sites

When i've insterted my name and email and click on next, i get the following error:

 

1054 - Unknown column 'competition_code' in 'where clause'

select count(*) as total from customers where customers_email_address = '' and customers_id = '16' AND competition_code = 'for real'

[TEP STOP]

 

Edit: I only have that problem when i set the function 'Allow guest to enter the competition' to 'false'. When i set it to 'true' everything works fine :-s

Edited by ident

Share this post


Link to post
Share on other sites

Hi,

 

Sorry if this is the wrong place, but this is the only decent thread I can find about this contribution.

 

Anyway...

 

I've installed the files all seems to be hunky dory as far as that goes, my problem is when I try to run the Install script for setting up the database. (install-configuration-v1.2.php)Ive tried running this from both catalog and admin but with no sucess.

 

I get the error message "1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-xxx-my database name-xxx like 'contest'' at line 1

 

show tables from xxx-my database name-xxx like 'contest'

 

[TEP STOP]"

 

I've checked these forums and tried the modification suggested to the split_page_results.php page, but this has had no effect, still the same error.

 

I've tried going through all the statements one by one and adding them, with a very small amount of success (the configuration page showed up but with no entries! I'm sure I missed something by my SQL knowledge is sorely lacking..

 

So does anyone have any ideas?

 

Cheers

 

Mat

Share this post


Link to post
Share on other sites

OK,

 

Answering my own question really, but might be of use.

 

I tried all sorts of things to get the PHP Script to work and update my database, no luck.

 

So I've worked my way through the SQL in the page and managed to figure it out and run the queries manually. (I don't really know much about SQL, so was quite impressed with myself, I'm sure many people on here would have thought it was simple enough!)

 

I've added what I worked out to the contribution so anyone else who has the same problem has a chance to get the DB up and running.

 

Mat

Share this post


Link to post
Share on other sites

Hi great contri,

 

but still two problems.

 

when somebody plays for the second time i get this error:

 

1062 - Duplicate entry '*********@*******.nl-0001' for key 2

 

insert into contest (contestant_name, contestant_email, date_entered, validated, competition_code) values ('****', '*********@*******.nl', now(), 'N', '0001')

 

[TEP STOP]

 

and the second one is when i disable guest and try's with an unknown e-mailadress, i get this one:

1054 - Unknown column 'competition_code' in 'where clause'

 

select count(*) as total from customers where customers_email_address = '*********@*******.nl' and customers_id = '14' AND competition_code = '0001'

 

[TEP STOP]

 

I hope that somebody has solved his.

 

kind regards,

Jan

Share this post


Link to post
Share on other sites

Hi,

 

Trying to install the file "install-configuration-v1.2.php", but I get the following error:

New `Contest` Database Table Successfully Created. ver 1.1 schema.

Configuration Group `Competition` already existsCompetition `Configuration_Group ID` = 888002

1064 - You have an error in your SQL syntax near '; ' at line 1

 

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 a qualifing question to enter competition', 'COMPETITION_QUALIFY', 'true', 'Displays the qualifing question and only allows entry upon its completion', '888002', 8, '2007-04-06 22:01:43', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

 

[TEP STOP]

 

 

Now, I am not a programmer & I don't know PHP, I just muck my way through the install directions & pray to the osc gods! Can someone please tell my exactly HOW to fix this?! Thanx!

Share this post


Link to post
Share on other sites
<chirp><chirp>

 

hell-oooooooooo?

 

Nobody has an answer? :(

 

Why not use the manual SQL Scripts I uploaded?

I couldn't get the automatic ones to work.

 

Mat

Share this post


Link to post
Share on other sites

I tried that, & got an error at this stage:

Run This Script

 

 

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 a qualifing question to enter competition', 'COMPETITION_QUALIFY', 'true', 'Displays the qualifing question and only allows entry upon its completion', '" . $categoryid['configuration_group_id'] . "', 8, '2007-04-06 22:01:43', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

 

This is what I got:

MySQL said:

 

#1064 - You have an error in your SQL syntax near 'configuration_group_id'] . "', 8, '2007-04-06 22:01:43', '0000-00-00 00:00:00', ' at line 1

Share this post


Link to post
Share on other sites
I tried that, & got an error at this stage:

 

 

This is what I got:

 

Try This :-

 

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 a qualifing question to enter competition', 'COMPETITION_QUALIFY', 'true', 'Displays the qualifing question and only allows entry upon its completion', XXXXX, 8, '2007-04-06 22:01:43', '0000-00-00 00:00:00', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

 

Remember to replace the XXXXX with the number you got from the previous query:-

 

SELECT `configuration_group_id` FROM `configuration_group` WHERE `configuration_group_title` = 'Competitions';

 

Mat

Share this post


Link to post
Share on other sites

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.

Edited by Between the Sticks USA

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0