• Resolved Daniel Godoi Wagner

    (@dannwagner)


    Dear friend, please, could you help me to put the flavours chosed at the printer report of each sale?

    (example attached here: https://pizzavenus.com.br/wp-content/uploads/2024/06/print-invoice-pizza-venus.jpg)

    Bellow is the php code where I need to put this add:
    .order-items .order-pizza-meta-list,

    .display-meta .order-pizza-meta-list,

    display: yes;

    display: active;

    .order-items .woocommerce-Price-amount,



    .display-meta .woocommerce-Price-amount,

    display: yes;

    display: active;

    .order-items .order-pizza-meta-list,



    .display-meta .order-pizza-meta-list,

    display: yes;

    display: active;

    .order-items .order-line-items,



    .display-meta .order-line-items,

    display: yes;

    display: active;



    .order-items .woocommerce-order-items,

    .display-meta .woocommerce-order-items,

    display: yes;

    display: active;

    .order-items .woocommerce-order-items-wrapper,



    .order-items .woocommerce-order-items-wrapper,

    display: yes;

    display: active;

    .woocommerce-order-items-wrapper,

    .order-pizza-meta-list {

    As you can see, my knowledge about coding is very limited. I tried to adapt others functions and tried to identify the fields envolved. But not sure about which one is that!

    The plugin that collects the fields is that: https://www.ads-software.com/plugins/pizza-builder-for-woocommerce/

    I already tried to talk with the owner, but he could not help me. Thanks a lot for helping!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @dannwagner,

    Thank you for providing this information.

    I will check our plugin with the Pizza Builder plugin you mentioned. I will check at which places the fields from the Pizza builder plugin appear and then we will see how we can show them to our invoice. I will check and let you know the update of the same.

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    Thanks a lot for helping! A great weekend!

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    I’m very ansious about your code. Thanks a lot!

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    @priyankajagtap any news about it, please, friend?

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    @priyankajagtap Talking to the creator of the plugin Pizza Builder, he could identify the fields that I need to show at the print invoice. Can you help me now with the function. I did one with chat gpt but is not working:

    FIELDS TO SHOW: display_meta_thankyou_main($item_id, $item, $order) from includes/pizza-checkout.php

    FUNCTION CREATED WITH CHAT GPT:

    function custom_order_meta_fields( $fields, $order ) {
    $new_fields = array();

    // Verifique se a fun??o display_meta_thankyou_main existe
    if ( ! function_exists( 'display_meta_thankyou_main' ) ) {
        error_log( 'A fun??o display_meta_thankyou_main n?o está definida.' );
        return $fields;
    }
    
    foreach ( $order->get_items() as $item_id => $item ) {
        // Verifique se $item_id e $item s?o válidos
        if ( ! $item_id || ! $item ) {
            error_log( 'Item inválido encontrado no pedido.' );
            continue;
        }
    
        $meta_value = display_meta_thankyou_main($item_id, $item, $order);
        if ( $meta_value ) {
            $new_fields['meta_thankyou_main_' . $item_id] = array(
                'label' => 'Sabores escolhidos:',
                'value' => $meta_value
            );
        } else {
            error_log( 'Nenhum valor meta encontrado para o item ' . $item_id );
        }
    }
    
    return array_merge( $fields, $new_fields );

    }
    add_filter( ‘wcdn_order_info_fields’, ‘custom_order_meta_fields’, 10, 2 );

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    @priyankajagtap can you, please, help me here?

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    I’m proud to share that the owner of the plugin pizza builder already made a properly function to integrate both (pizza builder plus print invoice for woocommerce) and it really working. It can be seen at th pizza builder forum. Thanks for trying!

    Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @dannwagner,

    First of all, sorry for the delayed response to this. Somehow, I missed your forum and hence the delay in response.

    Glad to know that the author of the Pizza Builder plugin helped with you with this to resolve the problem. The thing is our developer was occupied with one of our other plugin updates related tasks hence he was unable to check on this with the Pizza Builder plugin.

    Do let us know if you have any further queries.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘pizza builder with print invoice manual show flavours of pizza fields’ is closed to new replies.