Plugin development for contest

  • Posts: 128
  • Thank you received: 3
9 years 11 months ago #242335

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.5.0
-- PHP version -- : 5.3.24

I'm trying to develop a plugin that works off of the CRON task on the first of each month to go through entries in a table and pick a random winner from the previous month's entries. I'm not sure what's wrong with my code but something's not working. I've attached my plugin that I have so far. Any help would be appreciated. Thanks.

This attachment is hidden for guests.
Please log in or register to see it.

This message has an attachment file.
Please log in or register to see it.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 11 months ago #242367

Hi,

Do you have tried all the if conditions ?
For example, instead of "date('n')" shouldn't it be "date('j')" ?

Then you have an error, you have to replace "$winner = pickWinner();" by "$winner = $this->pickWinner();"

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum