coolcoder
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] Conflict with Woocommerce PluginSame as @tony, only spinning icon when CF7 and Woocommerce plugins used together.
WP – v4.3
Contact Form 7 – v4.2.2 (latest)
Woocommerce – v2.4.6 (latest)
Theme – twentyfifteen
All other plugins disabled.Any help appreciated.
Got the issue.
‘add_to_cart_fragments’ is deprecated. With ‘woocommerce_add_to_cart_fragments’ works fine.add_filter('woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment');
Code is –
To ajaxify cart:
// Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php) add_filter('add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment'); function woocommerce_header_add_to_cart_fragment( $fragments ) { global $woocommerce; ob_start(); ?> <a>cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a> <?php $fragments['a.cart-contents'] = ob_get_clean(); return $fragments; }
To display the cart contents
<?php global $woocommerce; ?> <a>cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a>
Forum: Plugins
In reply to: [WooCommerce] 'Undefined index: post_type' on product delete or untrashWhy don’t you submit a support ticket with woothemes, you will get support for it. Looks like these notices are from theme itself, not necessary to disable plugins. Anyways, using isset could solve this.
Thanks for reply @lorro.
It does work when I tweak css manually for product li as per the columns I need. But does not go well except that.
Actually woocommerce page is supposed to take class columns-2 or columns-3 dynamically as per the columns specified with shop column snippet. Woocommerce has CSS ready for that.
.woocommerce-page.columns-1 ul.products li.product, .woocommerce.columns-1 ul.products li.product { width:100%; margin-right:0 } .woocommerce-page.columns-2 ul.products li.product, .woocommerce.columns-2 ul.products li.product { width:48% } .woocommerce-page.columns-3 ul.products li.product, .woocommerce.columns-3 ul.products li.product { width:30.75% } .woocommerce-page.columns-5 ul.products li.product, .woocommerce.columns-5 ul.products li.product { width:16.95% } .woocommerce-page.columns-6 ul.products li.product, .woocommerce.columns-6 ul.products li.product { width:13.5% }
Sorry no link currently, but similar behavior can be replicated with TwentyFourteen.
Edit
Forgot to mention. I’ve read this.
https://coenjacobs.me/changing-number-columns-woocommerce-2-1/
#1 and #2 passed so followed #3 ??
Forum: Plugins
In reply to: [Breadcrumb NavXT] Notice Undefined index for post format archive breadcrumbResolved.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Notice Undefined index for post format archive breadcrumbWorking Great! Thanks.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Notice Undefined index for post format archive breadcrumbMy bad…it wasn’t worked.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Notice Undefined index for post format archive breadcrumbUsing isset() like follows solved the issue. But not sure if it is correct method. Please let me know.
//Place the breadcrumb in the trail, uses the constructor to set the title, template, and type, get a pointer to it in return
if(isset($term)) { $breadcrumb = $this->add(new bcn_breadcrumb($term->name, $this->opt[‘Htax_’ . $term->taxonomy . ‘_template_no_anchor’], array(‘archive’, ‘taxonomy’, $term->taxonomy, ‘current-item’), NULL, $term->term_id)); }