xoco
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Bug in plugin SettingsSame problem here:
I use french language, and PHP8.0.1, with Avada template
- This reply was modified 4 years ago by xoco.
Forum: Plugins
In reply to: [WooCommerce] Delete product Images by REST API@riaan, I guess you are right, that is what I will use! Tx
Forum: Plugins
In reply to: [WooCommerce] Default sort by SKUI changed it, but still not working ??
When searching for Avada code, I get this :
function avada_woocommerce_ordering( $query ) { // We only want to affect the main query. if ( ! $query->is_main_query() ) { return; } if ( absint( $query->get( 'page_id' ) ) === wc_get_page_id( 'shop' ) || $query->is_post_type_archive( 'product' ) || $query->is_tax( get_object_taxonomies( 'product' ) ) ) { if ( Avada()->settings->get( 'woocommerce_avada_ordering' ) ) { remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); add_action( 'woocommerce_before_shop_loop', 'avada_woocommerce_catalog_ordering', 30 ); add_action( 'woocommerce_get_catalog_ordering_args', 'avada_woocommerce_get_catalog_ordering_args', 20 ); } } }
And also :
public function get_catalog_ordering_args( $orderby = '', $order = '' ) { // Get ordering from query string unless defined if ( ! $orderby ) { $orderby_value = isset( $_GET['orderby'] ) ? wc_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); // Get order + orderby args from string $orderby_value = explode( '-', $orderby_value ); $orderby = esc_attr( $orderby_value[0] ); $order = ! empty( $orderby_value[1] ) ? $orderby_value[1] : $order; } $orderby = strtolower( $orderby ); $order = strtoupper( $order ); $args = array(); // default - menu_order $args['orderby'] = 'menu_order title'; $args['order'] = $order == 'DESC' ? 'DESC' : 'ASC'; $args['meta_key'] = ''; switch ( $orderby ) { case 'rand' : $args['orderby'] = 'rand'; break; case 'date' : $args['orderby'] = 'date ID'; $args['order'] = $order == 'ASC' ? 'ASC' : 'DESC'; break; case 'price' : $args['orderby'] = "meta_value_num ID"; $args['order'] = $order == 'DESC' ? 'DESC' : 'ASC'; $args['meta_key'] = '_price'; break; case 'popularity' : $args['meta_key'] = 'total_sales'; // Sorting handled later though a hook add_filter( 'posts_clauses', array( $this, 'order_by_popularity_post_clauses' ) ); break; case 'rating' : // Sorting handled later though a hook add_filter( 'posts_clauses', array( $this, 'order_by_rating_post_clauses' ) ); break; case 'title' : $args['orderby'] = 'title'; $args['order'] = $order == 'DESC' ? 'DESC' : 'ASC'; break; } return apply_filters( 'woocommerce_get_catalog_ordering_args', $args ); }
Forum: Plugins
In reply to: [WooCommerce] Default sort by SKUYes, this is exactly the problem. I tried with Twenty Sixteen theme and it works.
Avada support is not helping much when talking code…. Do you have an idea where I should search???
Forum: Plugins
In reply to: [WooCommerce] Default sort by SKUNice plugin!!!
But it doesn’t work ?? I also tried with several plugin doing the same thing and no result…
My page : https://cappiello.t4b.mx/index.php/catalogue/
My theme : Avada
I don’t really understand why this is happening
Forum: Plugins
In reply to: [WooCommerce] Make a new page linked to a custom shop pageI could get close to it with Woocommerce shortcode: [products skus=”foo, bar, baz” orderby=”date” order=”desc”]
What I still can’t do is putting filters / order and pagination…
Forum: Plugins
In reply to: [WooCommerce] Make a new page linked to a custom shop pageAvada says it is outside his scope of support ??
THe question itself is not really about the addon. It’s about cloning shop page, and link it to a page.
Basically, I could clone archive-product.php and modify it, but I don’t know how to link it to a page…