Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Availability


surfalot

Recommended Posts

^^^^^

 

 

I'll still looking for help for changing the text style on product_info and shopping_cart though.

 

I am not very good in php, but you could try to modify this code. It works separately from this contribution. If you have two products in your shopping cart - one is already in stock, the other will be available in a week, it shows no message for the first one and "item in stock:" and date for the second one.

 

in shopping_cart.php find

 

$products_name .= $stock_check;
       }
     }

 

add bellow:

// show availability

$products_query = tep_db_query("select products_date_available from " . TABLE_PRODUCTS . " p where products_id = '" . $products[$i]['id'] . "'");
$product_fetch = tep_db_fetch_array($products_query);
$products_descript = $product_fetch['products_date_available']; 			 
if 	($products_descript > date('Y-m-d H:i:s')) {
$products_name .= '<br>Item in stock: <small> ' . $products_descript . '</small>';
}					
// show availability

 

it is just slightly modified code from description in cart contribution.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 127
  • Created
  • Last Reply

Top Posters In This Topic

thanks for the reply Jitty25 but I have sort of solved the problem by crateing an image for each out of stock item and removed the text as it now within an image.

 

Another thing I am desperate to do is to get the availability status on the product listing. Anyone know how to do this?

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...