start_controls_section( 'section_content', [ 'label' => esc_html__( 'Content', 'nighty' ), ] ); $this->add_control( 'icon', [ 'label' => esc_html__( 'Icon', 'nighty' ), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'ovaicon ovaicon-shopping-cart-empty-side-view', 'library' => 'all', ], ] ); $this->add_control( 'text_empty', [ 'label' => esc_html__( 'Text Empty', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( 'Your Cart is Empty', 'nighty' ), ] ); $this->end_controls_section(); $this->start_controls_section( 'section_icon', [ 'label' => esc_html__( 'Icon', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'icon_size', [ 'label' => esc_html__( 'Size', 'nighty' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ] ], 'selectors' => [ '{{WRAPPER}} .ova-menu-cart .cart-total i' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'color_icon', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-menu-cart .cart-total i' => 'color : {{VALUE}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'section_items', [ 'label' => esc_html__( 'Items', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'bg_items_size', [ 'label' => esc_html__( 'Background Size', 'nighty' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 20, 'max' => 100, 'step' => 1, ] ], 'selectors' => [ '{{WRAPPER}} .ova-menu-cart .cart-total .items' => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'color_number', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-menu-cart .cart-total .items' => 'color : {{VALUE}};', ], ] ); $this->add_control( 'bgcolor_number', [ 'label' => esc_html__( 'Background Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-menu-cart .cart-total .items' => 'background-color : {{VALUE}};', ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings(); $text_empty = $settings['text_empty']; ?>
'true' ] ); ?> cart != null && WC()->cart->get_cart_contents_count( ) >= 1 ) ? WC()->cart->get_cart_contents_count( ) : 0; ?>
cart != null && WC()->cart->get_cart_contents_count( ) >= 1 ){ woocommerce_mini_cart(); }else{ echo esc_html($text_empty); } ?>
register( new nighty_Elementor_Menu_Cart() );