Guest Posted March 8, 2007 Share Posted March 8, 2007 hi i have a few items that go discontinued i need to keep these 'discontinued' items on my site but need disable the checkout and say 'discontinued' (due to no more product lines of the particular product) however with out of stock items i need to keep these items able to go through the checkout, i do not use the oscommerce out of stock features, i simply update the product listing with a out of stock notice, due to the stocks normally come back in within 2-5 days, any help will be VERY much apresheated ! please note i am not a advanced at this stuff ! http://shop.kb-online.co.uk Link to comment Share on other sites More sharing options...
khime Posted March 9, 2007 Share Posted March 9, 2007 You need to insert another variable products_checkout (tinyint(1)) in products table using php my admin or something so you can set true/false to disable add to cart button so that the customer can see the item but cant add to cart. Default should be 1 (i.,e true as most new items you want it to show) In the admin/categories.php add disable checkout selector based on the product_checkout variable (should be similar to the current out of stock radio button selector) In product_info.php retrieve the variable, look for $product_info_query = tep_db_query("select p.products_id, pd.products_name, etc add p.products_checkout, somewhere in the query In product_info.php you can then set a function for the buy it now button to display only if product_checkout is true if ($product_info['products_checkout']==1){ <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } I have not done this for my store but I hope its correct. Maybe it will need some correction. Link to comment Share on other sites More sharing options...
Guest Posted March 9, 2007 Share Posted March 9, 2007 You need to insert another variable products_checkout (tinyint(1)) in products table using php my admin or something so you can set true/false to disable add to cart button so that the customer can see the item but cant add to cart. Default should be 1 (i.,e true as most new items you want it to show) In the admin/categories.php add disable checkout selector based on the product_checkout variable (should be similar to the current out of stock radio button selector) In product_info.php retrieve the variable, look for $product_info_query = tep_db_query("select p.products_id, pd.products_name, etc add p.products_checkout, somewhere in the query In product_info.php you can then set a function for the buy it now button to display only if product_checkout is true if ($product_info['products_checkout']==1){ <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } I have not done this for my store but I hope its correct. Maybe it will need some correction. rite... thanks very much, :huh: but a bit confused ! any chance of better instructions ? i have my php admin, so will this display 'discounted' or a button stating that, with no link? Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2007 Share Posted March 10, 2007 any one help !? tester store http://kb-online.co.uk/shoptester Link to comment Share on other sites More sharing options...
khime Posted March 10, 2007 Share Posted March 10, 2007 Sorry you didnt understand my post. It was only a quick thought how to do it roughly. There is actually a contribution for this which Ive found http://www.oscommerce.com/community/contributions,4884 Should make your life easier!! Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2007 Share Posted March 10, 2007 Sorry you didnt understand my post. It was only a quick thought how to do it roughly. There is actually a contribution for this which Ive found http://www.oscommerce.com/community/contributions,4884 Should make your life easier!! thanks ill just change the text and images to discontinued Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.