I really need to show the Availability of stock .My problem is a little bit complicated..I modified so that for my “Not in stock” Products the “Add to cart button” to apear .. .But it’s not working . Actually i need to change this functionality (Not in stock) into “Available to order” which means even thought my product in not in stock it could be added to cart .
In sigle_product.php I removed the <?php if(wpsc_product_has_stock()) : ?> option from cart option and still not working… This is the code..Can you help me, pleaaase ?
<?php if((get_option(‘hide_addtocart_button’) == 0) && (get_option(‘addtocart_or_buynow’) !=’1′)) : ?>
<?php if(wpsc_product_has_stock()) : ?>
<div class=”wpsc_buy_button_container”>
<?php if(wpsc_product_external_link(wpsc_the_product_id()) != ”) : ?>
<?php $action = wpsc_product_external_link( wpsc_the_product_id() ); ?>
<input class=”wpsc_buy_button” type=”submit” value=”<?php echo wpsc_product_external_link_text( wpsc_the_product_id(), __( ‘Buy Now’, ‘wpsc’ ) ); ?>” onclick=”return gotoexternallink(‘<?php echo esc_url( $action ); ?>’, ‘<?php echo wpsc_product_external_link_target( wpsc_the_product_id() ); ?>’)”>
<?php else: ?>
<input type=”submit” value=”<?php _e(‘Add To Cart’, ‘wpsc’); ?>” name=”Buy” class=”wpsc_buy_button” id=”product_<?php echo wpsc_the_product_id(); ?>_submit_button”/>
<?php endif; ?>
<div class=”wpsc_loading_animation”>
<img title=”Loading” alt=”Loading” src=”<?php echo wpsc_loading_animation_url(); ?>” />
<?php _e(‘Updating cart…’, ‘wpsc’); ?>
</div><!–close wpsc_loading_animation–>
</div><!–close wpsc_buy_button_container–>
<?php else : ?>
<p class=”soldout”><?php _e(‘This product has sold out.’, ‘wpsc’); ?></p>
<?php endif ; ?>
<?php endif ; ?>