syntax.error Posted July 4, 2013 Posted July 4, 2013 Hello everyone!.. I need some help regarding on "Hide BUY NOW and Add To Cart button when customer is not logged in" I found some add-on http://addons.oscommerce.com/info/601 but this is not updated.. I'm hoping for your response!.. Thanks,
burt Posted July 4, 2013 Posted July 4, 2013 /includes/functions/html_output.php Find: function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) { static $button_counter = 1; Add after: if ( (!tep_session_is_registered('customer_id')) && ( ($title == IMAGE_BUTTON_BUY_NOW) || ($title == IMAGE_BUTTON_IN_CART) ) ) { return NULL; }
syntax.error Posted July 5, 2013 Author Posted July 5, 2013 Thank you so much! It works!!! :thumbsup:
WSH90 Posted February 14, 2014 Posted February 14, 2014 /includes/functions/html_output.php Find: function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) { static $button_counter = 1; Add after: if ( (!tep_session_is_registered('customer_id')) && ( ($title == IMAGE_BUTTON_BUY_NOW) || ($title == IMAGE_BUTTON_IN_CART) ) ) { return NULL; } Thank you so much! It works!!! :thumbsup: Sorry, I tried but the "Add To Cart" button is still showing even if I am not log in. Below is my code: function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) { static $button_counter = 1; if ( (!tep_session_is_registered('customer_id')) && ( ($title == IMAGE_BUTTON_BUY_NOW) || ($title == IMAGE_BUTTON_IN_CART) ) ) { return NULL; } $types = array('submit', 'button', 'reset'); Am I doing it in right way?Thanks
Recommended Posts
Archived
This topic is now archived and is closed to further replies.