BenjaminJ.Gremillion Posted March 11, 2011 Share Posted March 11, 2011 I would like to be able to add a product to the wishlist via the product_listing.php page and the featured items contribution, but I can't seem to figure the button out. It's working perfectly from the product_info.php page. Has anyone gotten this to work? Quote Link to comment Share on other sites More sharing options...
BenjaminJ.Gremillion Posted March 14, 2011 Author Share Posted March 14, 2011 (edited) If anyone is interested in the solution: add to application_top.php (after case buy_now...break;) // <!-- Wish List --> case 'add_to_wishlist' : if (isset($HTTP_GET_VARS['products_id'])) { if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } else { $wishList->add_wishList($HTTP_GET_VARS['products_id'], ''); } } tep_redirect(tep_href_link('wishlist.php', tep_get_all_get_params($parameters))); break; // <!-- /Wish List --> And to product_listing.php (somewhere near the buy now button) tep_draw_button(IMAGE_BUTTON_WISHLIST, '', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_to_wishlist&products_id=' . $listing['products_id']), 'primary') Edited March 14, 2011 by BenjaminJ.Gremillion Quote Link to comment Share on other sites More sharing options...
luigicosta Posted July 24, 2012 Share Posted July 24, 2012 work whith oscommerce 2.3??? 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.