This was requested in #249205. I've implemented the new feature and attached a patch. Testing would be wonderful.

Comments

kshahan’s picture

I guess i'm late to implementing this code and testing. Will this patch work for the current version 3.6., I'm assuming it hasn't been implemented into the latest release yet.

I'm receiving this error when I put the patch in manually:

Parse error: syntax error, unexpected T_STRING in /home/content/52/3712252/html/sites/all/modules/ecommerce/contrib/ec_recurring/ec_recurring.module on line 1667

line 1667 in my code is:

drupal_map_assoc(range(0, 23), 'ec_recurring_int_to_hour');

*******************************************************
In addition: when I make code like this:

$hours = array(ECRECURRING_PROCESS_ALL_CRON => t('Every cron run'))
+
drupal_map_assoc(range(0, 23), 'ec_recurring_int_to_hour');

I don't get the error..but not sure if this is correct coding or not..? by adding the + sign it functions..Please advise.

Thank You,
Kerry,

sammys’s picture

Status: Needs review » Reviewed & tested by the community

Hi Kerry,

Thanks for testing it out.

The patch correctly patches the file using the patch command. If you are using the patch command and getting the result above it might be wise to update patch. :)

As you have noticed (and successfully fixed) it is missing the + symbol at the end of the following line:

$hours = array(ECRECURRING_PROCESS_ALL_CRON => t('Every cron run'))

So that section is meant to be:

  $hours = array(ECRECURRING_PROCESS_ALL_CRON => t('Every cron run')) + 
    drupal_map_assoc(range(0, 23), 'ec_recurring_int_to_hour');

Since the patch works i'll commit it to the repository. Woohoo! Setting to RTBC for the moment.

sammys’s picture

StatusFileSize
new0 bytes

Patch failed because of the other one I committed before. Rerolled.

sammys’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new3.35 KB

Grrr... patch I posted was empty! Posted the correct patch.

It's now committed to the repository and will be available in the next dev tarball and Ecommerce 3.7.

kshahan’s picture

I'm still testing the expiry schedule on the recurring product. I'm concerned that the expiration of the node access on a recurring schedule lasts longer than an actual day from the time it was purchased.

Here is an example using a test user on a node access product:

Users who have purchased this Node Access Product:
dana on 2009-01-28 23:24:32 (expires: 2009-01-29 03:00:00)

so..Dana's (my test user name) purchased node expires the next day at 3 am., which is longer than 24 hours or 1 day of access time.

Also it would be cool to allow hourly access or 12, 24 or 36 hour access..for shorter time periods.

Thanks,
Kerry

sammys’s picture

Status: Fixed » Needs work

Ah yeah of course... the expiration records need to be adjusted as well. Not fixed yet haha.

kshahan’s picture

if it's not one thing it's another :)