• Resolved atthu

    (@atthu)


    Hi, I’m using custom code for product archive. I want to add a class to the product li, when the product is pre order. Something like below

    $out_of_stock_class = $product->is_in_stock() ? ” : ‘out-of-stock’;

    ‘out_of_stock_class’ => $out_of_stock_class,

    echo ‘<li class=”‘ . $product[‘out_of_stock_class’] . ‘”>’;

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    We regret to inform you that we are unable to provide support for this custom code within our plugin. If you have any questions or concerns regarding the standard features of our plugin, please don’t hesitate to let us know, and we’ll be happy to assist you.

    Best regards.

    Thread Starter atthu

    (@atthu)

    How can i differentiate preorder products and normal ones. Is there any array

    Checked by echoing $products. Cant find any

    Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    You can distinguish preorder products and normal ones using the product metadata:

    • For simple product: _simple_preorder
    • For variable product: _wpro_variable_is_preorder

    Please let us know if you have any other concerns about the plugin.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding class to the product archive’ is closed to new replies.