Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need Help configuring Coupon & Voucher Contribution


msweehoo

Recommended Posts

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!

Link to comment
Share on other sites

  • 5 months later...

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.

Link to comment
Share on other sites

  • 10 months later...

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

OSC2.2

Link to comment
Share on other sites

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;

}

OSC2.2

Link to comment
Share on other sites

  • 1 year later...
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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...