mardi 16 février 2016

Woocommerce Print Invoices & Packing lists, Currency-Switch malfunction

i'm using woocommerce and wpml for my web-shop and it works great. But i just installed the "Print Invoices & Packing lists" plugin to print invoices. But i have two issues with the plugin and the translation (or lack of it..)

The domain is detected and the strings.. but not the actual content... So all my invoices are in english. Not really a problem but it would be nice if the translation would work.

Now the big issue. I can live with the fact that my invoices is in english but the currency don't switch... it looks fine in backend/dashboard data but when i want to print.. my base currency symbol shows in the invoice. this causes a big problem because the amount don't change accordingly 1€ becomes 1SEK (the exchange rate is 0,11)!

I cant find any settings and i have even been in the plugin code to look for a solution.

Note: I have also contacted WooTheme and wpml at there support. They haven't answered me yet.

is there nay PHP code snippet like get_order_currency(); ?> or some other way to define the order currency?

Here is the code that generate the product prices. (only problem part*)

<?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; ?>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire