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 thekrotek » Fri May 25, 2018 3:24 pm

I have an extension called Random Specials, which does exactly what you need. Not only it can reset your end date in given period, but also randomize your specials, adding some kind of "products of the day/week/month" feature.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


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

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

I was looking your module before i write here. Is nice one, but i am sharing the special price etc and i was trying to found a solution aftair update the price. Ty for your time.

Newbie

Posts

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

Users browsing this forum: No registered users and 34 guests