parawebo Posted May 27, 2011 Share Posted May 27, 2011 (edited) Hello, my question is this, I installed version 2.3.1 and I have to hide the product or price for users who are not registered. They know how to fix this? I've tried several addons, but are not compatible with this version. Thank you very much. Edited May 27, 2011 by parawebo Quote Link to comment Share on other sites More sharing options...
Guest Posted May 27, 2011 Share Posted May 27, 2011 Para, What is the error message you are receiving after you tried to install one of the contributions ? Which one was it ? Chris Quote Link to comment Share on other sites More sharing options...
parawebo Posted May 27, 2011 Author Share Posted May 27, 2011 (edited) I found this addon, but applying the code did not work, because it is compatible with an older version. Thanks ======================================================================= This bug fix will remove BUY NOW button when customer is not loged in: edit file in: /catalog/includes/modules/product_listing.php find: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; and replace with: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; if (( STORE_SHOW_GUESTS_PRICES == 'true' ) && (! tep_session_is_registered('customer_id') ) ) { } else { $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } find in /catalog/includes/modules/products_new.php around line 90 <td align="right" valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td> and replace with <td align="right" valign="middle" class="main"><?php if (( STORE_SHOW_GUESTS_PRICES == 'true' ) && (! tep_session_is_registered('customer_id') ) ) { } else { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; } ?></td> ===================================================================== Edited May 27, 2011 by parawebo Quote Link to comment Share on other sites More sharing options...
apolyshow Posted May 29, 2011 Share Posted May 29, 2011 Did you find anything? Ialso want it... Thanks.. Quote One amateur made the Arc, 5.000 pro made the Titanic... Link to comment Share on other sites More sharing options...
apolyshow Posted May 29, 2011 Share Posted May 29, 2011 Solved hear http://addons.oscommerce.com/info/601 .There is addon for 2.3.1 the 4.3 version. I dont, know if the others is ok with 2.3.1 but now this one seems to work.. Quote One amateur made the Arc, 5.000 pro made the Titanic... 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.