Post by estand » Fri May 25, 2018 1:39 pm

Hi. I have 2 stores that i transfer data with a extension. but There's a problem, i can not import special date end, I was wondering if possible to add a rule on special date end. This rule will set special end date on first saturday when i update the special price and let it be when i hadle to add it manualy. Lets say that i trasfer 3 products from those products i have (now friday 25/05/2018) sp1 : 2$ - sde:2/6/18 sp2 : 2$ - sde:0/0/00 sp3 : 3$ - sde:5/6/18 when i will trasfer them i only get the sp1 sp2 sp3 so i need the rule to update the spd on first saturday so aftair trasfer(update) i will have sp1 : 2$ - sde:26/5/18 sp2 : 2$ - sde:26/5/18 sp3 : 3$ - sde:26/5/18. any help and code is welcome!

Newbie

Posts

Joined
Sun Jan 15, 2017 9:24 pm

Post by estand » Fri May 25, 2018 2:41 pm

Something like this ?
'date_end' => date('Y-m-d', time(next Saturday))

Newbie

Posts

Joined
Sun Jan 15, 2017 9:24 pm

Post by estand » Fri May 25, 2018 3:31 pm

I believe i have found the code !!!

'date_end' => isset($special_parts[4]) ? date('Y-m-d', strtotime($special_parts[4])) : date('Y-m-d', strtotime('next Saturday'))

Newbie

Posts

Joined
Sun Jan 15, 2017 9:24 pm
Who is online

Users browsing this forum: No registered users and 64 guests