Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Measurement Price Calculator
New Landing › How can we help? › Atelier › Measurement Price Calculator
- This topic has 15 replies, 3 voices, and was last updated 9 years by Swift Ideas – Ed.
-
Posted in: Atelier
-
June 15, 2015 at 2:48 pm #184623
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?
June 15, 2015 at 2:50 pm #184624This reply has been marked as private.June 15, 2015 at 2:59 pm #184627Hi,
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
June 15, 2015 at 3:05 pm #184631All the settings on the product page. And there is nothing with these parameters.
June 15, 2015 at 3:33 pm #184650Hi,
In that case will forward to Ed to see if it’s feasible to add compatibility with that plugin.
-Rui
June 15, 2015 at 3:38 pm #184653Sorry I do not understand what it means.
forward to Ed
June 15, 2015 at 3:46 pm #184656Ed is our Head Developer of the themes.
-RuiJune 15, 2015 at 4:07 pm #184668June 15, 2015 at 4:11 pm #184669What should I do with my hand, what would Ed helped to solve the problem?
June 15, 2015 at 6:12 pm #184718We have to wait to see if he can provide a solution for it.
-RuiJune 15, 2015 at 8:05 pm #184746Hi 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
June 15, 2015 at 8:10 pm #184748So I have it now “Variable”
Or anywhere else I have to change the parameters?June 15, 2015 at 8:24 pm #184752I 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; } }
June 15, 2015 at 8:29 pm #184755File Name
class-wc-price-calculator-product-loop.php
June 15, 2015 at 9:01 pm #184768I 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; } }
-
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.