/home/techb158/public_html/wp-content/themes/engitech/inc/backend/elementor-widgets/header
Edit: /home/techb158/public_html/wp-content/themes/engitech/inc/backend/elementor-widgets/header/cart.php (3836B)
start_controls_section(
'style_icon_section',
[
'label' => __( 'Icon', 'engitech' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'icon_size',
[
'label' => __( 'Icon Size', 'engitech' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 50,
],
],
'selectors' => [
'{{WRAPPER}} .octf-cart i:before' => 'font-size: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'icon_color',
[
'label' => __( 'Icon Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .octf-cart i' => 'color: {{VALUE}};',
]
]
);
$this->add_control(
'bg_count',
[
'label' => __( 'Background Count', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .octf-cart .count' => 'background: {{VALUE}};',
],
'separator' => 'before',
]
);
$this->add_control(
'count_color',
[
'label' => __( 'Count Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .octf-cart .count' => 'color: {{VALUE}};',
]
]
);
$this->end_controls_section();
}
public static function engitech_render_menu_cart() {
if ( null === WC()->cart ) {
return;
}
$product_count = sprintf ( _n( '%d', '%d', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() );
$cart_url = esc_url( wc_get_cart_url() );
$widget_cart_is_hidden = apply_filters( 'woocommerce_widget_cart_is_hidden', false );
?>
get_settings_for_display();
self::engitech_render_menu_cart();
}
protected function _content_template() {}
}
// After the Engitech_Cart class is defined, I must register the new widget class with Elementor:
Plugin::instance()->widgets_manager->register_widget_type( new Engitech_Cart() );