tmcca Posted February 29, 2020 Share Posted February 29, 2020 (edited) I uploaded the wishlist to my github this was tested on Phoenix 1.0.5.0. Any issues please open a issue up in github. https://github.com/drillsar/oscommerce-wishlist Edited February 29, 2020 by tmcca Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted February 29, 2020 Share Posted February 29, 2020 28 minutes ago, tmcca said: I uploaded the wishlist to my github this was tested on Phoenix 1.0.5.0. Any issues please open a issue up in github. https://github.com/drillsar/oscommerce-wishlist Will download and test this tomorrow. Quote Link to comment Share on other sites More sharing options...
tmcca Posted February 29, 2020 Author Share Posted February 29, 2020 Let me know any issues, improvements, suggestions etc Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 2, 2020 Author Share Posted March 2, 2020 (edited) Just added hook in catalog side. I will probably do hook side in admin soon as well. Edited March 2, 2020 by tmcca Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 2, 2020 Share Posted March 2, 2020 10 hours ago, tmcca said: Just added hook in catalog side. I will probably do hook side in admin soon as well. What does this hook do? Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 2, 2020 Author Share Posted March 2, 2020 It's not working the hook as of yet. It will be easier to update in future with hook. Instead of changing the core with a bunch of code you only use one line. Make sense? Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 2, 2020 Share Posted March 2, 2020 1 hour ago, tmcca said: It's not working the hook as of yet. It will be easier to update in future with hook. Instead of changing the core with a bunch of code you only use one line. Make sense? Yeah, just looking at the change to core, I'm guessing that would be the hook? Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 2, 2020 Share Posted March 2, 2020 (edited) So the core code change just adds the button to the product in the listing page? I'd be inclined to leave that out. Get this error after installing the box - Fatal error: Uncaught Error: Call to a member function count_contents() Clicking add to wish list adds the item to the shopping cart. Also the zip package is missing the account and navbar modules. So as it stands I can't add anything to the wish list and can't view it. Edited March 2, 2020 by LeeFoster Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 2, 2020 Author Share Posted March 2, 2020 I will check it Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 3, 2020 Author Share Posted March 3, 2020 That error should be fixed now.. I will add account and navbar modules soon. Hopefully later tonight. Let me know how this works now. Thanks Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 3, 2020 Author Share Posted March 3, 2020 Ok that should be ok now Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 3, 2020 Share Posted March 3, 2020 Done some more testing found the following - Account Wish list has no language file. wishlist.php gives the error Fatal error: Uncaught Error: Call to a member function get_products() on null in C:\xampp\htdocs\360v3\wishlist.php:16 Stack trace: #0 {main} thrown in C:\xampp\htdocs\360v3\wishlist.php on line 16 Adding to wishlist still adds to cart Installing Wishlist box now gives the error Fatal error: Uncaught Error: Call to a member function count_contents() on null in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php:34 Stack trace: #0 C:\xampp\htdocs\360v3\includes\system\versioned\1.0.4.0\osc_template.php(102): bm_wishlist->execute() #1 C:\xampp\htdocs\360v3\includes\template_top.php(13): oscTemplate->buildBlocks() #2 C:\xampp\htdocs\360v3\account.php(24): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php on line 34 Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 3, 2020 Author Share Posted March 3, 2020 I will see what is going on. I just added the language files Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 3, 2020 Author Share Posted March 3, 2020 try it now Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 3, 2020 Share Posted March 3, 2020 45 minutes ago, tmcca said: try it now These errors still occur - wishlist.php gives the error Fatal error: Uncaught Error: Call to a member function get_products() on null in C:\xampp\htdocs\360v3\wishlist.php:16 Stack trace: #0 {main} thrown in C:\xampp\htdocs\360v3\wishlist.php on line 16 Adding to wishlist still adds to cart Installing Wishlist box now gives the error Fatal error: Uncaught Error: Call to a member function count_contents() on null in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php:34 Stack trace: #0 C:\xampp\htdocs\360v3\includes\system\versioned\1.0.4.0\osc_template.php(102): bm_wishlist->execute() #1 C:\xampp\htdocs\360v3\includes\template_top.php(13): oscTemplate->buildBlocks() #2 C:\xampp\htdocs\360v3\account.php(24): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php on line 34 Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 3, 2020 Share Posted March 3, 2020 14 minutes ago, LeeFoster said: wishlist.php gives the error Fatal error: Uncaught Error: Call to a member function get_products() on null in C:\xampp\htdocs\360v3\wishlist.php:16 Stack trace: #0 {main} thrown in C:\xampp\htdocs\360v3\wishlist.php on line 16 This error is down to me not adding the hook to application_top.php 14 minutes ago, LeeFoster said: Adding to wishlist still adds to cart Installing Wishlist box now gives the error Fatal error: Uncaught Error: Call to a member function count_contents() on null in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php:34 Stack trace: #0 C:\xampp\htdocs\360v3\includes\system\versioned\1.0.4.0\osc_template.php(102): bm_wishlist->execute() #1 C:\xampp\htdocs\360v3\includes\template_top.php(13): oscTemplate->buildBlocks() #2 C:\xampp\htdocs\360v3\account.php(24): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php on line 34 These 2 still persist. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 3, 2020 Share Posted March 3, 2020 Changing hook in application top from // BOF WISHLIST $OSCOM_Hooks->register('wishlist'); echo $OSCOM_Hooks->call('wishlist', 'WishListMod'); // EOF WISHLIST to // BOF WISHLIST $OSCOM_Hooks->register('wishlist'); $OSCOM_Hooks->call('wishlist', 'WishListMod'); // EOF WISHLIST Has resolved 29 minutes ago, LeeFoster said: Fatal error: Uncaught Error: Call to a member function count_contents() on null in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php:34 Stack trace: #0 C:\xampp\htdocs\360v3\includes\system\versioned\1.0.4.0\osc_template.php(102): bm_wishlist->execute() #1 C:\xampp\htdocs\360v3\includes\template_top.php(13): oscTemplate->buildBlocks() #2 C:\xampp\htdocs\360v3\account.php(24): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php on line 34 Still can't add to wishlist though. Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 3, 2020 Author Share Posted March 3, 2020 Weird on my end it works. I will look more into it when I get time. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 3, 2020 Share Posted March 3, 2020 22 minutes ago, tmcca said: Weird on my end it works. I will look more into it when I get time. What version of Phoenix are you using? Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 3, 2020 Author Share Posted March 3, 2020 1.0.5.0 Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 3, 2020 Share Posted March 3, 2020 That could be why, I'm using 1.0.5.2 Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 3, 2020 Author Share Posted March 3, 2020 Yes 1.0.5.2 will have issues I think. Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 3, 2020 Author Share Posted March 3, 2020 I think the hooks run differently in 1.0.5.2 try it without hooks and see what happens please Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 3, 2020 Share Posted March 3, 2020 2 minutes ago, tmcca said: Yes 1.0.5.2 will have issues I think. Where would you look for the issues? What function does adding to wish list use that is missing? Quote Link to comment Share on other sites More sharing options...
tmcca Posted March 3, 2020 Author Share Posted March 3, 2020 (edited) in application_top remove the hook or comment it out and replace it with this: // BOF WISHLIST // wishlist data if (!tep_session_is_registered('wishList') || !is_object($wishList)) { tep_session_register('wishList'); $wishList = new wishlist; } //Wishlist actions (must be before shopping cart actions) if (isset($_POST['wishlist'])) { if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) { $attributes = isset($_POST['id']) ? $_POST['id'] : ''; $wishList->add_wishlist($_POST['products_id'], $wishList->get_quantity(tep_get_uprid($_POST['products_id'], $attributes))+1, $attributes); } if (WISHLIST_REDIRECT == 'No') tep_redirect(tep_href_link('product_info.php', 'products_id=' . $_POST['products_id'])); tep_redirect(tep_href_link('wishlist.php')); } Edited March 3, 2020 by tmcca valquiria23 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.