1

我正在为我的网上商店使用 woocommerce 和 wpml,效果很好。但我刚刚安装了“打印发票和装箱单”插件来打印发票。但是我的插件和翻译有两个问题(或缺少它..)

检测到域和字符串......但不是实际内容......所以我所有的发票都是英文的。不是真正的问题,但如果翻译能够工作,那就太好了。

现在是大问题。我可以接受这样一个事实,即我的发票是英文的,但货币没有转换……它在后端/仪表板数据中看起来不错,但是当我想打印时……我的基础货币符号显示在发票中。这会导致一个大问题,因为金额不会相应改变 1 欧元变成 1 瑞典克朗(汇率为 0,11)!

我找不到任何设置,我什至一直在插件代码中寻找解决方案。

注意:我还联系了 WooTheme 和 wpml 支持。他们还没有回答我。

有没有像 get_order_currency() 这样的 PHP 代码片段;?> 或其他方式来定义订单货币?

这是生成产品价格的代码。(仅问题部分*)

<?php if ( $action == 'print_invoice') : ?>
    <table>
        <thead>
            <tr>
                <th scope="col" style="color: #fff; border: 1px solid #FFFFFF; text-align:left; width: 15%; background-color:#00cc00; padding: 3px;"><?php _e('SKU', 'woocommerce-pip'); ?></th>
                <th scope="col" style="color: #fff; border: 1px solid #FFFFFF; text-align:left; width: 30%; background-color:#00cc00; padding: 3px;"><?php _e('Product', 'woocommerce-pip'); ?></th>
                <th scope="col" style="color: #fff; border: 1px solid #FFFFFF; text-align:left; width: 25%; background-color:#00cc00; padding: 3px;"><?php _e('Quantity', 'woocommerce-pip'); ?></th>
                <th scope="col" style="color: #fff; border: 1px solid #FFFFFF; text-align:left; width: 10%; background-color:#00cc00; padding: 3px;"><?php _e('A Price', 'woocommerce-pip'); ?></th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <th colspan="3" scope="row" style="text-align:right;"><?php _e('Moms(25%):', 'woothemes'); ?></th>
                <td style="text-align:left;"><?php echo woocommerce_price($order->get_total_tax()); ?></td>
            </tr>
            <?php foreach ( $order->get_order_item_totals() as $key => $total ) : ?>        
            <tr>
                <th colspan="3" scope="row" style="text-align:right;"><?php echo $total['label']; ?></th>
                <td style="text-align:left;"><?php echo $total['value']; ?></td>
            </tr>
            <?php endforeach; ?>
4

0 回答 0