Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Ivan

    (@zettz)

    It works now,
    I just need to add the !important

    Thank you.

    Thread Starter Ivan

    (@zettz)

    Hi there, I use “Eightstore-lite”, but the variable.php is woocommerce default.

    With added function:

    add_filter( 'woocommerce_get_availability', 'stock_custom_get_availability', 1, 2);
    function stock_custom_get_availability( $availability, $_product ) {
        
        // In Stock Text
        if ( $_product->is_in_stock() ) {
            $availability['availability'] = __('In Stock', 'woocommerce');
        }
        // Out of Stock Text
        if ( ! $_product->is_in_stock() ) {
            $availability['availability'] = __('<strong>Need restock? Call us</strong>', 'woocommerce');
        }
        return $availability;
    }
    Thread Starter Ivan

    (@zettz)

    Thx Iorro, the solution work very well.

    As for the first, I’m gonna work at it, so my customer order details can have their detailed information when my site online.

    At email-order-details.php, look for this line:
    <th class="td" scope="col" style="text-align:left;"><?php _e( 'Qty', 'woocommerce' ); ?></th>
    then add this below it:
    <th class="td" scope="col" style="text-align:left;"><?php _e( 'Price', 'woocommerce' ); ?></th>
    if somehow the table structure broken, you can fix it by changing the table colspan in email-order-details.php at <tfoot>

    Then at email-order-items.php, look for this line:
    <td class="td" style="text-align:left; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;"><?php echo apply_filters( 'woocommerce_email_order_item_quantity', $item['qty'], $item ); ?></td>

    right below it, you can add this:

    <?php
    $item_total = $order->get_line_subtotal( $item );
    $qty = $item['qty'];
    $unit_price = number_format($item_total/$qty, 2, ',', '.' );
    ?>
    <td class="td" style="text-align:left; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;"><?php echo get_woocommerce_currency_symbol() . ' ' . apply_filters( 'woocommerce_email_order_item_quantity', $unit_price . ' each', $item ); ?></td>

    The output will be more or less similar to your image link above.
    Output

    Hope this will help.

    Hi there, you mean product single price * qty, right?

    If that’s what you mean, maybe you can try this:

    <?php
    $item_total = $order->get_line_subtotal( $item );
    $qty = $item['qty'];
    $unit_price = $item_total/$qty;
    ?>
    <td class="td" style="text-align:left; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;"><?php echo apply_filters( 'woocommerce_email_order_item_quantity', $unit_price . ' * ' . $item['qty'], $item ); ?></td>

    You can put the code at email-order-items.php

    • This reply was modified 7 years, 8 months ago by Ivan. Reason: additional information
    Thread Starter Ivan

    (@zettz)

    I just updated the plugins and it’s solved now, the link show space now at the facebook page like this (Link: https://www.domain.com)

    thank you.

    Thread Starter Ivan

    (@zettz)

    Hi again,
    here’s the link for my question about Link

    Link

    thank you.

    • This reply was modified 7 years, 8 months ago by Ivan.

    Just copy the dashboard.php from woocommerce to your theme and edit it.
    For example: “themes/your-theme/woocommerce/myaccount/”
    Then look for that line. Thats all.

    Thread Starter Ivan

    (@zettz)

    Nvm, I found it after creating custom css for that.

Viewing 9 replies - 1 through 9 (of 9 total)