SMFHacks.com

SMF Store => Support => Topic started by: shuban on July 28, 2016, 01:02:51 pm

Title: Discovered a critical issue with membergroup purchases
Post by: shuban on July 28, 2016, 01:02:51 pm
Currently, if a person renews the *same* product before the first product has expired, it will not add the two durations.

For example, product A expires in 7 days. If I by product A again tomorrow (i.e. a day has gone by), it should update the database by adding the days together, making it 13 days. Instead what it does is give you 7 days again.

So what needs to be done is when smf_store_group_log is being updated after a purchase, look for ID_MEMBER and ID_GROUPTomove columns and instead of adding a new row entry into the table, it adds to the groupexpiredays column the number of days
Title: Re: Discovered a critical issue with membergroup purchases
Post by: SMFHacks on July 28, 2016, 08:46:53 pm
Posted update which should help

Version 2.5.7
!Fixed if the same membership subscription is bought keep the date to expire as the new date.
Title: Re: Discovered a critical issue with membergroup purchases
Post by: shuban on July 28, 2016, 09:57:17 pm
So this will sum up the number of days left to expire if the member buys the same membership?
Title: Re: Discovered a critical issue with membergroup purchases
Post by: SMFHacks on July 28, 2016, 10:33:07 pm
It sets the the current date as today for membergroup then sets the expire date as the number of days based on the item ordered.
Title: Re: Discovered a critical issue with membergroup purchases
Post by: shuban on July 28, 2016, 11:31:58 pm
Does it add another entry into smf_store_group_log or updates it?

Sorry, I'm still not understanding the logic :(
Title: Re: Discovered a critical issue with membergroup purchases
Post by: SMFHacks on July 28, 2016, 11:45:42 pm
It updates the existing one it is exists for the same member and group id