Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • coronapro Friend
    #182033

    When purchasing a package for publishing a resume for search, the package does not initializes; This is when the start/end dates are blank.

    If those dates are there, the purchase works correctly.

    Is there a way to set these dates by default? As they are currently blank by default.
    Should a purchase when these are blank set the dates?
    Am I missing a setting?

    Joomla 2.5.7
    JA Job Board Version 1.0.3
    PHP 5.3.3
    MySQL 5.1.61

    coronapro Friend
    #472210

    I managed to fix the problem by modifying the php code in /components/com_jajobboard/helper/jafunctions.class.php:

    Change lines 1688-1703 from

    [PHP]
    if(isset($vars->end_date_post_resume)) {
    if($revert) {
    if(jaCompareDate($vars->end_date_post_resume, $currDate) > 0) {
    $vars->begin_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->begin_date_post_resume . ‘ -‘.$plan_item->value.’ day’));
    $vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->end_date_post_resume . ‘ -‘.$plan_item->value.’ day’));
    }

    } else {
    if(jaCompareDate($vars->end_date_post_resume, $currDate) < 0) {
    $vars->begin_date_post_resume = $currDate;
    $vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($currDate . ‘ +’.$plan_item->value.’ day’));
    } else {
    $vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->end_date_post_resume . ‘ +’.$plan_item->value.’ day’));
    }
    }
    }
    [/PHP]

    to

    [PHP]
    if(isset($vars->end_date_post_resume)) {
    if($revert) {
    if(jaCompareDate($vars->end_date_post_resume, $currDate) > 0) {
    $vars->begin_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->begin_date_post_resume . ‘ -‘.$plan_item->value.’ day’));
    $vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->end_date_post_resume . ‘ -‘.$plan_item->value.’ day’));
    }

    } else {
    if(jaCompareDate($vars->end_date_post_resume, $currDate) < 0) {
    $vars->begin_date_post_resume = $currDate;
    $vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($currDate . ‘ +’.$plan_item->value.’ day’));
    } else {
    $vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($vars->end_date_post_resume . ‘ +’.$plan_item->value.’ day’));
    }
    }
    } else {
    $vars->begin_date_post_resume = $currDate;
    $vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($currDate . ‘ +’.$plan_item->value.’ day’));
    }
    [/PHP]

    This will add a condition for when end_date_post_resume is not set.

    Mary Ann Wellington Friend
    #472262

    Great, thanks!, I’ll test and let you know. Instead of replacing the whole code lines, it would be enough to add this after line 1722:

    [PHP]else {
    $vars->begin_date_post_resume = $currDate;
    $vars->end_date_post_resume = date(‘Y-m-d H:i:s’, strtotime($currDate . ‘ +’.$plan_item->value.’ day’));
    } [/PHP]

    Which adds the date if none is set.

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  Mary Ann Wellington 12 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum