7 replies [Last post]
nadavoid's picture
Offline
Joined: 11/13/2007
Juice: 63
Was this information Helpful?

You guys have made Ubercart an amazing piece of software.

I'm getting really close to having a project put together. One of my final pieces is having users purchase a role. I've run into one problem with that. The expiration date of the role gets set wrong once the user signs up.

The expiration gets set for 7 hours before the purchase time. (All other times on the site are correct. Maybe the issue has to do with a time zone conversion? I'm in US Central time zone.)

In my product settings, I have it set to expire 1 month after the purchase time. In those settings, there is a checkbox: "Override the default ending expiration". However, I could not find a place to set a default ending expiration. I looked on the main Role assignment settings page: /admin/store/settings/roles.

Ubercart modules that I have installed are, besides ubercart core:
- Payment
- Roles
- Credit Card
- Paypal
- Test Gateway

I'm checking out using the test gateway.

Could someone test this and confirm that this is happening?

nadavoid's picture
Offline
Joined: 11/13/2007
Juice: 63
Some confirmations

I just did some more testing, and I have confirmed that the expiration date is set wrong upon checkout. I've tried Ubercart in Acquia Drupal as well as plain Drupal 6. I've tried setting the product both in a class (I called it "Membership") as well as the default "Product" type.

The only thing that varies is when I change the days/weeks/months/years select box, and the number of those. When I change those, the the expiration date gets set a little differently. It varies from say 3 days ago to 6 hours from now. Those are nothing close to what I'm asking for, which are 10 days from now, 1 month from now, 3 months from now. I haven't been able to detect a pattern yet, relating what I ask for and what I get.

When I set the role expiration for the user after they sign up (using the ubercart roles section of the user edit page) the expiration is set properly. So the problem is only when checking out.

nadavoid's picture
Offline
Joined: 11/13/2007
Juice: 63
Re: Some confirmations

I've found the solution! No programming required!

I had to set the defaults, and I did finally find where to set those defaults. Once the defaults were set, the overrides for the individual membership products took effect too.

Defaults are here:
/admin/store/settings/products/edit/features

I'm so happy to be able to use this feature now!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Some confirmations

Weird... so the settings for the specific feature didn't take hold until you setup a global default?

nadavoid's picture
Offline
Joined: 11/13/2007
Juice: 63
Re: Re: Re: Some confirmations

That's correct.

cha0s's picture
Offline
Getting busy with the Ubercode.
Joined: 08/22/2008
Juice: 416
Re: Re: Re: Re: Some confirmations

I'm at a loss to how this could happen. I noticed that some of the JS was behind since I updated some element names, but didn't update the corresponding JS to handle some stuff with the new absolute expiration stuff.

It may have just been that, the UI was confusing, so there was an absolute expiration time, and maybe as time went on, that became before the current date... so as you tested it would become further in the past over time... dunno but that could be it.

Try FreeBASIC!
My game Lynn's Legacy

LoveGolf's picture
Offline
Joined: 10/16/2008
Juice: 106
Re: Wrong expiration date of role is set by the Roles module

Still running into this exact issue.

When we using a 'fixed absoulute role ending' it would not work expiring on role on 12/31/1969.

When we decided to override each at a product level it worked.

Odd.

LoveGolf's picture
Offline
Joined: 10/16/2008
Juice: 106
Check that. The role

Check that.

The role expiration is working fine. It's just a display issue on the user profile showing 12/31/1969 as the expiration date even though the system has it correct.

I just removed the permission to view role expiration's to temporarily solve the problem.