Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Vouchers/Coupons Module Error


centrios40

Recommended Posts

whenever i try to insert a new coupon for the Vouchers/Coupons module (http://addons.oscommerce.com/info/282)

 

please help. thanks

 

it keeps giving me this error:

 

Fatal error: Call to undefined function tep_draw_date_selector() in /home2/website/public_html/admin/coupon_admin.php on line 708

 

line 708 from coupon_admin.php is bolded.

 

<?php
   if (!$HTTP_POST_VARS['coupon_startdate']) {
     $coupon_startdate = split("[-]", date('Y-m-d'));
   } else {
     $coupon_startdate = split("[-]", $HTTP_POST_VARS['coupon_startdate']);
   }
   if (!$HTTP_POST_VARS['coupon_finishdate']) {
     $coupon_finishdate = split("[-]", date('Y-m-d'));
     $coupon_finishdate[0] = $coupon_finishdate[0] + 1;
   } else {
     $coupon_finishdate = split("[-]", $HTTP_POST_VARS['coupon_finishdate']);
   }
?>
       <td align="left" class="main"><?php echo COUPON_STARTDATE; ?></td>
[b]        <td align="left"><?php echo tep_draw_date_selector('coupon_startdate', mktime(1,2,0, $coupon_startdate[1], $coupon_startdate[2], $coupon_startdate[0], 0)); ?></td>[/b]
       <td align="left" class="main"><?php echo COUPON_STARTDATE_HELP; ?></td>
     </tr>
     <tr>
       <td align="left" class="main"><?php echo COUPON_FINISHDATE; ?></td>
       <td align="left"><?php echo tep_draw_date_selector('coupon_finishdate', mktime(0,0,0, $coupon_finishdate[1], $coupon_finishdate[2], $coupon_finishdate[0], 0)); ?></td>
       <td align="left" class="main"><?php echo COUPON_FINISHDATE_HELP; ?></td>
     </tr>
     <tr>
       <td align="left"><?php echo tep_image_submit('button_preview.gif',COUPON_BUTTON_PREVIEW); ?></td>
       <td align="left"><?php echo '  <a href="' . tep_href_link('coupon_admin.php', ''); ?>"><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>
     </td>
     </tr>
     </td></table></form>
     </tr>

     </table></td>

Link to comment
Share on other sites

Re-read the install directions.

 

You've missed this:

 

// LINE ADDED: MOD - CREDIT CLASS Gift Voucher Contribution
require(DIR_WS_INCLUDES . 'add_ccgvdc_application_top.php');

At the end of /admin/includes/application_top.php

 

That file is where the function is defined.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...