Created
September 17, 2013 15:03
-
-
Save agusmu/6595579 to your computer and use it in GitHub Desktop.
PrimaShop (WPEC) - Simple Stock Availability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* BEGIN - STOCK AVAILABILITY */ ?> | |
<?php if( !prima_get_setting('wpec_product_stock_hide') ): ?> | |
<?php if(wpsc_product_has_stock()) : ?> | |
<?php if(wpsc_product_remaining_stock()) : ?> | |
<div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="in_stock"><?php printf( __('%s remaining stock', 'primathemes'), wpsc_product_remaining_stock()); ?></div> | |
<?php else : ?> | |
<div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="in_stock"><?php _e('Product in stock', 'primathemes'); ?></div> | |
<?php endif; ?> | |
<?php else: ?> | |
<div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="out_of_stock"><?php _e('Product not in stock', 'primathemes'); ?></div> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php /* END - STOCK AVAILABILITY */ ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* BEGIN - STOCK AVAILABILITY */ ?> | |
<?php if( !prima_get_setting('wpec_product_stock_hide') ): ?> | |
<?php if(wpsc_product_has_stock()) : ?> | |
<div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="in_stock"><?php _e('Product in stock', 'primathemes'); ?></div> | |
<?php else: ?> | |
<div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="out_of_stock"><?php _e('Product not in stock', 'primathemes'); ?></div> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php /* END - STOCK AVAILABILITY */ ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment