o' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .elementor-menu-cart__footer-buttons .elementor-button--view-cart:hover' => 'border-color: {{VALUE}};', ], 'condition' => [ 'view_cart_border_border!' => '', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'view_cart_border', 'selector' => '{{WRAPPER}} .elementor-button--view-cart', 'separator' => 'before', 'condition' => [ 'view_cart_button_show!' => '', ], ] ); $this->add_responsive_control( 'view_cart_button_border_radius', [ 'label' => esc_html__( 'Border Radius', 'elementor-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .elementor-menu-cart__footer-buttons a.elementor-button--view-cart' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'view_cart_button_show!' => '', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'view_cart_button_box_shadow', 'selector' => '{{WRAPPER}} .elementor-button--view-cart', 'condition' => [ 'view_cart_button_show!' => '', ], ] ); $this->add_responsive_control( 'view_cart_button_padding', [ 'label' => esc_html__( 'Padding', 'elementor-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], 'selectors' => [ '{{WRAPPER}}' => '--view-cart-button-padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'view_cart_button_show!' => '', ], 'separator' => 'after', ] ); $this->add_control( 'heading_checkout_button_style', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__( 'Checkout', 'elementor-pro' ), 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'cart_checkout_button_typography', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ], 'selector' => '{{WRAPPER}} .elementor-menu-cart__footer-buttons a.elementor-button--checkout', 'separator' => 'before', 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->start_controls_tabs( 'cart_checkout_button_text_colors', [ 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->start_controls_tab( 'heading_cart_checkout_button_normal_style', [ 'label' => esc_html__( 'Normal', 'elementor-pro' ), 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->add_control( 'checkout_button_text_color', [ 'label' => esc_html__( 'Text Color', 'elementor-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}}' => '--checkout-button-text-color: {{VALUE}};', ], 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->add_control( 'checkout_button_background_color', [ 'label' => esc_html__( 'Background Color', 'elementor-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}}' => '--checkout-button-background-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'heading_cart_checkout_button_hover_style', [ 'label' => esc_html__( 'Hover', 'elementor-pro' ), 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->add_control( 'checkout_button_hover_text_color', [ 'label' => esc_html__( 'Text Color', 'elementor-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}}' => '--checkout-button-hover-text-color: {{VALUE}};', ], 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->add_control( 'checkout_button_hover_background', [ 'label' => esc_html__( 'Background Color', 'elementor-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}}' => '--checkout-button-hover-background-color: {{VALUE}};', ], ] ); $this->add_control( 'checkout_button_border_hover_color', [ 'label' => esc_html__( 'Border Color', 'elementor-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .elementor-menu-cart__footer-buttons .elementor-button--checkout:hover' => 'border-color: {{VALUE}};', ], 'condition' => [ 'checkout_border_border!' => '', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'checkout_border', 'selector' => '{{WRAPPER}} .elementor-button--checkout', 'separator' => 'before', 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->add_responsive_control( 'view_checkout_button_border_radius', [ 'label' => esc_html__( 'Border Radius', 'elementor-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .elementor-menu-cart__footer-buttons a.elementor-button--checkout' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'view_checkout_button_box_shadow', 'selector' => '{{WRAPPER}} .elementor-button--checkout', 'condition' => [ 'checkout_button_show!' => '', ], ] ); $this->add_responsive_control( 'view_checkout_button_padding', [ 'label' => esc_html__( 'Padding', 'elementor-pro' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], 'selectors' => [ '{{WRAPPER}}' => '--checkout-button-padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'checkout_button_show!' => '', ], 'separator' => 'after', ] ); $this->end_controls_section(); $this->start_controls_section( 'section_style_messages', [ 'label' => esc_html__( 'Messages', 'elementor-pro' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'cart_empty_message_typography', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ], 'selector' => '{{WRAPPER}} .woocommerce-mini-cart__empty-message', ] ); $this->add_control( 'empty_message_color', [ 'label' => esc_html__( 'Empty Cart Message Color', 'elementor-pro' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}}' => '--empty-message-color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'empty_message_alignment', [ 'label' => esc_html__( 'Alignment', 'elementor-pro' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'elementor-pro' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'elementor-pro' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'elementor-pro' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => esc_html__( 'Justified', 'elementor-pro' ), 'icon' => 'eicon-text-align-justify', ], ], 'selectors' => [ '{{WRAPPER}}' => '--empty-message-alignment: {{VALUE}};', ], ] ); $this->end_controls_section(); } /** * Check if user did not explicitly disabled the use of our mini-cart template and set the option accordingly. * The option value is later used by Module::woocommerce_locate_template(). */ private function maybe_use_mini_cart_template() { $option_value = get_option( 'elementor_' . Module::OPTION_NAME_USE_MINI_CART, '' ); if ( empty( $option_value ) || 'initial' === $option_value ) { update_option( 'elementor_' . Module::OPTION_NAME_USE_MINI_CART, 'yes' ); } } protected function render() { $settings = $this->get_settings_for_display(); $this->maybe_use_mini_cart_template(); Module::render_menu_cart( $settings ); } public function render_plain_content() {} public function get_group_name() { return 'woocommerce'; } }