Tagged: product slider
-
AuthorPosts
-
September 10, 2014 at 7:52 pm #316873
Hi,
Is everything compatible with Woo Commerce 2.2 in the latest update? Also, how would I update the theme without rewriting my existing data?
Thanks,
JoshSeptember 11, 2014 at 10:07 am #317242Hey j1980mac!
Thank you for using Enfold.
We haven’t tested the latest update of WooCommerce yet but so far there are no reported issues about 2.2. If you want to update the theme, please download the latest version from your themeforest account then update the theme via FTP. Please refer to this link for more info: http://kriesi.at/documentation/enfold/updating-your-theme-files/
Regards,
IsmaelSeptember 24, 2014 at 6:21 pm #324486Hi,
first, thanks for adding the jQuery fix from https://kriesi.at/support/topic/wordpress-4-0/ to 2.9.2!
There is however still a bug in 2.9.2, introduced by woocommerce 2.2, in regards to the product slider:
woocommerce.php has changed this:public function include_template_functions() { - include_once( 'includes/wc-template-functions.php' ); + if ( ! is_admin() || defined( 'DOING_AJAX' ) ) { + include_once( 'includes/wc-template-functions.php' ); + } }
which means that the function
woocommerce_product_subcategories
in that included file is not available inis_admin()
mode.
It is used inenfold/config-templatebuilder/avia-shortcodes/productslider.php
, which gets run when editing a page which contains the product slider, and will produce the following error in the ‘Publish’ metabox:
Fatal error: Call to undefined function woocommerce_product_subcategories() in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 274
. Only that metabox, the page title, and permalink editor are shown – all the rest of the metaboxes isn’t.Until this gets fixed, here’s a (dirty) workaround, to be placed in the functions.php of the child theme:
// fix for woocommerce 2.2+ and enfold 2.9.2: woocommerce_product_subcategories() not available in admin mode add_action('woocommerce_init', function() { if ( ! function_exists( 'woocommerce_product_subcategories' ) ) include_once( __DIR__.'/../../plugins/woocommerce/includes/wc-template-functions.php' ); } );
September 26, 2014 at 9:57 am #325483Hey!
It doesn’t make sense to load the woocommerce_product_subcategories() function on the admin page. We’ll fix this with the next update. For now I recommend to replace this code:
class avia_product_slider { static $slide = 0; protected $atts; protected $entries; function __construct($atts = array()) {
with
class avia_product_slider { static $slide = 0; protected $atts; protected $entries; function __construct($atts = array()) { if(!function_exists('woocommerce_product_subcategories')) return;
Regards,
PeterOctober 19, 2014 at 9:05 pm #338019Hi Peter,
thanks – I see your proposed change in the latest enfold version, however, it does not fix the problem.
Steps to reproduce:
1) have woocommerce 2.2.6, enfold 2.9.2 or 3.0.1
3) WP_DEBUG true (otherwise you see nothing)
3) try to edit a page with a product slider on it. (or create one, save it, and then load it – everything is gone except for title, slug, and Publish box).In the ‘Publish’ box there will be these warnings and errors (if WP_DEBUG is true):
Warning: extract() expects parameter 1 to be array, null given in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 203 Notice: Undefined variable: autoplay in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 210 Notice: Undefined variable: columns in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 211 Notice: Undefined variable: columns in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 212 Notice: Undefined variable: columns in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 216 Notice: Undefined variable: columns in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 217 Notice: Undefined variable: columns in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 218 Notice: Undefined variable: columns in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 219 Notice: Undefined variable: columns in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 220 Notice: Undefined variable: interval in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 224 Notice: Undefined variable: animation in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 224 Fatal error: Call to undefined function woocommerce_product_subcategories() in /path/to/site/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 274
Regarding it not making sense to have the function ‘woocommerce_product_subcategories’ defined, it might make sense in so far as that the modal edit dialog of the Product Slider widget has a selection for which product categories to display. (Apparently avia_product_slider::html() is called in ‘the admin page’ given the Fatal Error above).
October 20, 2014 at 9:45 am #338234Hi!
Thank you for the update.
Please make sure that you’re running Enfold 3.0.1, not Enfold 2.9.2, on WordPress 4.0. Add this on functions.php to fix the product slider issue:
// fix for woocommerce 2.2+ and enfold 2.9.2: woocommerce_product_subcategories() not available in admin mode add_action('woocommerce_init', function() { if ( ! function_exists( 'woocommerce_product_subcategories' ) ) include_once( __DIR__.'/../../plugins/woocommerce/includes/wc-template-functions.php' ); } );
Regards,
IsmaelOctober 21, 2014 at 12:41 am #338781After updating to the latest version! (3.0.2) the Product Slider doesn’t work. It appears that the “Which Entries?” option isn’t showing
October 28, 2014 at 10:04 am #342096Hey!
Sorry for the late reply.
Please forward us administrative credentials to your site for us to have a closer look.
Please check the “Set as private reply (Only you and moderators will see the content of this post)” option before posting any sensitive information.
Best regards,
Arvish -
AuthorPosts
- You must be logged in to reply to this topic.