Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

discontinued items and out of stock, disabling check out....


Guest

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...