dblake Posted January 22, 2005 Share Posted January 22, 2005 You got something wrong if it still added to the favs list when u push add to wishlist with that favs code taken out of app top. There is something else wrong... Are you querying the right table on favs.php? You have to overlooking something else for it to act that way. -Dennis Quote Link to comment Share on other sites More sharing options...
mujina Posted January 22, 2005 Share Posted January 22, 2005 Actually now it works well : - When I push on the button "add to wishlist" the product is added only to the wishlist. - When I push on the button "add to favourites list" the product is added only to the favourites list. The product is registered to the correct table. wishlist and favourites list have separate distinct tables. So.... what do you think? Quote OSC2.2 Link to comment Share on other sites More sharing options...
mujina Posted January 22, 2005 Share Posted January 22, 2005 Actually now it works well : - When I push on the button "add to wishlist" the product is added only to the wishlist. - When I push on the button "add to favourites list" the product is added only to the favourites list. The product is registered to the correct table. wishlist and favourites list have separate distinct tables. So.... what do you think? <{POST_SNAPBACK}> Sorry for the mistake... Add to cart doesn't work from wishlist.php and favs.php pages... I'm gonna check this and be back to post the results... Quote OSC2.2 Link to comment Share on other sites More sharing options...
mujina Posted January 22, 2005 Share Posted January 22, 2005 Well to avoid problems due to removing functions from application top, I just took of case 'add_wishlist' : if (ereg('^[0-9]+$', $HTTP_POST_VARS['products_id'])) { if ($HTTP_POST_VARS['products_id']) { if ($customer_id > 0) { // Queries below replace old product instead of adding to queatity. tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'"); tep_db_query("insert into " . TABLE_WISHLIST . " (customers_id, products_id, products_model, products_name, products_price) values ('" . $customer_id . "', '" . $products_id . "', '" . $products_model . "', '" . $products_name . "', '" . $products_price . "' )"); tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . $HTTP_POST_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'"); // Read array of options and values for attributes in id[] if (isset ($id)) { foreach($id as $att_option=>$att_value) { // Add to customers_wishlist_attributes table tep_db_query("insert into " . TABLE_WISHLIST_ATTRIBUTES . " (customers_id, products_id, products_options_id , products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $att_option . "', '" . $att_value . "' )"); } } } } } break; } } from application top to wishlist.php. Now : - when I push on add to wishlist button the product is added to both wishlist & favs list - when I push on add to favsbutton the product is added to favs list. The add to cart & remove from the list functions works fine too!!! It suits me as I can't have something perfect. Thanks for your help Dennis!! :D Quote OSC2.2 Link to comment Share on other sites More sharing options...
dblake Posted January 22, 2005 Share Posted January 22, 2005 Man that just doesn't make sense why it does that... Quote Link to comment Share on other sites More sharing options...
bodek2 Posted January 23, 2005 Share Posted January 23, 2005 hi, I have just instaled a Wishlist 2.3. I'd like to change a button of "Move to cart" and "delete" in box "My wishlist" to a simply link like: Move to cart | Delete Does antybody know how to change te file wishlist.php in folder boxes. bogdan Quote Link to comment Share on other sites More sharing options...
Mighty Mike Posted January 24, 2005 Share Posted January 24, 2005 Jb: First off Happy New Years! Secondly, thanks for adding that fix, it helped my problem of being redirected to the login page everytime I pressed 'Add to Wishlist.' Now that I'm at the Wishlist, I can only see that I'm 'Displaying 1 to 5 (of 5 items on your wishlist)' . I can't seem to figure out why the products or the name of these products aren't showing. Although this doesn't matter too much, on the right column I can also see that I 'Currently 5 items are on your Wishlist.' Hope you can help!!! Bye, <{POST_SNAPBACK}> Hi I have the same problem aswell, it does not display the products only the quantity in the wishlist. 3960AD did you do anyrhing to register globals, like turn them off? Did anybody manage to get a fix for this? Thanks Mike Quote Link to comment Share on other sites More sharing options...
Mighty Mike Posted January 27, 2005 Share Posted January 27, 2005 ok i have managed to find out what is going on. The products ID is not being passed to the database, any ideas how i can fix this? Quote Link to comment Share on other sites More sharing options...
3960AD Posted January 27, 2005 Share Posted January 27, 2005 ok i have managed to find out what is going on. The products ID is not being passed to the database, any ideas how i can fix this? <{POST_SNAPBACK}> I installed another module for the wishlist and got rid of this wishlist. but the one of concern to me is better. if you find out how to fix this please send me a note... thanks. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2005 Share Posted January 27, 2005 hi ! how can we add the qty to wishlist ? Quote Link to comment Share on other sites More sharing options...
Mighty Mike Posted January 27, 2005 Share Posted January 27, 2005 I installed another module for the wishlist and got rid of this wishlist. but the one of concern to me is better. if you find out how to fix this please send me a note... thanks. <{POST_SNAPBACK}> Hi Do you have register globals turned off? let me know so then i can narrow down the problem, i am pretty sure it has got something to do with register globals. Cheers Quote Link to comment Share on other sites More sharing options...
3960AD Posted January 27, 2005 Share Posted January 27, 2005 Hi Do you have register globals turned off? let me know so then i can narrow down the problem, i am pretty sure it has got something to do with register globals. Cheers <{POST_SNAPBACK}> I think I have it..off....but will have to verify once home. Quote Link to comment Share on other sites More sharing options...
Gwyn Posted January 28, 2005 Share Posted January 28, 2005 (edited) Okay Guys and Gals - Here's the code fix for the problems with new sessions being created whenever "Add To Wishlist" is clicked in Version 2.3 (and coincidentally the Attributes Handler Add-on). Original Wishlist V2.3 Contribution Code in Products_info.php is this: <?php echo tep_draw_hidden_field('wishlist_action', 'add_wishlist') . tep_image_submit('button_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST, 'onClick="document.cart_quantity.action=\''. FILENAME_WISHLIST . '\';document.cart_quantity.submit();"'. ' action=add_wishlist'); ?> You need to change to this: <?php echo tep_draw_hidden_field('wishlist_action', 'add_wishlist') . tep_image_submit('button_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST, 'onClick="document.cart_quantity.action=\''. tep_href_link(FILENAME_WISHLIST) . '\';document.cart_quantity.submit();"'. ' action=add_wishlist'); ?> The solution is wrapping the FILENAME_WISHLIST in the tep_href_link() function - the default hyperlink function for passing all filenames in OSCommerce - please note for future when inserting any hyperlinks in your OSC stores they need this function to work properly. I hope this fixes everybody elses prob's with sessions being lost from the Hidden form submission. Just to note - this contribution defaults to log_in.php as default and you need to deprecate all instances of If Session is registered - not a small task for newbies like me. Regards, JB <{POST_SNAPBACK}> Just to say - many thanks for your efforts. This certainly fixed it for me. Cheers - and have a great 2005. :thumbsup: Edited January 28, 2005 by Gwyn Quote Link to comment Share on other sites More sharing options...
osCshop Posted February 2, 2005 Share Posted February 2, 2005 Still having problems to hide the wishlist if wishlist is empty :( Requested this already here but I'm still hoping to get the answer here... Quote Link to comment Share on other sites More sharing options...
dblake Posted February 2, 2005 Share Posted February 2, 2005 As far as i see, there is not globals for the wishlist, so what you will need to do is do a query of the customers id and the wishlist table to see if they have anything in the table, if they do show the wishlist, if not dont show it. Just like the wishlist.php page does when nothing is in there wishlist. That should get you started ;) Quote Link to comment Share on other sites More sharing options...
osCshop Posted February 4, 2005 Share Posted February 4, 2005 That should get you started :blink: Because I'm a PHP newbie I have no idea how to get it done... Would somebody be so kind to post the codeline :huh: I think many people would like such a feature. Don't we all agree empty boxes in a shop are ugly? Quote Link to comment Share on other sites More sharing options...
Guest Posted February 6, 2005 Share Posted February 6, 2005 Major pain, I have installed this contribution a few times in the last few days everything works except the wishlist.php doesnt show the products I have added to it, my info box does show a list of added products, but the link to wishlist shows nothing in it, why? :'( My site is www.easypcs.co.uk very weird I ant see the problems I have added exactly what is needed but no joy, plz anyone any thoughts or previous problems with wishlist.php not showing added products? Quote Link to comment Share on other sites More sharing options...
Mighty Mike Posted February 6, 2005 Share Posted February 6, 2005 (edited) Major pain, I have installed this contribution a few times in the last few days everything works except the wishlist.php doesnt show the products I have added to it, my info box does show a list of added products, but the link to wishlist shows nothing in it, why? :'( My site is www.easypcs.co.uk very weird I ant see the problems I have added exactly what is needed but no joy, plz anyone any thoughts or previous problems with wishlist.php not showing added products? <{POST_SNAPBACK}> Joker Do you have register globals turned off? I had the same issue, if you look at your wishlist table in the db has the product id been passed/stored?. Has anybody got the wishlist button working from any other pages except the product_info page.. IE new_products or any page which shows multiple items. Have been trying to get it to work with no luck :angry: Thanks Mike Edited February 6, 2005 by Mighty Mike Quote Link to comment Share on other sites More sharing options...
Guest Posted February 6, 2005 Share Posted February 6, 2005 (edited) Register globals on the server are off, however I have a php.ini file installed to the root of the site with register_globals = on in it which allows the site to work. :'( This is the only thing I have wrong with the site now, which is not allowing me to launch the site, I may have to rmove it altogether, which isnt what I want. Everuthing is being stored in sql as the infobox shows the stored wishlist items but not the wishlist page? Thx for any help Edited February 6, 2005 by j0ker Quote Link to comment Share on other sites More sharing options...
Mighty Mike Posted February 7, 2005 Share Posted February 7, 2005 Joker Have a look at these two threads, if the server has register globals off and your php.ini is on this could/will cause problems. I had the problem where my infobox would say you have 3 items on your wishlist, but when you go to the wishlist nothing was displayed. http://www.oscommerce.com/forums/index.php?act=ST&f=7&t=93343 http://www.oscommerce.com/forums/index.php?act=ST&f=11&t=133331 Hope the above helps you out. Thanks Mike Quote Link to comment Share on other sites More sharing options...
3960AD Posted February 9, 2005 Share Posted February 9, 2005 Ok I tried reinstalling this mod and I get this error now.... 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-6, 6' at line 1 select * from customers_wishlist where customers_id = '2' order by products_name limit -6, 6 Any suggestions??? Quote Link to comment Share on other sites More sharing options...
osCshop Posted February 9, 2005 Share Posted February 9, 2005 (edited) David, I've had the same error after I modified application_top. application_top without the source for wishlist did give exact the same error... Edited February 9, 2005 by osCshop Quote Link to comment Share on other sites More sharing options...
3960AD Posted February 9, 2005 Share Posted February 9, 2005 David,I've had the same error after I modified application_top. application_top without the source for wishlist did give exact the same error... <{POST_SNAPBACK}> what did you do to fix it?? Quote Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2005 Share Posted February 11, 2005 what did you do to fix it?? <{POST_SNAPBACK}> The Solution I have found that works for me and to date I have seen any side effects is in: catalog/includes/application_top.php Just below this code // performed by the 'buy now' button in product listings and review page case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) { Delete or stop these functions like this. (these lines in the Contribution says to put them in, but all I ever experience was trouble with them.) // Wish List 2.3 Start // if (tep_session_is_registered('customer_id')) { // tep_db_query("delete from " . TABLE_WISHLIST . " WHERE customers_id=$customer_id AND products_id=$products_id"); // tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " WHERE customers_id=$customer_id AND products_id=$products_id"); // } // Wish List 2.3 End Quote Link to comment Share on other sites More sharing options...
dblake Posted February 11, 2005 Share Posted February 11, 2005 When someone uses the form "buy now" then if they have the product in there wishlist, it will remain there as that was the code to delete it out. I don't really know why that code would cause you any problems... But its just a small thing as most likely if people use there wishlist they will buy from that and not the product listing pages. Dennis 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.