Jump to content
Sign in to follow this  
poj

No Stock No Checkout

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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×