Home Forums WoodMart support forum Split: Stock lable

Split: Stock lable

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #413535

    sondredoli
    Participant

    Hi,
    We have the same issue here. Is there an fix for this?

    When we select “After title” for stock status we will get “In stock” even if the stock is 0.
    (If we accept backorders).

    #413673

    Hello,

    Please insert the site admin access into the Private content below the message area. We will take a closer look at the case.

    Please confirm I can deactivate plugins and switch to the parent theme.

    Best Regards

    #417251

    sondredoli
    Participant

    I will send you login.

    #417414

    Hello,

    Please enable #414641 and let us know if the problem remains.

    Find our documentation tutorial about this here: https://xtemos.com/docs-topic/automatic-patcher/

    Best Regards

    #417418

    sondredoli
    Participant

    It looks like the problem still remains. I tried to enable patch 414641 both on the staging site, and the live site.

    But the issue is still there.

    #417435

    Hello,

    I will submit the case to our developers for deeper investigation.

    We will get back to you soon.

    Best Regards

    #417701

    Hello,

    Please check if the stock status is set properly: https://monosnap.com/file/RXE5RviwTEWTy8lYMprnEQ5dqKt9l2

    Please send the product URL which is out of stock in admin and does not have the label.

    Best Regards

    #417987

    sondredoli
    Participant

    When stock is set to 0, and backorder is set to “Notify” it still say that the product is in stock.

    I will attach photos and links in private.

    Attachments:
    You must be logged in to view attached files.
    #417990

    sondredoli
    Participant

    And here you have link where you can see the backorder-status.

    Attachments:
    You must be logged in to view attached files.
    #418203

    Hello,

    Please add this code to the functions.php of the child theme:

    if ( ! function_exists( 'woodmart_stock_status_after_title' ) ) {
    	/**
    	 * Output stock status after title.
    	 *
    	 * @return void
    	 */
    	function woodmart_stock_status_after_title() {
    		if ( 'after_title' !== woodmart_get_opt( 'stock_status_position' ) ) {
    			return;
    		}
    
    		global $product;
    
    		$stock_status   = $product->get_availability();
    		$wrapper_class  = 'stock';
    		$wrapper_class .= 'instock' === $product->get_stock_status() ? ' in-stock' : ' out-of-stock';
    		$wrapper_class .= ' wd-style-default';
    
    		if ( ! empty( $stock_status['availability'] ) ) {
    			$stock_status_text = $stock_status['availability'];
    		} else {
    			$stock_status_text = esc_html__( 'In stock', 'woodmart' );
    		}
    
    		woodmart_enqueue_inline_style( 'woo-mod-stock-status' );
    
    		?>
    			<p class="wd-product-stock <?php echo esc_attr( $wrapper_class ); ?>">
    				<?php echo wp_kses( $stock_status_text, 'true' ); ?>
    			</p>
    		<?php
    	}
    }

    If you have any questions please feel free to contact us.

    Best Regards

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)