system_error86 Posted May 5, 2014 Share Posted May 5, 2014 καλησπερα σε ολους! προσπαθω εδώ και καιρο να βρω τροπο να μπορει καποιος πελάτης μου να διαγραψει τελειως την wishlist που εχει αποθηκευσει αλλα δε τα εχω καταφερει! εχει κανεις το ιδιο προβλημα? αλλαξα στο WishList.php αυτο public function delete($id) { Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'wishlist` WHERE `id_wishlist` = '.(int)($id)); Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'wishlist_email` WHERE `id_wishlist` = '.(int)($id)); Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'wishlist_product` WHERE `id_wishlist` = '.(int)($id)); if (isset($this->context->cookie->id_wishlist)) unset($this->context->cookie->id_wishlist); return (parent::delete()); } και επισης στο ajax-wishlist.js αυτο function WishlistDelete(id, id_wishlist, msg) { var res = confirm(msg); if (res == false) return (false); if (typeof mywishlist_url == 'undefined') return (false); $.ajax({ type: 'GET', async: true, url: baseDir + 'modules/blockwishlist/WishList.php', cache: false, data: 'deleted&id_wishlist=' + id_wishlist, success: function(data) { $('#' + id).fadeOut('slow'); } }); } αλλα δυστυχως παρολο που φευγει απο το τις αποθηκευμενες λιστες μου δεν διαγραφεται απο τη βαση! Link to comment Share on other sites More sharing options...
system_error86 Posted May 6, 2014 Author Share Posted May 6, 2014 Κανείς δεν έχει το ίδιο πρόβλημα? Link to comment Share on other sites More sharing options...
system_error86 Posted May 21, 2014 Author Share Posted May 21, 2014 (edited) Καλησπερα και πάλι ! Σε περίπτωση που ενδιαφέρεται κανείς και έχει το ίδιο πρόβλημα με μένα μια λύση που βρήκα είναι στο ajax-wishlist.js function WishlistDelete(id, id_wishlist, msg) { var res = confirm(msg); if (res == false) return (false); if (typeof mywishlist_url == 'undefined') return (false); $.ajax({ type: 'GET', async: true, url: mywishlist_url + '&rand=' + new Date().getTime(), cache: false, data: 'deleted&id_wishlist=' + id_wishlist, success: function(data) { $('#' + id).fadeOut('slow'); } }); } αντικατέστησα το url με αυτό μόνο " mywishlist_url " και δούλεψε. Δηλαδή έχω αυτό τώρα πια ajax-wishlist.js function WishlistDelete(id, id_wishlist, msg) { var res = confirm(msg); if (res == false) return (false); if (typeof mywishlist_url == 'undefined') return (false); $.ajax({ type: 'GET', async: true, url: mywishlist_url , cache: false, data: 'deleted&id_wishlist=' + id_wishlist, success: function(data) { $('#' + id).fadeOut('slow'); } }); } Edited May 21, 2014 by system_error86 (see edit history) 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