msweehoo Posted June 19, 2003 Share Posted June 19, 2003 Hello everyone, I just reloaded my site with one of the newer snapshots. Then I loaded the coupon & voucher contribution. I did make a few modifications to get it going but now I'm stuck. In the coupon admin when I go to add a coupon I get an error at the "start date" Fatal error: Call to undefined function: tep_draw_date_selector() in /var/www/html/catalog/admin/coupon_admin.php on line 709 I've only just started doing this stuff so I'm completely lost. Any ideas? Thanks! Quote Link to comment Share on other sites More sharing options...
mickeymouse Posted June 19, 2003 Share Posted June 19, 2003 You can check with Ian on this but to the best of my knowledge this contrib isn't compatible with snapshots newer than 5/19 Check this thread: http://www.oscommerce.com/forums/viewtopic.php...der=asc&start=0 Greg Quote I only do what my Rice Krispies tell me to do! Link to comment Share on other sites More sharing options...
msweehoo Posted June 19, 2003 Author Share Posted June 19, 2003 Thanks! I didn't see that one when I searched for that error. I guess I'll have to take it out of there until something else comes along. Thanks again! :D Quote Link to comment Share on other sites More sharing options...
Guest Posted December 6, 2003 Share Posted December 6, 2003 Hello, I am new to this and just installed this. Got the same error - has anyone found a fix for this? I have searched the forums and found only this thread. Thanks a lot. Quote Link to comment Share on other sites More sharing options...
mujina Posted October 22, 2004 Share Posted October 22, 2004 I have the same problem. Did someone solve this problem? In the admin panel, when I try to edit a coupon there"s this fatal error : Fatal error: Call to undefined function: tep_draw_date_selector() in c:\program files\easyphp1-7\www\catalog\admin\coupon_admin.php on line 709 Can anyone help us? thanks a lot Quote OSC2.2 Link to comment Share on other sites More sharing options...
mujina Posted October 22, 2004 Share Posted October 22, 2004 Here's the solution Admin file ------------- In coupon_admin.php paste at the top : // Output a day/month/year dropdown selector function tep_draw_date_selector($prefix, $date='') { $month_array = array(); $month_array[1] =_JANUARY; $month_array[2] =_FEBRUARY; $month_array[3] =_MARCH; $month_array[4] =_APRIL; $month_array[5] =_MAY; $month_array[6] =_JUNE; $month_array[7] =_JULY; $month_array[8] =_AUGUST; $month_array[9] =_SEPTEMBER; $month_array[10] =_OCTOBER; $month_array[11] =_NOVEMBER; $month_array[12] =_DECEMBER; $usedate = getdate($date); $day = $usedate['mday']; $month = $usedate['mon']; $year = $usedate['year']; $date_selector = '<select name="'. $prefix .'_day">'; for ($i=1;$i<32;$i++){ $date_selector .= '<option value="' . $i . '"'; if ($i==$day) $date_selector .= 'selected'; $date_selector .= '>' . $i . '</option>'; } $date_selector .= '</select>'; $date_selector .= '<select name="'. $prefix .'_month">'; for ($i=1;$i<13;$i++){ $date_selector .= '<option value="' . $i . '"'; if ($i==$month) $date_selector .= 'selected'; $date_selector .= '>' . $month_array[$i] . '</option>'; } $date_selector .= '</select>'; $date_selector .= '<select name="'. $prefix .'_year">'; for ($i=2001;$i<2019;$i++){ $date_selector .= '<option value="' . $i . '"'; if ($i==$year) $date_selector .= 'selected'; $date_selector .= '>' . $i . '</option>'; } $date_selector .= '</select>'; return $date_selector; } Quote OSC2.2 Link to comment Share on other sites More sharing options...
OsCStyles Posted February 17, 2006 Share Posted February 17, 2006 Here's the solution Admin file ------------- In coupon_admin.php paste at the top : // Output a day/month/year dropdown selector function tep_draw_date_selector($prefix, $date='') { $month_array = array(); $month_array[1] =_JANUARY; $month_array[2] =_FEBRUARY; $month_array[3] =_MARCH; $month_array[4] =_APRIL; $month_array[5] =_MAY; $month_array[6] =_JUNE; $month_array[7] =_JULY; $month_array[8] =_AUGUST; $month_array[9] =_SEPTEMBER; $month_array[10] =_OCTOBER; $month_array[11] =_NOVEMBER; $month_array[12] =_DECEMBER; $usedate = getdate($date); $day = $usedate['mday']; $month = $usedate['mon']; $year = $usedate['year']; $date_selector = '<select name="'. $prefix .'_day">'; for ($i=1;$i<32;$i++){ $date_selector .= '<option value="' . $i . '"'; if ($i==$day) $date_selector .= 'selected'; $date_selector .= '>' . $i . '</option>'; } $date_selector .= '</select>'; $date_selector .= '<select name="'. $prefix .'_month">'; for ($i=1;$i<13;$i++){ $date_selector .= '<option value="' . $i . '"'; if ($i==$month) $date_selector .= 'selected'; $date_selector .= '>' . $month_array[$i] . '</option>'; } $date_selector .= '</select>'; $date_selector .= '<select name="'. $prefix .'_year">'; for ($i=2001;$i<2019;$i++){ $date_selector .= '<option value="' . $i . '"'; if ($i==$year) $date_selector .= 'selected'; $date_selector .= '>' . $i . '</option>'; } $date_selector .= '</select>'; return $date_selector; } This HELPED ALOT! Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.