diff --git a/woocommerce/widgets/widgets.php b/woocommerce/widgets/widgets.php new file mode 100644 index 0000000..ff7451f --- /dev/null +++ b/woocommerce/widgets/widgets.php @@ -0,0 +1,32 @@ +'; + $cart_icon = ''; + + ob_start(); +?> + + + + + cart->cart_contents_count, 'woothemes' ), WC()->cart->cart_contents_count ); ?> + + + + +widget_cssclass = 'woocommerce widget_minicart'; + $this->widget_description = __( "Display the user's Cart.", 'ycb' ); + $this->widget_id = 'woocommerce_widget_minicart'; + $this->widget_name = __( 'YCB Mini Cart', 'ycb' ); + $this->settings = array(); + + parent::__construct(); + } + + /** + * widget function. + * + * @see WP_Widget + * + * @param array $args + * @param array $instance + */ + public function widget( $args, $instance ) { + global $theme_options; + + $cart_icon = ''; + + $this->widget_start( $args, $instance ); + + echo '
' . "\n"; + + echo ''; + + echo ' ' . $cart_icon . + '' . sprintf(_n( '%d', '%d', WC()->cart->cart_contents_count, 'woothemes' ), WC()->cart->cart_contents_count ) . '' . + ' ' . "\n"; + + echo '' . "\n"; + + echo '
'; + + // Insert cart widget placeholder - code in woocommerce.js will update this on page load + echo '
'; + + $this->widget_end( $args ); + + } +} \ No newline at end of file