Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

No Stock No Checkout


poj

Recommended Posts

I've got problem with No_Stock_No_checkout contribution

No Stock No checkout

 

When I try to edit the product_info.php, I can't find

                <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

I found this instead

            <td class="main" align="right"><input type="hidden" name="products_id" value="<?php echo $product_info_values['products_id']; ?>"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

So I try to edit it like this

                <?php

        if ($product_info['products_quantity'] <=0) { ?>

            <td class="main" align="right"><input type="hidden" name="products_id" value="<?php echo $product_info_values['products_id']; ?>"><?php echo tep_image_button('button_in_cart_na.gif', IMAGE_BUTTON_IN_CART_NA); ?></td>

          <?php

        } else { ?>

            <td class="main" align="right"><input type="hidden" name="products_id" value="<?php echo $product_info_values['products_id']; ?>"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

          <?php

        } ?>

 

But the result is on product info page, every product shows that it's "not avaliable". Eventhough the stock quantity is higher than 0. And I can't drop the product into shopping cart.

 

What've I done wrong?

How to solve this problem?

Link to comment
Share on other sites

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...