Forum Replies Created

Viewing 15 replies - 91 through 105 (of 122 total)
  • Thread Starter Troglos

    (@troglos)

    Great it works.
    Thank you.

    I wonder if there is a way to put it in functions.php

    Thread Starter Troglos

    (@troglos)

    hi Chrystl,

    that’s exactly what I posted before.
    but that appends the lang at the end of the url, instead of adding it like this:
    mywebsite.it/en?unonce=0266f30700&uformid=126…..

    Thread Starter Troglos

    (@troglos)

    Nobody is using Polylang with Ultimate WP Query Search Filter?

    I’ve managed to add a hidden lang value with

    add_action('uwpqsf_form_mid', 'my_search_form');
    function my_search_form($html) {
     $html = '<input type="hidden" name="lang" value="'. pll_current_language().'"/>';
     echo $html;
    }

    but I need it here mywebsite.it/en?unonce=0266f30700&uformid=126…..
    not appended at the end of the url

    suggestions?

    Troglos

    (@troglos)

    Same thing is happening to me.
    Memory is already 256Mb.
    Using the unlimited extension.

    The solution suggested above partially works, except for the main reason I was doing this clone: having an exact copy in order to fix issues with the ‘Responsive FlipBook WordPress Plugin’.
    What is happening now is that everything has been imported (all the media included) BUT the records I have created with that FlipBook plugin ??

    Thread Starter Troglos

    (@troglos)

    Thanks again

    Thread Starter Troglos

    (@troglos)

    Great, it’s finally working now!

    PS
    sorry for the ex.tax part, my mistake

    Thread Starter Troglos

    (@troglos)

    Hi Jesse,

    I’ve tried your last snippet but it doesn’t work.
    Back to the empty space in the .po

    By the way, I see that there are only two places where the tax label (Includes %s) is used

    this (in /includes/class-wc-order.php):

    public function get_formatted_order_total( $tax_display = '' ) {
    		$formatted_total = wc_price( $this->get_total(), array( 'currency' => $this->get_order_currency() ) );
    		$order_total    = $this->get_total();
    		$total_refunded = $this->get_total_refunded();
    		$tax_string     = '';
    
    		// Tax for inclusive prices
    		if ( wc_tax_enabled() && 'incl' == $tax_display ) {
    			$tax_string_array = array();
    
    			if ( 'itemized' == get_option( 'woocommerce_tax_total_display' ) ) {
    				foreach ( $this->get_tax_totals() as $code => $tax ) {
    					$tax_amount         = $total_refunded ? wc_price( WC_Tax::round( $tax->amount - $this->get_total_tax_refunded_by_rate_id( $tax->rate_id ) ), array( 'currency' => $this->get_order_currency() ) ) : $tax->formatted_amount;
    					$tax_string_array[] = sprintf( '%s %s', $tax_amount, $tax->label );
    				}
    			} else {
    				$tax_string_array[] = sprintf( '%s %s', wc_price( $this->get_total_tax() - $this->get_total_tax_refunded(), array( 'currency' => $this->get_order_currency() ) ), WC()->countries->tax_or_vat() );
    			}
    			if ( ! empty( $tax_string_array ) ) {
    				$tax_string = ' ' . sprintf( __( '(Includes %s)', 'woocommerce' ), implode( ', ', $tax_string_array ) );
    			}
    		}
    
    		if ( $total_refunded ) {
    			$formatted_total = '<del>' . strip_tags( $formatted_total ) . '</del> <ins>' . wc_price( $order_total - $total_refunded, array( 'currency' => $this->get_order_currency() ) ) . $tax_string . '</ins>';
    		} else {
    			$formatted_total .= $tax_string;
    		}
    
    		return apply_filters( 'woocommerce_get_formatted_order_total', $formatted_total, $this );
    	}

    and this (in /includes/wc-cart-functions.php):

    function wc_cart_totals_order_total_html() {
    	$value = '<strong>' . WC()->cart->get_total() . '</strong> ';
    
    	// If prices are tax inclusive, show taxes here
    	if ( wc_tax_enabled() && WC()->cart->tax_display_cart == 'incl' ) {
    		$tax_string_array = array();
    
    		if ( get_option( 'woocommerce_tax_total_display' ) == 'itemized' ) {
    			foreach ( WC()->cart->get_tax_totals() as $code => $tax )
    				$tax_string_array[] = sprintf( '%s %s', $tax->formatted_amount, $tax->label );
    		} else {
    			$tax_string_array[] = sprintf( '%s %s', wc_price( WC()->cart->get_taxes_total( true, true ) ), WC()->countries->tax_or_vat() );
    		}
    
    		if ( ! empty( $tax_string_array ) ) {
    			$value .= '<small class="includes_tax">' . sprintf( __( '(Includes %s)', 'woocommerce' ), implode( ', ', $tax_string_array ) ) . '</small>';
    		}
    	}
    
    	echo apply_filters( 'woocommerce_cart_totals_order_total_html', $value );
    }

    Thread Starter Troglos

    (@troglos)

    Well in Italy the prices include the taxes, so I don’t need to show them separately.
    Momentarily I’ve just replaced the translation in the .po with an empty space, but it’s not a clean solution.

    I am sure it’s possible to override the functions.

    excellent!
    thank you

    Great, works fine!

    Now the last thing. I want to print the date fields only in the 202 (I would prefer not to hide them via css).

    I have tried with the following without success:

    add_action('uwpqsf_form_mid','insert_date_input');
    function insert_date_input($id){
    	if($id == '202'){
    	  $html = '<div class="uwpqsf_class"><span class="taxolabel-99">Quando</span>';
    	  $html .='<div class="campo-data">';
    	  $html .= '<label><span>Dal</span> <input name="date[from]" value="" type="date" placeholder="dal"></label>';//you can use select or other input type
    	  $html .= '<label> <span>al</span> <input name="date[to]" value="" type="date" placeholder="al"></label>';
    	  $html .='</div></div>';
    	  echo $html;
    	}
    }

    ok now I have 2 forms in one page, and only the form id 202 must have the date range
    I have tried a couple of things but didn’t work
    any help would be appreciated

    the code I am using is this:

    add_filter('uwpqsf_deftemp_query','insert_date_to_query','',3);
    function insert_date_to_query($args, $id,$getdata){
       if($getdata['date']){
         $args['date_query'] = array(
                'after'     => $getdata['date']['from'],
    			'before'    =>  $getdata['date']['to'],
    			'inclusive' => true
          );
         }
      return $args;
    }

    Thread Starter Troglos

    (@troglos)

    Great, thank you.

    Nevermind, I solved by moving the code from functions.php to the template page

    Nice snippet, with a couple little fixes it’s working fine.
    But – since I am using 3 different forms but I need this function only in one of them – is there a way to tell the snippet to work only if the form ID is XYZ?

    Thanks

    I have uploaded the file in /backups via FTP, but when I do restore I get the javascript popup error.

    The screenshot of the developer tools ‘Network’ Tab error is HERE

    PS
    I have bought the Unlimited extension too ??

Viewing 15 replies - 91 through 105 (of 122 total)