• Resolved 00andre00

    (@00andre00)


    Hallo zusammen,

    ich habe ein Problem mit der Kassenseite:

    I’m using the divi theme builder with woocommerce and the germanized plugin. I’m trying to redesign the table ‘review-order’ in order to display separate rows for product, single price, quantity and subtotal.

    For starters, I tried to add the quantity row. This is what I did:

    defined( 'ABSPATH' ) || exit;
    ?>
    <table class="shop_table woocommerce-checkout-review-order-table">
        <thead>
            <tr>
                <th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
                <th class="product-quantity"><?php esc_html_e( 'quantity', 'woocommerce' ); ?></th>
                <th class="product-total"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
            </tr>
        </thead>
        <tbody>
            <?php
            do_action( 'woocommerce_review_order_before_cart_contents' );
    
            foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
                $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
    
                if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
                    ?>
                    <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
                        <td class="product-name">
                            <?php echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) ) . '&nbsp;'; ?>
                            <?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '&times;&nbsp;%s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
                            <?php echo wc_get_formatted_cart_item_data( $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
                        </td>
                        <td class="product-quantity">
                            <?php echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) ) . '&nbsp;'; ?>
                            <?php echo apply_filters ('woocommerce_checkout_cart_item_quantity' ' <strong class="product-quantity">' . sprintf( '&times;&nbsp;%s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> 
                        </td>
                        <td class="product-total">
                            <?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
                        </td>
                    </tr>
                    <?php
                }
            }

    Ich habe au?erdem das Checkout-Template aus Germanized entsprechend versucht anzupassen. Beides führte nicht zum Erfolg. Die Kassenseite zeigt keine ?nderungen.

    Cache is cleared, I also added theme support to my funktions.php in my child theme.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author vendidero

    (@vendidero)

    Hi,

    ich kann dir da leider nur bedingt helfen. M?glicherweise überschreibt Divi etwaige Woo-Templates. Germanized sorgt standardm??ig dafür, dass ein (mit der Button-L?sung kompatibles) Template für die Tabelle genutzt wird. Das liegt in: https://github.com/vendidero/woocommerce-germanized/blob/master/templates/checkout/review-order-product-table.php

    Das Template kann, wie im Header der Datei beschrieben, auch im (Child-) Theme überschrieben werden. Teste das im Zweifel einfach mit einem Default-Theme.

    Grü?e

    Thread Starter 00andre00

    (@00andre00)

    Hi,

    danke für die Antwort. Ich habe es zun?chst mit dem Standardtemplate (review-order-product-table.php) von Germanized versucht und nur das Template von Woo angepasst. Als sich keine ?nderung zeigte, habe ich das Germanized Template ins Childtheme gepackt. Beides bringt nichts.

    Auch mit dem Standardtheme von Divi und eines angepassten Templates gibt es keine Resultate. Die Shopseite ist fast fertig, es gibt nur noch 2-3 Kleinigkeiten- aber die sind so wichtig, dass ohne eine L?sung ein Wechsel zu a) einem Standardtheme (X-Store) oder b) zu Shopware erwogen wird- 80h Arbeit für die Katz :-/

    Viele Grü?e

    Plugin Author vendidero

    (@vendidero)

    Hi,

    im Zweifel solltet ihr euch an den Divi-Support wenden. Wie habt ihr das Germanized-Template denn genau überschrieben? So wie in der template-Datei von Germanized beschrieben? Au?erdem solltet ihr im Zweifel einfach mal Test-Ausgaben, sowohl im Original-Template von Germanized als auch im WooCommerce-Ordner vornehmen und schauen, ob eine Ausgabe überhaupt erfolgt, d.h. das Template verwendet wird. Falls nicht, stammt es vermutlich irgendwoher aus Divi.

    PS: Habe mal den Divi-Code etwas durchst?bert. Dort findet sich unter Divi/includes/builder/feature/woocommerce/templates/checkout einiges, das für euch relevant sein dürfte ??

    Grü?e

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Kasse – review-order Table anpassen’ is closed to new replies.