JapeNZ
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Load WooCommerce Icons from static subdomainHi Mike,
All of the WooCommerce ones, the WordPress ones load fine but none of the Woo ones show up.
I removed the code for the time being as it also effects the front end WooCommerce icons (add to cart gif and tick, I assuming any others as well).
I’ll reapply the code now and send through some images so you can see what I mean.Appreciate your help mate ??
Kind regards,
JPForum: Plugins
In reply to: [WooCommerce] Add to Cart button in Recently Viewed WidgetMike, you are awesome! ??
Problem solved, thank you for your help.
Forum: Plugins
In reply to: [WooCommerce] Add to Cart button in Recently Viewed WidgetHi Mike ??
Well that’s what I would have thought but I’ll be damned if I can find it haha!
If I did then I’ve somehow managed to lose it, so I’ll have to try and work it out again.Would I be able to place add to cart code somewhere in the class-wc-widget-recently-viewed.php do you think?
global $product; $product_id = $product->id; echo do_shortcode('[add_to_cart id="'.$product_id.'"]');
I know you’re super busy with the update at the moment so unless you have a eureka ‘this is how it’s done’ moment I’ll just keep at it for a while.
It’s not something that’s going to bring my site to a grinding alt or anything… of course any suggestions or links you think might help will be very much appreciated ??
Kind regards,
JPForum: Plugins
In reply to: [Price Based on Country for WooCommerce] Price shown as on sale?Hi Oscar,
Thank you for getting back to me ??I do have WooCommerce Dynamic Pricing installed, is there a work around at all?
Are you likely to look at a fix for the conflict in the future or is it something that would need addressing from WooCommerce Dynamic Pricing’s end?Thanks again for your help.
Kind regards,
JPForum: Plugins
In reply to: [Price Based on Country for WooCommerce] Price shown as on sale?Hi there,
So I set the conversion rate to 1:1 (so NZ$1 = AU$1) and it doesn’t show ‘Save 100%’ or that all products are sale items, also the prices in store have the correct tax rate applied (being international sales they are exempt from NZ GST).When I reapply an exchange rate the in store price includes tax in shop view but not the product page though the product page still has ‘Save 100%’ in the price and is shown as on sale.
The correct tax free price is shown at checkout.Thanks again for your help.
Kind regards,
JPForum: Plugins
In reply to: [WooCommerce] sale_products shortcode questionPerfect! Thank you Mike ??
Forum: Plugins
In reply to: [WooCommerce] sale_products shortcode questionHaving a crack at creating a custom shortcode but am getting a fatal error:
add_shortcode( 'cbs_sale_products', 'cbs_sale_products_function' ); public function cbs_sale_products( $atts ){ global $woocommerce_loop, $woocommerce; extract( shortcode_atts( array( 'category' => '', 'per_page' => '12', 'columns' => '4', 'orderby' => 'title', 'order' => 'asc' ), $atts ) ); // Get products on sale $product_ids_on_sale = woocommerce_get_product_ids_on_sale(); $meta_query = array(); $meta_query[] = $woocommerce->query->visibility_meta_query(); $meta_query[] = $woocommerce->query->stock_status_meta_query(); $args = array( 'posts_per_page'=> $per_page, 'orderby' => $orderby, 'order' => $order, 'no_found_rows' => 1, 'post_status' => 'publish', 'post_type' => 'product', 'orderby' => 'date', 'order' => 'ASC', 'meta_query' => $meta_query, 'post__in' => $product_ids_on_sale, 'terms' => $category ); ob_start(); $products = new WP_Query( $args ); $woocommerce_loop['columns'] = $columns; if ( $products->have_posts() ) : ?> <?php woocommerce_product_loop_start(); ?> <?php while ( $products->have_posts() ) : $products->the_post(); ?> <?php woocommerce_get_template_part( 'content', 'product' ); ?> <?php endwhile; // end of the loop. ?> <?php woocommerce_product_loop_end(); ?> <?php endif; wp_reset_postdata(); return '<div class="woocommerce">' . ob_get_clean() . '</div>'; }
Any help would be very welcome ??
Kind regards,
JPHi isiteweb,
I had the same problem using the free version of YITH WooCommerce Product Slider Carousel on Chrome after updating to WordPress 4.5.
Once I’d cleared ‘cached images and files’ in Chrome history the slider worked perfectly again.
I also cleared my WP cache.
Hope this helps ??
Kind regards,
JapeNZForum: Plugins
In reply to: [WooCommerce] Add to basket?Awesome, thank again for all your help ??
Forum: Plugins
In reply to: [WooCommerce] Add to basket?Hi Claudio,
Thank you! Looks like this is exactly what’s happened.What’s the best way to revert it back? Should I change my language from English (New Zealand) to US?
Or can I change it back using a function?As it is any use of the word ‘cart’ now reads ‘basket’.
Thanks again!
Kind regards,
JPForum: Plugins
In reply to: [WooCommerce] Admin Bar reads 'Default copyright text?'Hi Mike,
Thanks for getting back to me right away ??I think you’re might be spot on mate, it looks like it’s more likely theme related.
Sorry I should have check it out more thoroughly before posting.
Am I able to delete the post?
Sorry again.
Kind regards,
JPForum: Plugins
In reply to: [WooCommerce] Variable product and standard product quantity totals in adminFair enough Mike, thank you for your time ??
Forum: Plugins
In reply to: [WooCommerce] Variable product and standard product quantity totals in adminHi Mike,
Thanks for getting back to me!Fair enough mate, being able to view the total stock will prove handy anyway.
I’m assuming it would be difficult (impossible?) to use the ‘get total stock’ code to define a custom meta key that I can then call for sorting?
Anyway thanks again, if there’s some reference material you think I might find useful please let me know ??
Kind regards,
JPForum: Plugins
In reply to: [WooCommerce] Variable product and standard product quantity totals in adminIs there some way I can / should be using this?
/** * Get total stock. * * This is the stock of parent and children combined. * * @return int */ public function get_total_stock() { if ( empty( $this->total_stock ) ) { if ( sizeof( $this->get_children() ) > 0 ) { $this->total_stock = max( 0, $this->get_stock_quantity() ); foreach ( $this->get_children() as $child_id ) { if ( 'yes' === get_post_meta( $child_id, '_manage_stock', true ) ) { $stock = get_post_meta( $child_id, '_stock', true ); $this->total_stock += max( 0, wc_stock_amount( $stock ) ); } } } else { $this->total_stock = $this->get_stock_quantity(); } } return wc_stock_amount( $this->total_stock ); }
Forum: Plugins
In reply to: [WooCommerce] Variable product and standard product quantity totals in adminOkay so I can make the simple products sortable using this code:
add_filter( 'manage_edit-product_sortable_columns', 'my_make_stock_sortable' ); function my_make_stock_sortable( $sortable_columns ) { $sortable_columns[ 'is_in_stock' ] = '_stock'; return $sortable_columns; } add_action( 'pre_get_posts', 'my_is_in_stock_orderby' ); function my_is_in_stock_orderby( $query ) { if( ! is_admin() ) return; $orderby = $query->get( 'orderby'); if( '_stock' == $orderby ) { $query->set('meta_key','_stock'); $query->set('orderby','meta_value_num'); } }
However it isn’t sorting the variable product amounts as well.
Am I able to order by whatever the In stock column is displaying?
I thought it was ‘_stock’ but clearly not.Any help would be very much appreciated ??
Kind regards,
JP