membership duration

hello, the membership duration it’s set for d, month, or year.

Is it possible to set memberships that ends automatically at the end of the year?

If you subscribe the 17h january or 4th April, the suscriptions end the 12/31of that year.

how can i manage it?

i though my changing a value of the ‘period’ => $level->level_period in the array of the function function get_pricingarray()? Am i correct? can you guys lead me in that improvment?

Thank you.

  • Promoshake
    • Site Builder, Child of Zeus

    hum the subscription are online, if they are 30-40 subscriptions a day…it’s quiet tricky to manage!!!

    even by changing runtine the value in the array? what will happen with something like this:

    function quanto_manca() {
    $ultimo_dell_anno = date('Y') . "-12-31";
    $query = "SELECT DATEDIFF('$ultimo_dell_anno',CURDATE()) as giorni";
    $res = mysql_query($query);
    $row = mysql_fetch_assoc($res);
    return $row['giorni'];
    }

    and…

    } else {
    $level = $row['giorni'];
    $prices[] = array( 'period' => $level->level_period, 'amount' => $level->level_price, 'type' => $level->sub_type, 'unit' => $level->level_period_unit);