Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter gabrielazaucha

    (@gabrielazaucha)

    @dholovnia
    and is it possible in the paid version?

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    @talextech I know very well how the function works wp_lostpassword_url()
    Before I realized that the bug was caused by your plugin, I had rewritten this function to be correct. But when I realized it was your plug, I went back to the beginning.
    Unfortunately, the Maintenance plugin hides its proper operation. I’m not writing it here to get a solution from you, just so you can tweak your plugin so that doesn’t happen. I’m just reporting a bug. I cannot afford this error so I have already uninstalled the plugin

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    @manuelrocha88 the point is that the buyer cannot have access to the password reminder in the store administration. And this happens when your plugin is installed:
    lost-password-backend.jpg
    Normally customers don’t have access to this panel in WooCommerce. Everything is covered Woocommerce template, and password reminder is done on the frontend:
    lost-password-frontend.jpg

    Why is this so important?
    I have changed the link to the store administration. I don’t have the standard wp-login.php but another one.
    Because your plugin redirects the client to the password reminder in the administration panel, this link is visible to both customers and spy robots.

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    the error was caused by the Maintenance plugin

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    can anyone help?

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    Very Exellent! Thank !

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    @wheeleran @marcoragogna
    Hello. I just installed the update, but the problem is still there. There is still no field for URL in tabs ….
    @quadlayers will this field be finally introduced?
    I have a few tabs with a URL link, and the rest are not because there is no field …
    it can’t be deleted from old tabs or added to new tabs …

    I have the same problem.
    recaptcha v3 don’t correctly – perfect…

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    Hello ?
    does anyone have a similar problem?
    can anyone help?

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    @wheeleran : Exellent! I’ll be waiting in impatience!

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    I’m also still waiting and raising

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    sorry – topic is closed

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    the problem is still valid ??

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    The first function I wrote hides p.price-range when #price-variation appears.
    But it only works after the next click.
    so not when <span> with ID #price-variation appears, but after the next action.
    Just like here:

    https://www.dropbox.com/first-function.mp4

    	function myPrice() {
    		var swatchlabele = document.querySelectorAll(".wcvaswatchlabel");
    	  var price = document.getElementById("price-range");
    		var pricenext = document.querySelectorAll(".woocommerce-variation.single_variation");
    		var pricevariation = document.getElementById("price-variation");
    
    					if(document.body.contains(document.getElementById('price-variation'))){
    				price.style.display = "none";
    			    } else{
    			    }
    			}

    it unfortunately doesn’t work properly ….

    The second function I wrote works a little better but causes a problem that I can’t accept.
    After clicking on the variant, the OnClick function is called, which changes the CSS “display” property.
    But … And there is a problem
    Product with variants that have the same price – quite disappears price …..
    Example here:

    https://www.dropbox.com/second-function.mp4

    	function myPrice() {
    		var swatchlabele = document.querySelectorAll(".wcvaswatchlabel");
    	  var price = document.getElementById("price-range");
    		var pricenext = document.querySelectorAll(".woocommerce-variation.single_variation");
    		var pricevariation = document.getElementById("price-variation");
    
    				if (swatchlabele.checked && pricenext.style.display === "none") {
    			    price.style.display = "block";
    			  } else {
    			    price.style.display = "none";
    					pricenext.style.display = "block";
    			  }
    			}

    The second function is a bit clumsy …
    I have no more ideas, please help

    Thread Starter gabrielazaucha

    (@gabrielazaucha)

    it’s not about total concealment. the point is to make it change depending on whether the variant is chosen – as here:

    https://www.dropbox.com/viariable-ok.mp4

    I had done it and it worked. However, it turned out that products with more variants have a problem – as here:

    https://www.dropbox.com/variable-wrong.mp4

    A function that worked but now causes a conflict is:

    // Utility function to get the default variation (if it exist)
    function get_default_variation( $product ){
        $attributes_count = count($product->get_variation_attributes());
        $default_attributes = $product->get_default_attributes();
        // If no default variation exist we exit
        if( $attributes_count != count($default_attributes) )
            return false;
    
        // Loop through available variations
        foreach( $product->get_available_variations() as $variation ){
            $found = true;
            // Loop through variation attributes
            foreach( $variation['attributes'] as $key => $value ){
                $taxonomy = str_replace( 'attribute_', '', $key );
                // Searching for a matching variation as default
                if( isset($default_attributes[$taxonomy]) && $default_attributes[$taxonomy] != $value ){
                    $found = false;
                    break;
                }
            }
            // If we get the default variation
            if( $found ) {
                $default_variaton = $variation;
                break;
            }
            // If not we continue
            else {
                continue;
            }
        }
        return isset($default_variaton) ? $default_variaton : false;
    }
    
    add_action( 'woocommerce_before_single_product', 'move_variations_single_price', 1 );
    function move_variations_single_price(){
        global $product, $post;
    
        if ( $product->is_type( 'variable' ) ) {
            // removing the variations price for variable products
            remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
    
            // Change location and inserting back the variations price
            add_action( 'woocommerce_before_add_to_cart_button', 'replace_variation_single_price', 29 );
        }
    }
    
    function replace_variation_single_price(){
        global $product;
    
        // Main Price
        $prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );
        $active_price = $prices[0] !== $prices[1] ? sprintf( __( '<small>Ju? od:</small> %1$s', 'meganstyle24' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
    
        // Sale Price
        $prices = array( $product->get_variation_regular_price( 'min', true ), $product->get_variation_regular_price( 'max', true ) );
        sort( $prices );
        $regular_price = $prices[0] !== $prices[1] ? sprintf( __( '<small>Ju? od:</small> %1$s', 'meganstyle24' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
    
        if ( $active_price !== $regular_price && $product->is_on_sale() ) {
            $price = '<del>' . $regular_price . $product->get_price_suffix() . '</del> <ins>' . $active_price . $product->get_price_suffix() . '</ins>';
        } else {
            $price = $regular_price;
        }
    
        // When a default variation is set for the variable product
        if( get_default_variation( $product ) ) {
            $default_variaton = get_default_variation( $product );
            if( ! empty($default_variaton['price_html']) ){
                $price_html = $default_variaton['price_html'];
            } else {
                if ( ! $product->is_on_sale() )
                    $price_html = $price = wc_price($default_variaton['display_price']);
                else
                    $price_html = $price;
            }
            $availiability = $default_variaton['availability_html'];
        } else {
            $price_html = $price;
            $availiability = '';
        }
        // Styles ?>
        <style>
            div.woocommerce-variation-price,
            div.woocommerce-variation-availability,
            div.hidden-variable-price {
                height: 0px !important;
                overflow:hidden;
                position:relative;
                line-height: 0px !important;
                font-size: 0% !important;
            }
        </style>
        <?php // Jquery ?>
        <script>
        jQuery(document).ready(function($) {
            var a = 'div.wc-availability', p = 'p.price';
    
            $('select').blur( function(){
                if( '' != $('input.variation_id').val() ){
                    if($(a).html() != '' ) $(a).html('');
                    $(p).html($('div.woocommerce-variation-price > span.price').html());
                    $(a).html($('div.woocommerce-variation-availability').html());
                } else {
                    if($(a).html() != '' ) $(a).html('');
                    $(p).html($('div.hidden-variable-price').html());
                }
            });
        });
        </script>
        <?php
        echo '<p class="price">'.$price_html.'</p>
        <div class="wc-availability">'.$availiability.'</div>
        <div class="hidden-variable-price" >'.$price.'</div>';
    }

    Unfortunately I can’t deal with it so I started trying in a different way.
    I started writing JS functions in template product (viariable.php) – I wrote them above.
    Someone will help?
    My ideas are running out, and unfortunately I’m not a JS champion …

Viewing 15 replies - 1 through 15 (of 22 total)