RE: Greyed out "in cart" button if out of stock

eureka <[email protected]>
Newsgroups gmane.comp.web.oscommerce.tips
Message-ID <8fd3e3905e0199efed507e2e6b61a0a4@osCommerce-Forums>
This message was sent from: Tips and Tricks
http://forums.oscommerce.com/viewtopic.php?p=187750#187750
----------------------------------------------------------------

Also need to do the same treatment for .. /includes/modules/products_new.php (about line 35).

[color=green]
    <td align="right" valign="middle" class="main"><?php

    if (tep_get_products_stock($products_new_array[$i]['id'])> 0)
    {
      echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action'))
      . 'action=buy_now&products_id=' . $products_new_array[$i]['id'], 'NONSSL') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>';
    }
    else
    {
      echo tep_image_button('button_in_cart_faded.gif', IMAGE_BUTTON_IN_CART);
    }
    
    ?></td>
[/color]

Regards,
Mark.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.