prsut Posted November 30, 2009 Share Posted November 30, 2009 Ahojte,vie mi niekto poradit, co mam upravit v kode tak, aby casovy limit platnosti vratenia tovaru sa ratal od DORUCENIA objednavky a nie od Vystavenia ?Podla zakonov ma zakaznik pravo vratit tovar do 7 dni. System tych sedem dni rata od vystavenia objednavky, co je pre mna nevyhovujuce, pretoze ak to nemam na sklade, tak kym to pride mne a potom zakaznikovi, moze prejst aj viac ako 7 dni.Dakujem Link to comment Share on other sites More sharing options...
JAKCRABBIT Posted November 30, 2009 Share Posted November 30, 2009 A nestačí tedy jenom změnit tu dobu 7 dnů na 14dní? Třeba? Link to comment Share on other sites More sharing options...
prsut Posted November 30, 2009 Author Share Posted November 30, 2009 U zakaznika je potom na stiahnutie potvrdenie v pdf formate, a tam sa docita, ze tovar moze vratit do 14 dni, co sa da pekne zneuzit...A okrem toho, Zakaznik moze ziadat o vratenie len vtedy, ak je priznak objednavky nastaveny na "Dorucene". Link to comment Share on other sites More sharing options...
prsut Posted November 30, 2009 Author Share Posted November 30, 2009 Takze tu je riesenie (v order.php) public function getNumberOfDays() { $nbReturnDays = intval(Configuration::get('PS_ORDER_RETURN_NB_DAYS')); $delivStatus = _PS_OS_DELIVERED_; if (!$nbReturnDays) return true; /* $result = Db::getInstance()->getRow(' SELECT TO_DAYS(NOW()) - TO_DAYS(`delivery_date`) AS days FROM `'._DB_PREFIX_.'orders` WHERE `id_order` = '.intval($this->id)); */ $result = Db::getInstance()->getRow(' SELECT TO_DAYS(NOW()) - TO_DAYS(hist.`date_add`) AS days FROM `'._DB_PREFIX_.'orders` AS ord, `'._DB_PREFIX_.'order_history` AS hist WHERE ord.`id_order` = '.intval($this->id).' AND ord.`id_order` = hist.`id_order` AND hist.`id_order_state` = '.intval($delivStatus)); if ($result['days'] <= $nbReturnDays) return true; return false; } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now