Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product availability


andro

Recommended Posts

Posted

Hi,

on my mainpage I?m using featured_products.php.

I would like to show the product availability therefore I added the following code to my ctalog/includes/modules/featured_products.php

<?php
$prod_quantity = tep_get_products_stock($products_id);

if ($prod_quantity == "B") print "5-8 days";
elseif ($prod_quantity >0) print "1-4 days";
else					   print "not available";
?>

Although there are enough items in stock, "not available" is shown for all products ???

 

I need your help, please.

Thanks a lot.

Posted

Now it works in the featured_products.php.

I have changed

$prod_quantity = tep_get_products_stock($products_id);

into

$prod_quantity = tep_get_products_stock($featured_products_array[$i]['id']),

Special thanks to "infobroker".

 

I finally would like to show the product availability in the specials.php and the products_new.php.

Therefore I changed the code into

$prod_quantity = tep_get_products_stock ($specials['products_id']);

and

$prod_quantity = tep_get_products_stock ($products_new['products_id']);

 

The product availability is now shown but also the number of products in stock. But I only want to show the estimated shipping time.

 

What do I have eto change ???

Archived

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

×
×
  • Create New...