If trial is set to 2 weeks and regular billing period is 4 weeks, Subscription Manager will incorrectly show trial as none, due to bad logic in uc_recurring_subscription.admin.inc:

      if (feature->regular_interval_value != $feature->initial_charge_value &&
               $feature->regular_interval_unit != $feature->initial_charge_unit) {
                   $trial = uc_price($product->sell_price, array()) .' - '. $feature->initial_charge_value .' '. $feature->initial_charge_unit;

should be changed to

if (!($feature->regular_interval_value == $feature->initial_charge_value &&
           $feature->regular_interval_unit == $feature->initial_charge_unit)) {
                   $trial = uc_price($product->sell_price, array()) .' - '. $feature->initial_charge_value .' '. $feature->initial_charge_unit;

Otherwise, Subscription Manager will show trial as none if either the interval unit OR the interval value match the regular charge interval unit / value. Should only be marked none if BOTH interval unit AND interval value match.

Comments

mattcasey’s picture

I can confirm this problem and the proposed solution works.

mattcasey’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB
univate’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

fehin’s picture

Version: 6.x-2.0-beta1 » 7.x-2.0-alpha3
Status: Closed (fixed) » Active

I'm having the same issue in 7.x.

I have two subscription nodes. Node1 shows the trial period on manage subscription page and node2 shows "None" for trial even though trial is set.