Riccardo

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 59 total)
  • Author
    Posts
  • in reply to: Prevent translation update #1119268
    Riccardo
    Participant

    This reply is private.

    in reply to: Prevent translation update #1117356
    Riccardo
    Participant

    Hi Geoff,
    sorry. Now I add the code in functions.php of my child theme.
    but the result is the same.
    the translations don’t work if I put “the-events-calendar-it_IT.mo” and “the-events-calendar-it_IT.po” in the wp-content/languages/ folder

    thanks

    in reply to: Prevent translation update #1117236
    Riccardo
    Participant

    This reply is private.

    in reply to: Prevent translation update #1116291
    Riccardo
    Participant

    Hi Geoff,
    I put this code in my functions.php

    unload_textdomain( 'the-events-calendar' );
    load_plugin_textdomain( 'the-events-calendar', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );

    I create wp-content/languages/the-events-calendar/

    I put the “the-events-calendar-it_IT.po” and “the-events-calendar-it_IT.mo” in this folder but it doesn’t work
    I put I put the “the-events-calendar-it_IT.po” and “the-events-calendar-it_IT.mo” in the sub folder wp-content/languages/the-events-calendar/languages/ it doesn’t work

    I create wp-content/languages/plugins/the-events-calendar and it doesn’t work
    I create wp-content/languages/plugins/the-events-calendar/languages/ and it doesn’t work

    What is my error?
    thanks

    in reply to: Prevent translation update #1115661
    Riccardo
    Participant

    Hi Geoff,
    thanks, but where I have to put your code?
    thanks

    in reply to: order complete after paypal payment #1109612
    Riccardo
    Participant

    Thanks Hunter!

    in reply to: order complete after paypal payment #1109160
    Riccardo
    Participant

    Hi,
    I have a problem.
    If I add your code, I have to return to my site to complete order.
    If I use the other plugin I don’t have to return.
    what is the best solution?
    thanks

    in reply to: order complete after paypal payment #1109158
    Riccardo
    Participant

    Hi,
    thanks Hunter.
    I try to add this with the plugin “WooCommerce – Autocomplete Orders”.
    now in the events ticket plus I don’t have flag “Try to set the status of new ticket orders to “complete” automatically” but I add the code to the functions.php

    /**
     * Auto Complete all WooCommerce orders.
     */
    add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
    function custom_woocommerce_auto_complete_order( $order_id ) { 
        if ( ! $order_id ) {
            return;
        }
    
        $order = wc_get_order( $order_id );
        $order->update_status( 'completed' );
    }

    And now it works.
    Is it the right mode or I have to flag “Try to set the status of new ticket orders to “complete” automatically” in the ticket options?
    thanks

    in reply to: Display "Attendee Information" on email confirmation #1106835
    Riccardo
    Participant

    Hi Cliff,
    thanks.
    now the right code is it
    thanks

    add_action( 'woocommerce_email_order_details', 'kia_custom_order_details', 5, 4 );
    function kia_custom_order_details( $order, $sent_to_admin, $plain_text, $email ){
    
    	// se email è non dell'utente che ha comprato la data
        if( $email->id != "customer_processing_order" ){
    
            $course_date = null;
    
            // the loop : recupero gli oggetti comprati dall'ordine
            $items = $order->get_items();
    
         
            	   
    		//recupero id dell'ordine
    		$ordine_id = $order->id;
    		   
    	   
    		// recupero tutti i particolare del biglietto per poi trovare altri campi personalizzati	  
    		$meta_ticket= get_post_meta($ordine_id, '_tribe_tickets_meta', true);
    		
    		// NOME PARTECIPANTE - TEMPO SUL GIRO - CILINDRATA MOTO
    		
    		//Array con nome partecipante
    		$nome_partecipante = array();
    		 //Array con tempo sul giro
    		$tempo_sul_giro = array();
    	 	//Array con cilindrata moto
    		$cilindrata_moto = array();
    		
    		   		   
    		   foreach ($meta_ticket as $info_ticket){
    			
    					$info_ticket_fields = $info_ticket;
    			
    						foreach ($info_ticket_fields as $single_field){
    								$nome_partecipante[] = $single_field['nome-partecipante'];
    								$tempo_sul_giro[] = $single_field['tempo-sul-giro'];
    								$cilindrata_moto[] = $single_field['cilindrata-moto'];
    								
    						
    				
    				//chiudo il secondo foreach
    				}
    		
    		// chiudo il primo foreach		
    		}
       		
    		//conto gli elementi dell'array
    		$conta_numero_partecipanti = count($nome_partecipante);
    		$conta_tempo_sul_giro = count ($tempo_sul_giro);
    		$conta_cilindrata_moto = count ($cilindrata_moto);
    		
    	
    		if (($conta_cilindrata_moto>0)&&($conta_numero_partecipanti>0)&&($conta_tempo_sul_giro>0)){
    			
    		echo 'Ecco i dettagli dei biglietti: <br>';
    		
    		for($indice=0; $indice<$conta_numero_partecipanti; $indice++){
    			echo '	<strong>Nome: </strong>'.$nome_partecipante[$indice].'<br>
    					<strong>Tempo sul giro: </strong>'.$tempo_sul_giro[$indice].'<br>
    					<strong>Cilindrata moto:</strong> '.$cilindrata_moto[$indice].'<br><br>';
    			
    
    		}
    			
    			
    		}
    		
    		
    				
    // chiudo l'if				
    }
    	
    //chiudo la funzione	
    }
    • This reply was modified 9 years, 11 months ago by Riccardo.
    in reply to: Display "Attendee Information" on email confirmation #1106724
    Riccardo
    Participant

    Hi Cliff,
    the first foreach is for the product in the order
    the second foreach is for the meta of product
    the third foreach is for the ATTENDEE INFORMATION in the meta of product.

    Where I am wrong ?
    thanks

    in reply to: Display "Attendee Information" on email confirmation #1106407
    Riccardo
    Participant

    Hi Cliff,
    the foreach twice is for the multidimensional array.
    if I don’t I don’t have the datas.
    Have you a suggestion?
    thanks

    My final target is retrieve the data for each ticket in the table summary.
    thanks

    in reply to: Display "Attendee Information" on email confirmation #1105947
    Riccardo
    Participant

    Hi Cliff,
    this is the code I do:

    add_action( 'woocommerce_email_order_details', 'kia_custom_order_details', 5, 4 );
    function kia_custom_order_details( $order, $sent_to_admin, $plain_text, $email ){
    
    	
        if( $email->id != "customer_processing_order" ){
    
            // retrieve items
            $items = $order->get_items();
    
            foreach ( $items as $item ) {
              			
    			//recupero id del prodotto venduto - retrieve product id
                $product_id = $item['product_id'];
            	   
    		   //recupero id dell'ordine - retrieve order id
    		   $ordine_id = $order->id;
    		   
    		  
    		   $prova2 = get_post_meta($ordine_id, '_tribe_tickets_meta', true);
    		
    			   	   
    		   
    		   foreach ($prova2 as $pette){
    			
    			$nome_partecipante = $pette;
    			
    			
    				foreach ($nome_partecipante as $merda){
    					
    					echo $merda['nome-partecipante'].' - '.$merda['tempo-sul-giro'].' - '.$merda['cilindrata-moto'].'<br>';
    				}
    			
    			
    		   }
    		   
    		}
        }
    	
    	
    }

    nome-partecipante – tempo-sul-giro – cilindrata-moto
    are my attendee information for the ticket, but if this EVENT has more tickets, for example 2 tickets, I have a duplicate result:
    partecipo – 1,45 – 9000
    partecipo – 1,45 – 9000

    because the ticket in the events are two different but only one has a special fields.
    how can I display only the information once?

    thanks

    in reply to: Display "Attendee Information" on email confirmation #1105857
    Riccardo
    Participant

    Hi Cliff,
    in the files you list me there is not the function “get_attendees()”
    So, how can I retrieve the Attendee Information I add in the ticket info?
    thanks

    in reply to: Display "Attendee Information" on email confirmation #1105321
    Riccardo
    Participant

    Hi Cliff PD,
    so, how can I retrieve the attendee information?
    there are some classes or function?
    thanks

    in reply to: Disable "tribe-tickets-attendees-list-optout-woo" #1104996
    Riccardo
    Participant

    Hi,
    in my case the best solution is hide with css.
    thanks

Viewing 15 posts - 31 through 45 (of 59 total)