-- url of the page with the problem -- : local
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.5.3
Hi again,
I notice that 2.6.0 came out within the last very few hours... wow, congrats - will be an interesting one, I'm sure! Anyway, the changelog doesn't say anything about limits, so here I am:
I guess I need an odd 10 months limit on some products: it's Emerald subscriptions valid for 1 year, but renewal/repurchasing must be possible from 2 months before expiry.
The attachment shows what I've set up now, and that does the job - but for the whole year. Then I found the function _checkQuantity in classes/cart.php and the lines
$baseDates = array(
0 => 0,
1 => mktime(0,0,0,1,1,$d['year']),
2 => mktime(0,0,0,$d['mon']-(($d['mon']-1)%4),1,$d['year']),
3 => mktime(0,0,0,$d['mon'],1,$d['year']),
4 => mktime(0,0,0,$d['mon'],$d['mday']-$d['wday'],$d['year']),
5 => mktime(0,0,0,$d['mon'],$d['mday'],$d['year']),
6 => -1
);
There's only this one period of limit in this case, so I'd be fine with modding e.g. case 3 to make it not 1 month but 10, then change my setting for period to "Monthly". But I'm lost with the "math", and even only 1 month is an awful long time for trial & error, haha...
So, it'd be great if you could give me a reliable hint on what exactly to change. Is it as simple as replacing the 1 with a 10 in case 3, then selecting "Monthly" in the backend?
Thanks a ton!