New Landing How can we help? Atelier Measurement Price Calculator

Viewing 15 posts - 1 through 15 (of 16 total)
  • Posted in: Atelier
  • #184623
    saylife
    Member
    Post count: 161

    Hi!
    You can help me.
    I Use the plugin “WooCommerce Measurement Price Calculator”
    He removes the icon, and inserts the “Select Options” instead.

    How can I make more priority to your code?

    #184624
    saylife
    Member
    Post count: 161
    This reply has been marked as private.
    #184627
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    it seems that the plugin removed the code that was inside the button Add to cart link.

    Can you check if that plugin has some option to avoid that situation? Don’t know the plugin options.

    -Rui

    #184631
    saylife
    Member
    Post count: 161

    All the settings on the product page. And there is nothing with these parameters.

    #184650
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    In that case will forward to Ed to see if it’s feasible to add compatibility with that plugin.

    -Rui

    #184653
    saylife
    Member
    Post count: 161

    Sorry I do not understand what it means.

    forward to Ed

    #184656
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Ed is our Head Developer of the themes.
    -Rui

    #184668
    saylife
    Member
    Post count: 161

    #184669
    saylife
    Member
    Post count: 161

    What should I do with my hand, what would Ed helped to solve the problem?

    #184718
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    We have to wait to see if he can provide a solution for it.
    -Rui

    #184746
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    Please set the product type to “Variable” rather than “Simple” – as otherwise the plugin replaces the button icon, we have no control to override that.

    – Ed

    #184748
    saylife
    Member
    Post count: 161

    So I have it now “Variable”
    Or anywhere else I have to change the parameters?

    #184752
    saylife
    Member
    Post count: 161

    I found a plug-in in the code where the displayed “Select Options”
    Where should I insert the code icons?
    <I class = "sf-icon-variable-options"> </ i>

    That’s part of the code

    /** Frontend methods ******************************************************/
    
    	/**
    	 * Modify the 'add to cart' url for pricing calculator products to simply link to
    	 * the product page, just like a variable product.  This is because the
    	 * customer must supply whatever product measurements they require.
    	 *
    	 * @since 3.3
    	 * @param string $tag the 'add to cart' button tag html
    	 * @param WC_Product $product the product
    	 * @return string the Add to Cart tag
    	 */
    	public function loop_add_to_cart_link( $tag, $product ) {
    
    		if ( WC_Price_Calculator_Product::pricing_calculator_enabled( $product ) ) {
    
    			// otherwise, for simple type products, the page javascript would take over and
    			//  try to do an ajax add-to-cart, when really we need the customer to visit the
    			//  product page to supply whatever input fields they require
    			$tag = sprintf( '<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" class="button add_to_cart_button product_type_%s">%s</a>',
    				get_permalink( $product->id ),
    				esc_attr( $product->id ),
    				esc_attr( $product->get_sku() ),
    				'variable',
    				__( 'Select Options', WC_Measurement_Price_Calculator::TEXT_DOMAIN )
    			);
    		}
    
    		return $tag;
    	}
    
    }
    
    #184755
    saylife
    Member
    Post count: 161

    File Name

    class-wc-price-calculator-product-loop.php

    #184768
    saylife
    Member
    Post count: 161

    I solved the problem!
    Simply replace the “Select Options”
     on
     ‘<i class=”sf-icon-variable-options”></i>’

    if ( WC_Price_Calculator_Product::pricing_calculator_enabled( $product ) ) {
    
    			// otherwise, for simple type products, the page javascript would take over and
    			//  try to do an ajax add-to-cart, when really we need the customer to visit the
    			//  product page to supply whatever input fields they require
    			$tag = sprintf( '<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" class="button add_to_cart_button product_type_%s">%s</a>',
    				get_permalink( $product->id ),
    				esc_attr( $product->id ),
    				esc_attr( $product->get_sku() ),
    				'variable',
    				__( '<i class="sf-icon-variable-options"></i>', WC_Measurement_Price_Calculator::TEXT_DOMAIN )
    			);
    		}
    
    		return $tag;
    	}
    
    }
Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register