Forum Replies Created
-
AuthorPosts
-
@masyogie did you clear the browser cache as well as any cache from plugins like wp-rocket. Did you follow the instructions exactly?
@lindapolak Thank you for keeping my brain working :-)
After deeper study and debugging I have rewritten the monkey patch and it should work now. You can download it again from https://mensmaximus.de/dokumente/enfold/mmx-avia-mod.zip
I simply looked at the wrong css class even after I realized I did (‘Wald vor lauter Bäumen nicht sehen’). In the revised patch you will notice a conditional block where you can adjust the values for the different css classes applied by enfold independently :
(function($){ var _old_avia_waypoints = $.fn.avia_waypoints; $.fn.avia_waypoints = function( options_passed ){ if ( ! options_passed ) { var options_passed = {}; } var selector = $(this).selector; if ( selector == ".avia_animate_when_almost_visible" ) { options_passed.offset = '97%'; // Original value 80% } else if ( selector == ".avia_animate_when_visible" ) { options_passed.offset = '97%'; // Original value bottom-in-view } else if ( selector == ".av-animated-generic" ) { options_passed.offset = '95%'; // Original value 95% } return _old_avia_waypoints.call( this, options_passed ); }; })(jQuery);
Your issue stems from ‘avia_animate_when_visible’. So if you are happy with the other animations you simply keep the old values. As a default I have set ‘avia_animate_when_visible’ and ‘avia_animate_when_almost_visible’ to 97% while ‘av-animated-generic’ is untouched.
I have prepared a file for you. You can download it at https://mensmaximus.de/dokumente/enfold/mmx-avia-mod.zip. Just unzip the archive an copy the file to your childs /js directory.
The content of your mmx-avia-mod.js is wrong:
Please use a true editor (like notepad++) not a word processor (like ms word) to create the file. The charcaters ' need to be simple quotation marks (einfache Anführungszeichen)
PS: the wrong characters dont get displayed in the forum so i removed the correctly displayed wrong code ;-)
- This reply was modified 8 years, 6 months ago by mensmaximus.
@lindapolak ah I see. It is a different animation class.
Change the code in mmx-avai-mod.js to
(function($){ var _old_avia_waypoints = $.fn.avia_waypoints; $.fn.avia_waypoints = function( options_passed ){ if ( typeof options_passed == 'object' && options_passed ) { // if ( options_passed.offset == '80%' ) { options_passed.offset = '97%'; // } } return _old_avia_waypoints.apply( this, arguments ); }; })(jQuery);
@lindapolak please refer to the enfold documentation how to create a child theme: http://kriesi.at/documentation/enfold/using-a-child-theme/
June 19, 2016 at 10:17 pm in reply to: "Update Cart" button on checkout page is not working. Confirmed with Woocomerce #650512@AvidImagination have you seen my posting? https://kriesi.at/support/topic/woocommerce-2-6-problem-urgent/#post-650161
I had the same issue. I display the latest post widget in my footer and alle my pages carry the date in the google rich snippet. I solved it by removing the date from the latest post entries in the widget with this function:
add_filter( 'avia_widget_time', 'mmx_last_posts_widget_remove_date', 10, 2 ); function mmx_last_posts_widget_remove_date( $format, $widget ){ if ( 'avia_newsbox' == $widget && is_page() ) { $format = false; } return $format; }
The best solution would be to add a checkbox to enfolds latest news widget to disable the date on demand.
The values for the waypoints are hardcoded in /wp-content/themes/enfold/js/shortodes.js. So you have two options
1. Modify the original file
In line 86
$('.avia_animate_when_almost_visible', container).avia_waypoints({ offset: '80%'});
change the 80% to 95% or 97%.
The higher the value the earlier the elements fade in.
Caution! This file will be overwritten each time enfold gets updated. So you have to recall how to modify the file again2. Monkey patching using a child theme
– create a child theme (simply copy the child theme from the full theme zipfile to your theme folder)
– create a directory called ‘js’ within the child theme directory
– create a file called mmx-avia-mod.js within the ‘js’ directory
– put the following code into the file mmx-avia-mod.js(function($){ var _old_avia_waypoints = $.fn.avia_waypoints; $.fn.avia_waypoints = function( options_passed ){ if ( typeof options_passed == 'object' && options_passed ) { if ( options_passed.offset == '80%' ) { options_passed.offset = '97%'; } } return _old_avia_waypoints.apply( this, arguments ); }; })(jQuery);
– add the following code to your child themes functions.php
add_action( 'wp_enqueue_scripts', 'mmx_load_scripts', 999); function mmx_load_scripts() { wp_enqueue_script( 'mmx-avia-mod', get_stylesheet_directory_uri() . '/js/mmx-avia-mod.js', array( 'jquery', 'avia-shortcodes' ), '', true); }
– done
Caution! Although this modification will survive any update it will work only as long as the original function $.fn.avia_waypoints from enfold wont be modified.WordPress Dateien auch schon neu aufgespielt? Domain zeigt korrekt auf den Webspace? WP_MEMORY_LIMIT ist ausreichend?
JetPack installiert aber noch nicht connected?- This reply was modified 8 years, 6 months ago by mensmaximus.
.html_header_sidebar #top #header #menu-item-333:hover a .avia-menu-text:hover { background-color: #f00000; border-color: #f00000; }
@anna seems you posted the url only for admins. So simple users can’t see it. That’s why I asked.
Anna you need to post the link to your site. The support needs to see the menu. Ounce you post the url it is possible to provide the css code needed.
June 18, 2016 at 7:42 pm in reply to: "Update Cart" button on checkout page is not working. Confirmed with Woocomerce #650260I have provided a hotfix at https://kriesi.at/support/topic/woocommerce-2-6-problem-urgent/#post-650161
@Quant2112 Werden Änderungen nicht gespeichert (im Backend)? Dann prüfe bitte ob das Verzeichnis /wp-content/uploads/dynamic_avia beschreibbar ist.
@tjjones please see my fix at https://kriesi.at/support/topic/woocommerce-2-6-problem-urgent/#post-650161
I have rewritten the woocommerce-mod.js script to work with woocommerce 2.6. This is considered a beta release. Use at your own risk.
You can download it at https://mensmaximus.de/dokumente/enfold/woocommerce/wc-26-cart/woocommerce-mod.zip
Installation
1. Download the file to your computer
2. Unzip the file
3. Connect to your hosting account with FTP
4. Navigate to /wp-content/themes/enfold/config-woocommerce
5. Rename woocommerce-mod.js on the remote machine to woocommerce-mod.js_original
6. Copy the local woocommerce-mod.js (see #2) to your remote machine (path from #4)
7. Visit your websites shopping cart and press Ctrl-R to make sure the new script is loaded instead of the old one from cache
8. Done. You have replaced the old script with the new oneI have tested it heavily including min, max and step changes but there might be issues in certain conditions.
Users should report back any issues in this thread.
Supporters should forward this to Kriesi for immediate testing and review (I think it should be rewritten in parts – as for now consider it as hot fix)This file will be overwritten with the next Enfold update. Please keep that in mind.
The issue stems from the new ajaxified cart in WooCommerce 2.6 and above.
In the first place there is a new function in cart.js to disable the update_cart button while the cart stays unchanged (no increase or decrease in quantities). From line 285 in cart.js downwards WooCommerce defines a input_changed event to enable the button again if the cart has changed (quantity decrease or increase). Due to the fact the plus and minus selectors are custom additions within Enfold WooCommerce does not know about them and the input_changed event gets not triggered if you click on the plus and minus button. If you change the quantity in the input field which is not modified by Enfold the event gets triggered and the update_cart button gets enabled.
Kriesi has to define a listener him self to Enfold to enable the update_cart button upon a click on the plus or minus button. Add the following function at the bottom of woocommerce-mod.js:
function enable_update_cart_button(){ var $update_cart_button = jQuery( 'table.shop_table.cart' ).closest( 'form' ).find( 'input[name="update_cart"]' ); if ( $update_cart_button.length ) { $update_cart_button.prop( 'disabled', false ); } }
Than insert a call to this function in the minus.on and plus.on events (lines 33 and 39 below the newNum.val(the_val) )
enable_update_cart_button();
However this wont help much because as soon as you change quantities and click on the update_cart button the plus and minus selectors will disapear. This is caused by the way the cart redraw works since WooCommerce 2.6. In prior versions the page was reloaded and the woocommerce-mod.js script was loaded and the function to add the plus and minus selector was executed again. Now the redraw happens using ajax. The Enfold script is not executed again and no selectors are drawn. Kriesi needs to change the way the script works. The whole part to draw the selectors and to listen to the onlcick event needs to be wrapped into a custom function. This function needs to be executed on the initial load of the cart and each time the “updated_wc_div” event is triggered.
Long story short. This is a bug/flaw i Enfold and has nothing to do with other plugins. You know I am one of the biggest Enfold fans but I have to say you definitely missed the goal with making Enfold WooCommerce 2.6 compatible. Please do us a favor and give it the highest priority so we can say this was a one-time slip-up.
Kind regards
Michael
Wait until the official compatibility announcement. Right now enfold is missing a couple of css definitions to make the new templates (e.g. my-account) look pretty.
If you are in a hurry you can use the following css snippet to give the new my-account tabbed navigation an enfold-like look and feel:
#top div.woocommerce nav.woocommerce-MyAccount-navigation { display: block; margin: 0 0 25px 0; padding: 0px; position: relative; } #top div.woocommerce nav.woocommerce-MyAccount-navigation ul { list-style: none; display: inline-block; clear: both; width: 100%; margin: 0; padding: 0; } #top div.woocommerce nav.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link { padding: 0px; margin: 0px; } #top div.woocommerce nav.woocommerce-MyAccount-navigation ul li.is-active a { border-style: solid; border-width: 1px; border-bottom: none; padding: 9px 20px 10px 20px; position: relative; } #top div.woocommerce nav.woocommerce-MyAccount-navigation ul li:first-child a { border-top-left-radius: 2px; } #top div.woocommerce nav.woocommerce-MyAccount-navigation ul li a { cursor: pointer; margin: 0 -1px 0 0; display: block; float: left; z-index: 2; position: relative; padding: 12px 16px; top: 0px; font-size: 0.9em; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border-style: solid; border-width: 1px; }
Thank you but this is not a yoast issue it just gets worse if yoast is installed. The main issue is within enfold because you simply miss the correct edit screen (‘term.php’) which makes the color picker jquery extension fail. So my code is a bug fix ;-)
- This reply was modified 8 years, 6 months ago by mensmaximus.
My bugfix has not been applied to enfold version 3.6. Can you please make sure to fix it with the next minor update? It is time consuming to manually repair about 100 installations and my customers are not fond of paying me again for something I already presented a solution for.
Hi,
thank you for your response. The solution provided in the link you posted is not the correct answer. However it directed me to the root cause and I could solve the issue by providing the correct fix at https://kriesi.at/support/topic/enfold-category-admin-not-working-properly-cant-use-yoast-seo-plugin-panel/#post-639119
Please provide Kriesi with my solution to be integrated with the next update.
May 27, 2016 at 7:02 am in reply to: Enfold – Category admin not working properly & can't use Yoast SEO plugin panel #639119The solution provided is NOT a solution. It renders the function useless. wpColorPicker() fails because the dependency (jQuery wp-color-picker) gets not loaded on the “product category edit screen”.
In /wp-content/themes/enfold/config-woocommerce/admin-options.php change line 229 from
if($hook_suffix == 'edit-tags.php' && isset($_GET['taxonomy']) && $_GET['taxonomy'] == 'product_cat'){
to
if( $hook_suffix == 'edit-tags.php' || $hook_suffix == 'term.php' && isset($_GET['taxonomy']) && $_GET['taxonomy'] == 'product_cat' ){
This will make sure wp-color-picker script and style will be enqueued on term.php which is the category product edit page.
Done, that does not solve issue #2.
Sorry for the delay. Requested data are attached
May 9, 2016 at 3:50 pm in reply to: WooCommerce products price display when using avia layout architect #629297As already written the zip file contains a child theme ready to use including all functions and the modified shortcode.
May 9, 2016 at 7:13 am in reply to: WooCommerce products price display when using avia layout architect #629038Yes you create a new product_snippet_button.php by copying the original one into a child theme and applying the diff I provided (ask your developer, he knows about using the patch command in linux) to the copy. You have to load the modified shortcode and the other functions from the childs functions.php file.
A ready to download example can be found at https://mensmaximus.de/dokumente/enfold/woocommerce/purchase-button/enfold-child.zip. It has everything in it you need to get this running. If you already have a childtheme you have to “merge” both functions.php files.
Disclaimer: The code and zip file is provided as is. You should use it only if you understand how it is working. I am not liable to any damage caused by you not being able to implement this probably. Be advised I will not provide any support through this forum and I am not affiliated to kriesi.at.
Unfortunately there is no filter to achieve this easily. The filter ‘avia_breadcrumbs_args’ does have an argument which can be used to put taxonomies of posttype into the trail but this does not work for ‘singular_product_taxonomy’ and ‘singular_product_variation_taxonomy’.
As for now the only way to get rid of the product category is to use the filter ‘avia_breadcrumbs_trail’ to remove the element before the last element (the title) using the following code in your child themes functions.php
add_filter( 'avia_breadcrumbs_trail', 'mmx_change_bc_trail', 20, 2 ); function mmx_change_bc_trail( $trail, $args ){ if( is_product() ) { unset( $trail[count($trail)-2] ); } return $trail; }
However this has some caveats. If a product does not belong to a category this function will remove the shop slug from the trail. So I do not recommend to use it without further checks and controls.
Regards
Michael
@basilis this wont work. Instead put the following code into the functions.php of an Enfold child theme
add_action( 'after_setup_theme', 'mmx_avia_woocommerce_settings' ); function mmx_avia_woocommerce_settings(){ global $avia_config; $avia_config['shop_single_column_items'] = 5; $avia_config['shop_single_column'] = 5; }
The function works until 5 columns. If you need more columns you have to build additional css rules like product_column_6, product_column_7 etc.
The classes product_column_ 1 to 5 can be found in /wp-content/themes/enfold/config-woocommerce/woocommerce-mod.css for reference. -
AuthorPosts