Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Group (Seperate Pricing Per Customer) expirey date


Guest

Recommended Posts

Hi,

I'm currently using the Seperate Pricing Per Customer contribution to enable a 2nd 'members' price to some of our products. So I have 2 groups: Default and Members.

People pay for say a 1year membership, so at the moment we manually change them from the default group to the Members group when they buy the membership ... but then we have to remember to go in there a year later and change them back to default!

 

Is there any way of adding an expirey date so that they are automatically switched back to the Default group on a specified date?

 

Any help with this would be greatly appreciated.

Thanx!

Link to comment
Share on other sites

Is there any way of adding an expirey date so that they are automatically switched back to the Default group on a specified date?

Sure. You need to add that expiry date somewhere in a table that at least contains the customers_id and that date. Could even be a separate table. Then if you are on a *nix server and can run cron jobs you make a little PHP script that runs once a night, looks up the dates in that table and changes the customers_group_id to your default if the date at that point is later than the expiry date. Say run it at 0.05, once a day.

 

If you can't run cron jobs you could do something like a pseudo-cron (search google, perhaps on the Sitepoint forum) that runs the script if a certain page or image is called.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...