is_type_instance(); if ( !$is_type_instance && null === $args ) { throw new \Exception( '`$args` argument is required when initializing a full widget instance.' ); } if ( $is_type_instance && class_exists( 'woocommerce' ) ) { $this->load_quick_view_asset(); } } public function get_name() { return 'eael-woo-product-gallery'; } public function get_title() { return esc_html__( 'Woo Product Gallery', 'essential-addons-for-elementor-lite' ); } public function get_icon() { return 'eaicon-product-gallery'; } public function get_categories() { return [ 'essential-addons-elementor' ]; } public function get_keywords() { return [ 'woo', 'woocommerce', 'ea woocommerce', 'ea woo product gallery', 'ea woocommerce product gallery', 'product gallery', 'woocommerce gallery', 'gallery', 'ea', 'essential addons', ]; } public function get_custom_help_url() { return 'https://essential-addons.com/elementor/docs/woo-product-gallery/'; } public function get_style_depends() { return [ 'font-awesome-5-all', 'font-awesome-4-shim', ]; } public function get_script_depends() { return [ 'font-awesome-4-shim', ]; } protected function init_content_wc_notice_controls() { if ( !function_exists( 'WC' ) ) { $this->start_controls_section( 'eael_global_warning', [ 'label' => __( 'Warning!', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_global_warning_text', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => __( 'WooCommerce is not installed/activated on your site. Please install and activate WooCommerce first.', 'essential-addons-for-elementor-lite' ), 'content_classes' => 'eael-warning', ] ); $this->end_controls_section(); return; } } protected function eael_get_product_orderby_options() { return apply_filters( 'eael/product-gallery/orderby-options', [ 'ID' => __( 'Product ID', 'essential-addons-for-elementor-lite' ), 'title' => __( 'Product Title', 'essential-addons-for-elementor-lite' ), '_price' => __( 'Price', 'essential-addons-for-elementor-lite' ), '_sku' => __( 'SKU', 'essential-addons-for-elementor-lite' ), 'date' => __( 'Date', 'essential-addons-for-elementor-lite' ), 'modified' => __( 'Last Modified Date', 'essential-addons-for-elementor-lite' ), 'parent' => __( 'Parent Id', 'essential-addons-for-elementor-lite' ), 'rand' => __( 'Random', 'essential-addons-for-elementor-lite' ), 'menu_order' => __( 'Menu Order', 'essential-addons-for-elementor-lite' ), ] ); } protected function eael_get_product_filterby_options() { return apply_filters( 'eael/product-gallery/filterby-options', [ 'recent-products' => esc_html__( 'Recent Products', 'essential-addons-for-elementor-lite' ), 'featured-products' => esc_html__( 'Featured Products', 'essential-addons-for-elementor-lite' ), 'best-selling-products' => esc_html__( 'Best Selling Products', 'essential-addons-for-elementor-lite' ), 'sale-products' => esc_html__( 'Sale Products', 'essential-addons-for-elementor-lite' ), 'top-products' => esc_html__( 'Top Rated Products', 'essential-addons-for-elementor-lite' ), ] ); } protected function register_controls() { $this->init_content_wc_notice_controls(); if ( !function_exists( 'WC' ) ) { return; } // Content Controls $this->init_content_layout_controls(); $this->init_content_product_settings_controls(); $this->eael_product_badges(); $this->init_content_load_more_controls(); // Style Controls--------------- $this->init_style_gallery_controls(); $this->init_style_product_controls(); $this->init_style_color_typography_controls(); $this->init_style_addtocart_controls(); $this->eael_product_action_buttons(); $this->eael_product_action_buttons_style(); do_action( 'eael/controls/load_more_button_style', $this ); $this->eael_product_view_popup_style(); } protected function init_content_layout_controls() { $this->start_controls_section( 'eael_section_product_gallery_layouts', [ 'label' => esc_html__( 'Layouts', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_woo_product_gallery_cat_heading', [ 'label' => __( 'Gallery', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'eael_product_gallery_terms_position', [ 'label' => __( 'Position', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'eael-terms-layout-horizontal', 'options' => [ 'eael-terms-layout-horizontal' => __( 'Horizontal', 'essential-addons-for-elementor-lite' ), 'eael-terms-layout-vertical' => __( 'Vertical', 'essential-addons-for-elementor-lite' ), ], ] ); $this->add_responsive_control( 'eael_product_gallery_terms_horizontal_align', [ 'label' => __( 'Alignment', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'center', 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .eael-cat-tab' => 'text-align: {{VALUE}};', ], 'condition' => [ 'eael_product_gallery_terms_position' => 'eael-terms-layout-horizontal', ], ] ); $this->add_control( 'eael_product_gallery_terms_vertical_align', [ 'label' => __( 'Alignment', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'row' => [ 'title' => __( 'Left', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-left', ], 'row-reverse' => [ 'title' => __( 'Right', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'row', 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .eael-product-gallery' => 'flex-direction: {{VALUE}};', ], 'condition' => [ 'eael_product_gallery_terms_position' => 'eael-terms-layout-vertical', ], ] ); $this->add_control( 'eael_woo_product_gallery_terms_show_all', [ 'label' => __( 'Show All Category Tab', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'label_on' => __( 'Yes', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'No', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', ] ); $this->add_control( 'eael_woo_product_gallery_terms_all_text', [ 'label' => esc_html__( 'Change All Text', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true ], 'label_block' => false, 'default' => esc_html__( 'All', 'essential-addons-for-elementor-lite' ), 'condition' => [ 'eael_woo_product_gallery_terms_show_all' => 'yes', ], ] ); $this->add_control( 'eael_woo_product_gallery_terms_thumb', [ 'label' => __( 'Show Category Thumbnail', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'label_on' => __( 'Yes', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'No', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'description' => __( 'Display thumbnail if a category has a thumbnail.', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_all_tab_thumb', [ 'label' => esc_html__( 'Choose All Tab Thumb', 'elementor' ), 'type' => Controls_Manager::MEDIA, 'dynamic' => [ 'active' => true, ], 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], 'condition' => [ 'eael_woo_product_gallery_terms_show_all' => 'yes', 'eael_woo_product_gallery_terms_thumb' => 'yes', ], ] ); $this->add_control( 'eael_woo_product_gallery_product_heading', [ 'label' => __( 'Product', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'eael_product_gallery_items_layout', [ 'label' => esc_html__( 'Layout', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'grid', 'options' => [ 'grid' => esc_html__( 'Grid', 'essential-addons-for-elementor-lite' ), 'masonry' => esc_html__( 'Masonry', 'essential-addons-for-elementor-lite' ), ] ] ); $this->add_control( 'eael_product_gallery_style_preset', [ 'label' => esc_html__( 'Style Preset', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'eael-product-preset-1', 'options' => [ 'eael-product-preset-1' => esc_html__( 'Preset 1', 'essential-addons-for-elementor-lite' ), 'eael-product-preset-2' => esc_html__( 'Preset 2', 'essential-addons-for-elementor-lite' ), 'eael-product-preset-3' => esc_html__( 'Preset 3', 'essential-addons-for-elementor-lite' ), 'eael-product-preset-4' => esc_html__( 'Preset 4', 'essential-addons-for-elementor-lite' ), ], ] ); $this->add_responsive_control( 'eael_product_gallery_column', [ 'label' => esc_html__( 'Columns', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => '3', 'options' => [ '1' => esc_html__( '1', 'essential-addons-for-elementor-lite' ), '2' => esc_html__( '2', 'essential-addons-for-elementor-lite' ), '3' => esc_html__( '3', 'essential-addons-for-elementor-lite' ), '4' => esc_html__( '4', 'essential-addons-for-elementor-lite' ), '5' => esc_html__( '5', 'essential-addons-for-elementor-lite' ), '6' => esc_html__( '6', 'essential-addons-for-elementor-lite' ), ], 'toggle' => true, 'prefix_class' => 'eael-product-gallery-column%s-', ] ); $this->end_controls_section(); } protected function init_content_product_settings_controls() { $this->start_controls_section( 'eael_section_product_gallery_settings', [ 'label' => esc_html__( 'Product Settings', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'post_type', [ 'label' => __( 'Source', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'product', 'options' => [ 'product' => esc_html__( 'Products', 'essential-addons-for-elementor-lite' ), 'source_dynamic' => esc_html__( 'Dynamic', 'essential-addons-for-elementor-lite' ), ], ] ); $this->add_control( 'eael_global_dynamic_source_warning_text', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => __( 'This option will only affect in Archive page of Elementor Theme Builder dynamically.', 'essential-addons-for-elementor-lite' ), 'content_classes' => 'eael-warning', 'condition' => [ 'post_type' => 'source_dynamic', ], ] ); $this->add_control( 'eael_product_gallery_product_filter', [ 'label' => esc_html__( 'Filter By', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'recent-products', 'options' => $this->eael_get_product_filterby_options(), 'condition' => [ 'post_type!' => 'source_dynamic', ], ] ); $this->add_control( 'orderby', [ 'label' => __( 'Order By', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'options' => $this->eael_get_product_orderby_options(), 'default' => 'date', ] ); $this->add_control( 'order', [ 'label' => __( 'Order', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'asc' => 'Ascending', 'desc' => 'Descending', ], 'default' => 'desc', ] ); $this->add_control( 'eael_product_gallery_products_count', [ 'label' => __( 'Products Count', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::NUMBER, 'default' => 3, 'min' => 1, 'max' => 1000, 'step' => 1, ] ); $this->add_control( 'product_offset', [ 'label' => __( 'Offset', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::NUMBER, 'default' => 0, ] ); $this->add_control( 'eael_product_gallery_categories', [ 'label' => __( 'Product Categories', 'essential-addons-for-elementor-lite' ), 'type' => 'eael-select2', 'source_name' => 'taxonomy', 'source_type' => 'product_cat', 'label_block' => true, 'multiple' => true, ] ); $this->add_control( 'eael_product_gallery_dynamic_template', [ 'label' => esc_html__( 'Layout', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'default', 'options' => $this->get_template_list_for_dropdown(), ] ); $this->add_control( 'eael_product_gallery_title_html_tag', [ 'label' => __( 'Title HTML Tag', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'h2', 'options' => [ 'h1' => __( 'H1', 'essential-addons-for-elementor-lite' ), 'h2' => __( 'H2', 'essential-addons-for-elementor-lite' ), 'h3' => __( 'H3', 'essential-addons-for-elementor-lite' ), 'h4' => __( 'H4', 'essential-addons-for-elementor-lite' ), 'h5' => __( 'H5', 'essential-addons-for-elementor-lite' ), 'h6' => __( 'H6', 'essential-addons-for-elementor-lite' ), 'div' => __( 'div', 'essential-addons-for-elementor-lite' ), 'span' => __( 'span', 'essential-addons-for-elementor-lite' ), 'p' => __( 'p', 'essential-addons-for-elementor-lite' ), ], ] ); $this->add_control( 'eael_product_gallery_rating', [ 'label' => esc_html__( 'Show Product Rating?', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'eael_product_gallery_style_preset!' => [ 'eael-product-preset-1' ], ], ] ); $this->add_control( 'eael_product_gallery_show_secondary_image', [ 'label' => __( 'Show Secondary Image on Hover', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'label_on' => __( 'Yes', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'No', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'description' => __( 'Enable to show a secondary image from the product gallery on hover.', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_product_gallery_price', [ 'label' => esc_html__( 'Show Product Price?', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'eael_product_gallery_style_preset!' => 'eael-product-default', ], ] ); $this->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'eael_product_gallery_image_size', 'exclude' => [ 'custom' ], 'default' => 'medium', 'label_block' => true, ] ); $this->end_controls_section(); } protected function init_content_load_more_controls() { $this->start_controls_section( 'eael_product_gallery_load_more_section', [ 'label' => esc_html__( 'Load More', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'show_load_more', [ 'label' => __( 'Show Load More', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'true', 'default' => '', ] ); $this->add_control( 'show_load_more_text', [ 'label' => esc_html__( 'Label Text', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::TEXT, 'label_block' => false, 'default' => esc_html__( 'Load More', 'essential-addons-for-elementor-lite' ), 'condition' => [ 'show_load_more' => [ 'yes', '1', 'true' ], ], ] ); $this->end_controls_section(); # end of section 'Load More' } protected function init_style_product_controls() { $this->start_controls_section( 'eael_product_gallery_styles', [ 'label' => esc_html__( 'Products', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'eael_product_gallery_content_alignment', [ 'label' => __( 'Alignment', 'essential-addons-for-elementor-lite' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'center', 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product' => 'text-align: {{VALUE}};', ], 'condition' => [ 'eael_product_gallery_style_preset' => 'eael-product-preset-4', ], ] ); $this->add_control( 'eael_product_gallery_background_color', [ 'label' => esc_html__( 'Content Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#fff', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product, {{WRAPPER}} .eael-product-gallery .icons-wrap.block-box-style' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'eael_peoduct_gallery_padding', [ 'label' => __( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_product_gallery_style_preset' => 'eael-product-preset-4', ], ] ); $this->start_controls_tabs( 'eael_product_gallery_tabs' ); $this->start_controls_tab( 'eael_product_gallery_tabs_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-for-elementor-lite' ) ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_peoduct_gallery_border', 'fields_options' => [ 'border' => [ 'default' => 'solid', ], 'width' => [ 'default' => [ 'top' => '1', 'right' => '1', 'bottom' => '1', 'left' => '1', 'isLinked' => false, ], ], 'color' => [ 'default' => '#eee', ], ], 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product', ] ); $this->add_group_control( \Elementor\Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_peoduct_gallery_shadow', 'label' => __( 'Box Shadow', 'essential-addons-for-elementor-lite' ), 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_product_gallery_hover_styles', [ 'label' => esc_html__( 'Hover', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_gallery_hover_border_color', [ 'label' => esc_html__( 'Border Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product:hover' => 'border-color: {{VALUE}};', ], 'condition' => [ 'eael_peoduct_gallery_border_border!' => '', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_product_gallery_box_shadow_hover', 'label' => __( 'Box Shadow', 'essential-addons-for-elementor-lite' ), 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'eael_peoduct_gallery_border_radius', [ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => 5, 'right' => 5, 'bottom' => 5, 'left' => 5, 'isLinked' => true, ], 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product woocommerce-loop-product__link img' => 'border-radius: {{TOP}}px {{RIGHT}}px 0 0;', ], ] ); $this->add_responsive_control( 'eael_product_gallery_inner_padding', [ 'label' => __( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'top' => '15', 'right' => '15', 'bottom' => '15', 'left' => '15', 'unit' => 'px', 'isLinked' => true, ], 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .eael-product-wrap .product-details-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_product_gallery_style_preset!' => 'eael-product-preset-4', ], ] ); $this->end_controls_section(); } protected function init_style_color_typography_controls() { $this->start_controls_section( 'eael_section_product_gallery_typography', [ 'label' => esc_html__( 'Color & Typography', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'eael_product_gallery_product_title_heading', [ 'label' => __( 'Product Title', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'eael_product_gallery_product_title_color', [ 'label' => esc_html__( 'Product Title Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#272727', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .woocommerce-loop-product__title, {{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .eael-product-title *' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_gallery_product_title_typography', 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .woocommerce-loop-product__title, {{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .eael-product-title *', ] ); $this->add_control( 'eael_product_gallery_product_price_heading', [ 'label' => __( 'Product Price', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'eael_product_gallery_product_price_color', [ 'label' => esc_html__( 'Price Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#272727', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .price, {{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .eael-product-price' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_product_sale_price_color', [ 'label' => esc_html__( 'Sale Price Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .price ins, {{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .eael-product-price ins' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_gallery_product_price_typography', 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .price,{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .eael-product-price', ] ); $this->add_control( 'eael_product_gallery_product_rating_heading', [ 'label' => __( 'Star Rating', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'eael_product_gallery_product_rating_color', [ 'label' => esc_html__( 'Rating Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#f2b01e', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce .star-rating::before' => 'color: {{VALUE}};', '{{WRAPPER}} .eael-product-gallery .woocommerce .star-rating span::before' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_gallery_product_rating_typography', 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .star-rating', 'condition' => [ 'eael_product_gallery_style_preset!' => [ 'eael-product-preset-3', 'eael-product-preset-2', 'eael-product-preset-1', ], ], ] ); $this->add_responsive_control( 'eael_product_gallery_product_rating_size', [ 'label' => esc_html__( 'Icon Size', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 50, ], ], 'default' => [ 'size' => 15, ], 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce ul.products li.product .star-rating' => 'font-size: {{SIZE}}px!important;', ], 'condition' => [ 'eael_product_gallery_style_preset' => [ 'eael-product-preset-3', 'eael-product-preset-2', ], ], ] ); $this->add_control( 'eael_product_gallery_sale_badge_heading', [ 'label' => __( 'Sale Badge', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'eael_product_gallery_sale_badge_color', [ 'label' => esc_html__( 'Sale Badge Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#fff', 'selectors' => [ '{{WRAPPER}} .woocommerce ul.products li.product .onsale, {{WRAPPER}} .woocommerce ul.products li.product .eael-onsale' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_sale_badge_background', [ 'label' => esc_html__( 'Sale Badge Background', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#ff2a13', 'selectors' => [ '{{WRAPPER}} .woocommerce ul.products li.product .onsale, {{WRAPPER}} .woocommerce ul.products li.product .eael-onsale' => 'background-color: {{VALUE}};', '{{WRAPPER}} .woocommerce ul.products li.product .eael-onsale:not(.outofstock).sale-preset-4:after' => 'border-left-color: {{VALUE}}; border-right-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_gallery_sale_badge_typography', 'selector' => '{{WRAPPER}} .woocommerce ul.products li.product .onsale, {{WRAPPER}} .woocommerce ul.products li.product .eael-onsale:not(.outofstock)', ] ); // stock out badge $this->add_control( 'eael_product_gallery_stock_out_badge_heading', [ 'label' => __( 'Stock Out Badge', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'eael_product_gallery_stock_out_badge_color', [ 'label' => esc_html__( 'Stock Out Badge Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#fff', 'selectors' => [ '{{WRAPPER}} .woocommerce ul.products li.product .outofstock-badge, {{WRAPPER}} .woocommerce ul.products li.product .eael-onsale.outofstock' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_stock_out_badge_background', [ 'label' => esc_html__( 'Stock Out Badge Background', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#ff2a13', 'selectors' => [ '{{WRAPPER}} .woocommerce ul.products li.product .outofstock-badge, {{WRAPPER}} .woocommerce ul.products li.product .eael-onsale.outofstock' => 'background-color: {{VALUE}};', '{{WRAPPER}} .woocommerce ul.products li.product .eael-onsale.outofstock.sale-preset-4:after' => 'border-left-color: {{VALUE}}; border-right-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_gallery_stock_out_badge_typography', 'selector' => '{{WRAPPER}} .woocommerce ul.products li.product .outofstock-badge, {{WRAPPER}} .woocommerce ul.products li.product .eael-onsale.outofstock', ] ); $this->end_controls_section(); } // add to cart button protected function init_style_addtocart_controls() { $this->start_controls_section( 'eael_section_product_gallery_add_to_cart_styles', [ 'label' => esc_html__( 'Add to Cart Button Styles', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'eael_product_gallery_style_preset!' => [ 'eael-product-preset-3', 'eael-product-preset-2', 'eael-product-preset-1', ], ], ] ); $this->add_control( 'eael_product_gallery_add_to_cart_padding', [ 'label' => __( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'eael_product_gallery_add_to_cart_radius', [ 'label' => __( 'Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'eael_product_gallery_add_to_cart_is_gradient_bg', [ 'label' => __( 'Use Gradient Background', 'essential-addons-for-elementor-lite' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', ] ); $this->start_controls_tabs( 'eael_product_gallery_add_to_cart_style_tabs' ); $this->start_controls_tab( 'normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_gallery_add_to_cart_color', [ 'label' => esc_html__( 'Button Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#fff', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'eael_product_gallery_add_to_cart_gradient_background', 'label' => __( 'Background', 'essential-addons-for-elementor-lite' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart', 'condition' => [ 'eael_product_gallery_add_to_cart_is_gradient_bg' => 'yes' ] ] ); $this->add_control( 'eael_product_gallery_add_to_cart_background', [ 'label' => esc_html__( 'Background', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#4045AE', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart' => 'background-color: {{VALUE}};', ], 'condition' => [ 'eael_product_gallery_add_to_cart_is_gradient_bg' => '' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_product_gallery_add_to_cart_border', 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_gallery_add_to_cart_typography', 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart', 'condition' => [ 'eael_product_gallery_style_preset' => [ 'eael-product-preset-4' ], ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_product_gallery_add_to_cart_hover_styles', [ 'label' => esc_html__( 'Hover', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_gallery_add_to_cart_hover_color', [ 'label' => esc_html__( 'Button Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#fff', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button:hover, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button:hover, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart:hover' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'eael_product_gallery_add_to_cart_hover_gradient_background', 'label' => __( 'Background', 'essential-addons-for-elementor-lite' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button:hover, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button:hover, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart:hover', 'condition' => [ 'eael_product_gallery_add_to_cart_is_gradient_bg' => 'yes' ] ] ); $this->add_control( 'eael_product_gallery_add_to_cart_hover_background', [ 'label' => esc_html__( 'Background', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#4045AE', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button:hover, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button:hover, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart:hover' => 'background-color: {{VALUE}};', ], 'condition' => [ 'eael_product_gallery_add_to_cart_is_gradient_bg' => '', ], ] ); $this->add_control( 'eael_product_gallery_add_to_cart_hover_border_color', [ 'label' => esc_html__( 'Border Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .woocommerce li.product .button:hover, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .button.add_to_cart_button:hover, {{WRAPPER}} .eael-product-gallery .woocommerce li.product .added_to_cart:hover' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } protected function init_style_gallery_controls() { // add to cart button $this->start_controls_section( 'eael_section_product_gallery', [ 'label' => esc_html__( 'Gallery Styles', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'eael_product_gallery_background', [ 'label' => esc_html__( 'Background', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-cat-tab' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_terms', [ 'label' => __( 'Width', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ '%' ], 'range' => [ '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .eael-cat-tab' => 'width: {{SIZE}}%;', '{{WRAPPER}} .woocommerce' => 'width: calc(100% - {{SIZE}}%);', ], 'condition' => [ 'eael_product_gallery_terms_position' => 'eael-terms-layout-vertical', ] ] ); $this->add_control( 'eael_product_gallery_terms_gap', [ 'label' => __( 'Gap', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ '%' ], 'range' => [ '%' => [ 'min' => 0, 'max' => 20, ], ], 'selectors' => [ '{{WRAPPER}} .eael-product-gallery' => 'gap: {{SIZE}}%;', ], 'condition' => [ 'eael_product_gallery_terms_position' => 'eael-terms-layout-vertical', ] ] ); $this->add_responsive_control( 'eael_product_gallery_margin', [ 'label' => __( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-cat-tab' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_product_gallery_padding', [ 'label' => __( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-cat-tab' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_product_gallery_radius', [ 'label' => __( 'Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-cat-tab' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_product_gallery_box_shadow', 'label' => __( 'Box Shadow', 'essential-addons-for-elementor-lite' ), 'selector' => '{{WRAPPER}} .eael-cat-tab', ] ); $this->add_control( 'eael_product_gallery_item_heading', [ 'label' => __( 'Items', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before' ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_gallery_item_typography', 'selector' => '{{WRAPPER}} .eael-cat-tab a', ] ); $this->add_responsive_control( 'eael_product_gallery_item_margin', [ 'label' => __( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_product_gallery_item_padding', [ 'label' => __( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_product_gallery_item_radius', [ 'label' => __( 'Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->start_controls_tabs( 'eael_product_gallery_item_style_tabs' ); $this->start_controls_tab( 'eael_product_gallery_item_style_tabs_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_gallery_item_color', [ 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_item_background', [ 'label' => esc_html__( 'Background', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_product_gallery_item_border', 'selector' => '{{WRAPPER}} .eael-cat-tab a', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_product_gallery_item_hover_styles', [ 'label' => esc_html__( 'Hover', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_gallery_item_hover_color', [ 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_item_hover_background', [ 'label' => esc_html__( 'Background', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_item_hover_border_color', [ 'label' => esc_html__( 'Border Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a:hover' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_product_gallery_item_active_styles', [ 'label' => esc_html__( 'Active', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_gallery_item_active_color', [ 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a.active' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_item_active_background', [ 'label' => esc_html__( 'Background', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a.active' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_item_active_border_color', [ 'label' => esc_html__( 'Border Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .eael-cat-tab a.active' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_product_gallery_item_box_shadow', 'label' => __( 'Box Shadow', 'essential-addons-for-elementor-lite' ), 'selector' => '{{WRAPPER}} .eael-cat-tab a', ] ); $this->add_control( 'eael_product_gallery_item_thumb_heading', [ 'label' => __( 'Thumbnail', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_woo_product_gallery_terms_thumb' => 'yes', ] ] ); $this->add_control( 'eael_product_gallery_item_thumb_width', [ 'label' => __( 'Width (PX)', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .eael-cat-tab img' => 'width: {{SIZE}}px;', ], 'condition' => [ 'eael_woo_product_gallery_terms_thumb' => 'yes', ] ] ); $this->add_control( 'eael_product_gallery_item_thumb_space', [ 'label' => __( 'Space Between', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'selectors' => [ '{{WRAPPER}} .eael-terms-layout-horizontal .eael-cat-tab img' => 'margin-bottom: {{SIZE}}px};', '{{WRAPPER}} .eael-terms-layout-vertical .eael-cat-tab img' => 'margin-right: {{SIZE}}px};', ], 'condition' => [ 'eael_woo_product_gallery_terms_thumb' => 'yes', ] ] ); $this->end_controls_section(); } protected function eael_product_badges() { $this->start_controls_section( 'eael_section_product_badges', [ 'label' => esc_html__( 'Sale / Stock Out Badge', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_product_sale_badge_preset', [ 'label' => esc_html__( 'Style Preset', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'sale-preset-1', 'options' => [ 'sale-preset-1' => esc_html__( 'Preset 1', 'essential-addons-for-elementor-lite' ), 'sale-preset-2' => esc_html__( 'Preset 2', 'essential-addons-for-elementor-lite' ), 'sale-preset-3' => esc_html__( 'Preset 3', 'essential-addons-for-elementor-lite' ), 'sale-preset-4' => esc_html__( 'Preset 4', 'essential-addons-for-elementor-lite' ), 'sale-preset-5' => esc_html__( 'Preset 5', 'essential-addons-for-elementor-lite' ), ] ] ); $this->add_control( 'eael_product_sale_badge_alignment', [ 'label' => __( 'Alignment', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-left', ], 'right' => [ 'title' => __( 'Right', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-right', ], ], ] ); $this->add_control( 'eael_product_gallery_sale_text', [ 'label' => esc_html__( 'Sale Text', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::TEXT, 'separator' => 'before', ] ); $this->add_control( 'eael_product_gallery_stockout_text', [ 'label' => esc_html__( 'Stock Out Text', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::TEXT, ] ); $this->end_controls_section(); } protected function eael_product_action_buttons() { $this->start_controls_section( 'eael_section_product_action_buttons', [ 'label' => esc_html__( 'Buttons', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_product_gallery_quick_view', [ 'label' => esc_html__( 'Show Quick view?', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'eael_product_gallery_style_preset!' => [ 'eael-product-preset-4', ], ], ] ); $this->add_control( 'eael_product_quick_view_title_tag', [ 'label' => __( 'Quick view Title Tag', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'h1', 'separator' => 'after', 'options' => [ 'h1' => __( 'H1', 'essential-addons-for-elementor-lite' ), 'h2' => __( 'H2', 'essential-addons-for-elementor-lite' ), 'h3' => __( 'H3', 'essential-addons-for-elementor-lite' ), 'h4' => __( 'H4', 'essential-addons-for-elementor-lite' ), 'h5' => __( 'H5', 'essential-addons-for-elementor-lite' ), 'h6' => __( 'H6', 'essential-addons-for-elementor-lite' ), 'span' => __( 'Span', 'essential-addons-for-elementor-lite' ), 'p' => __( 'P', 'essential-addons-for-elementor-lite' ), 'div' => __( 'Div', 'essential-addons-for-elementor-lite' ), ], 'condition' => [ 'eael_product_gallery_style_preset!' => [ 'eael-product-preset-4', ], 'eael_product_gallery_quick_view' => 'yes', ], ] ); $this->add_control( 'eael_product_gallery_addtocart_show', [ 'label' => esc_html__( 'Show Add to Cart?', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'eael_product_gallery_link_show', [ 'label' => esc_html__( 'Show Link?', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'eael_product_gallery_style_preset!' => [ 'eael-product-preset-4', ], ], ] ); $this->add_control( 'eael_product_gallery_image_clickable', [ 'label' => esc_html__( 'Image Clickable?', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', ] ); $this->end_controls_section(); } protected function eael_product_action_buttons_style() { $this->start_controls_section( 'eael_section_product_gallery_buttons_styles', [ 'label' => esc_html__( 'Button', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'eael_product_gallery_style_preset' => [ 'eael-product-preset-3', 'eael-product-preset-2', 'eael-product-preset-1', ], ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_gallery_buttons_typography', 'selector' => '{{WRAPPER}} .eael-product-gallery .icons-wrap li.add-to-cart a', ] ); $this->start_controls_tabs( 'eael_product_gallery_buttons_style_tabs' ); $this->start_controls_tab( 'eael_product_gallery_buttons_style_tabs_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_gallery_buttons_color', [ 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#fff', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .eael-product-wrap .icons-wrap li a' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_buttons_background', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#8040FF', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .eael-product-wrap .icons-wrap li a' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_buttons_border_radius', [ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 100, ], ], 'default' => [ 'size' => 3, ], 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .eael-product-wrap .icons-wrap:not(.details-block-style-2) li a' => 'border-radius: {{SIZE}}px;', '{{WRAPPER}} .eael-product-gallery .eael-product-wrap .icons-wrap.details-block-style-2 li:only-child a' => 'border-radius: {{SIZE}}px!important;', '{{WRAPPER}} .eael-product-gallery .eael-product-wrap .icons-wrap.details-block-style-2 li:first-child a' => 'border-radius: {{SIZE}}px 0 0 {{SIZE}}px;', '{{WRAPPER}} .eael-product-gallery .eael-product-wrap .icons-wrap.details-block-style-2 li:last-child a' => 'border-radius: 0 {{SIZE}}px {{SIZE}}px 0;', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_product_gallery_buttons_hover_styles', [ 'label' => esc_html__( 'Hover', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_gallery_buttons_hover_color', [ 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#F5EAFF', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .eael-product-wrap .icons-wrap li a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_gallery_buttons_hover_background', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#4045AE', 'selectors' => [ '{{WRAPPER}} .eael-product-gallery .eael-product-wrap .icons-wrap li a:hover' => 'background-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } protected function eael_product_view_popup_style() { $this->start_controls_section( 'eael_product_popup', [ 'label' => __( 'Popup', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'eael_product_gallery_quick_view' => 'yes', 'eael_product_gallery_style_preset!' => [ 'eael-product-preset-4', ], ], ] ); $this->add_control( 'eael_product_popup_title', [ 'label' => __( 'Title', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_popup_title_typography', 'label' => __( 'Typography', 'essential-addons-for-elementor-lite' ), 'selector' => '.eael-popup-details-render{{WRAPPER}} div.product .product_title', ] ); $this->add_control( 'eael_product_popup_title_color', [ 'label' => __( 'Title Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#252525', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} div.product .product_title' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_price', [ 'label' => __( 'Price', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_popup_price_typography', 'label' => __( 'Typography', 'essential-addons-for-elementor-lite' ), 'selector' => '.eael-popup-details-render{{WRAPPER}} div.product .price', ] ); $this->add_control( 'eael_product_popup_price_color', [ 'label' => __( 'Price Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#0242e4', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} div.product .price' => 'color: {{VALUE}}!important;', ], ] ); $this->add_control( 'eael_product_popup_sale_price_color', [ 'label' => __( 'Sale Price Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#ff2a13', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} div.product .price ins' => 'color: {{VALUE}}!important;', ], ] ); $this->add_control( 'eael_product_popup_content', [ 'label' => __( 'Content', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_popup_content_typography', 'label' => __( 'Typography', 'essential-addons-for-elementor-lite' ), 'selector' => '.eael-popup-details-render{{WRAPPER}} div.product .woocommerce-product-details__short-description', ] ); $this->add_control( 'eael_product_popup_content_color', [ 'label' => __( 'Content Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#707070', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .woocommerce-product-details__short-description' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_review_link_color', [ 'label' => __( 'Review Link Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#707070', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .product_meta a.woocommerce-review-link, .eael-popup-details-render{{WRAPPER}} .product_meta a' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_review_link_hover', [ 'label' => __( 'Review Link Hover', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#707070', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} a.woocommerce-review-link:hover, .eael-popup-details-render{{WRAPPER}} .product_meta a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_table_border_color', [ 'label' => __( 'Border Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#ccc', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} div.product table tbody tr, {{WRAPPER}} .eael-product-popup.woocommerce div.product .product_meta' => 'border-color: {{VALUE}};', ], ] ); // Sale $this->add_control( 'eael_product_popup_sale_style', [ 'label' => __( 'Sale', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_popup_sale_typo', 'label' => __( 'Typography', 'essential-addons-for-elementor-lite' ), 'selector' => '.eael-popup-details-render{{WRAPPER}} .eael-onsale', ] ); $this->add_control( 'eael_product_popup_sale_color', [ 'label' => __( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .eael-onsale' => 'color: {{VALUE}}!important;', ], ] ); $this->add_control( 'eael_product_popup_sale_bg_color', [ 'label' => __( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .eael-onsale' => 'background-color: {{VALUE}}!important;', '.eael-popup-details-render{{WRAPPER}} .eael-onsale:not(.outofstock).sale-preset-4:after' => 'border-left-color: {{VALUE}}; border-right-color: {{VALUE}};', ], ] ); // Quantity $this->add_control( 'eael_product_popup_quantity', [ 'label' => __( 'Quantity', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_popup_quantity_typo', 'label' => __( 'Typography', 'essential-addons-for-elementor-lite' ), 'selector' => '.eael-popup-details-render{{WRAPPER}} div.product form.cart div.quantity .qty, {{WRAPPER}} .eael-product-popup.woocommerce div.product form.cart div.quantity > a', ] ); $this->add_control( 'eael_product_popup_quantity_color', [ 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#000', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} div.product form.cart div.quantity .qty, {{WRAPPER}} .eael-product-popup.woocommerce div.product form.cart div.quantity > a, {{WRAPPER}} .eael-product-popup.woocommerce div.product form.cart div.quantity > .button' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_quantity_bg_color', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#fff', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} div.product form.cart div.quantity .qty, {{WRAPPER}} .eael-product-popup.woocommerce div.product form.cart div.quantity > a, {{WRAPPER}} .eael-product-popup.woocommerce div.product form.cart div.quantity > .button' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_quantity_border_color', [ 'label' => esc_html__( 'Border Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#000', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} div.product form.cart div.quantity .qty, {{WRAPPER}} .eael-product-popup.woocommerce div.product form.cart div.quantity > a, {{WRAPPER}} .eael-product-popup.woocommerce div.product form.cart div.quantity > .button' => 'border-color: {{VALUE}};', // OceanWP '.eael-popup-details-render{{WRAPPER}} div.product form.cart div.quantity .qty:focus' => 'border-color: {{VALUE}};', ], ] ); // Cart Button $this->add_control( 'eael_product_popup_cart_button', [ 'label' => __( 'Cart Button', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_popup_cart_button_typo', 'label' => __( 'Typography', 'essential-addons-for-elementor-lite' ), 'selector' => '.eael-popup-details-render{{WRAPPER}} .button, .eael-popup-details-render{{WRAPPER}} button.button.alt', ] ); $this->start_controls_tabs( 'eael_product_popup_cart_button_style_tabs' ); $this->start_controls_tab( 'eael_product_popup_cart_button_style_tabs_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_popup_cart_button_color', [ 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#fff', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .button, .eael-popup-details-render{{WRAPPER}} button.button.alt' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_cart_button_background', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#8040FF', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .button, .eael-popup-details-render{{WRAPPER}} button.button.alt' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_product_popup_cart_button_border', 'selector' => '.eael-popup-details-render{{WRAPPER}} .button, .eael-popup-details-render{{WRAPPER}} button.button.alt', ] ); $this->add_control( 'eael_product_popup_cart_button_border_radius', [ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 100, ], ], 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .button, .eael-popup-details-render{{WRAPPER}} button.button.alt' => 'border-radius: {{SIZE}}px;', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_product_popup_cart_button_hover_styles', [ 'label' => esc_html__( 'Hover', 'essential-addons-for-elementor-lite' ) ] ); $this->add_control( 'eael_product_popup_cart_button_hover_color', [ 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#F5EAFF', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .button:hover, .eael-popup-details-render{{WRAPPER}} button.button.alt:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_cart_button_hover_background', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '#F12DE0', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .button:hover, .eael-popup-details-render{{WRAPPER}} button.button.alt:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_cart_button_hover_border_color', [ 'label' => esc_html__( 'Border Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .button:hover, .eael-popup-details-render{{WRAPPER}} button.button.alt:hover' => 'border-color: {{VALUE}};', ], 'condition' => [ 'eael_product_popup_cart_button_border_border!' => '', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); // SKU $this->add_control( 'eael_product_popup_sku_style', [ 'label' => __( 'SKU', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_product_popup_sku_typo', 'label' => __( 'Typography', 'essential-addons-for-elementor-lite' ), 'selector' => '.eael-popup-details-render{{WRAPPER}} .product_meta', ] ); $this->add_control( 'eael_product_popup_sku_title_color', [ 'label' => __( 'Title Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .product_meta' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_sku_content_color', [ 'label' => __( 'Content Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .product_meta .sku, .eael-popup-details-render{{WRAPPER}} .product_meta a' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_sku_hover_color', [ 'label' => __( 'Hover Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} .product_meta a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_product_popup_close_button_style', [ 'label' => __( ' Close Button', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_responsive_control( 'eael_product_popup_close_button_icon_size', [ 'label' => __( 'Icon Size', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], 'em' => [ 'min' => 0, 'max' => 100, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} button.eael-product-popup-close' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_product_popup_close_button_size', [ 'label' => __( 'Button Size', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], 'em' => [ 'min' => 0, 'max' => 100, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} button.eael-product-popup-close' => 'max-width: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; min-height: {{SIZE}}{{UNIT}}', ], ] ); $this->add_control( 'eael_product_popup_close_button_color', [ 'label' => __( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} button.eael-product-popup-close' => 'color: {{VALUE}}!important;', ], ] ); $this->add_control( 'eael_product_popup_close_button_bg', [ 'label' => __( 'Background', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} button.eael-product-popup-close' => 'background-color: {{VALUE}}!important;', ], ] ); $this->add_control( 'eael_product_popup_close_button_border_radius', [ 'label' => __( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '.eael-popup-details-render{{WRAPPER}} button.eael-product-popup-close' => 'border-radius: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_product_popup_close_button_box_shadow', 'label' => __( 'Box Shadow', 'essential-addons-for-elementor-lite' ), 'selector' => '.eael-popup-details-render{{WRAPPER}} button.eael-product-popup-close', ] ); $this->add_responsive_control( 'eael_product_popup_border_radius', [ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '.eael-popup-details-render{{WRAPPER}}.eael-product-popup-details' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'eael_product_popup_background', 'label' => __( 'Background', 'essential-addons-for-elementor-lite' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '.eael-popup-details-render{{WRAPPER}}.eael-product-popup-details', 'exclude' => [ 'image', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_product_popup_box_shadow', 'label' => __( 'Box Shadow', 'essential-addons-for-elementor-lite' ), 'selector' => '{{WRAPPER}} .eael-product-popup .eael-product-popup-details', ] ); $this->end_controls_section(); } protected function render() { if ( !function_exists( 'WC' ) ) { return; } $settings = $this->get_settings_for_display(); // normalize for load more fix $settings[ 'layout_mode' ] = $settings[ 'eael_product_gallery_items_layout' ]; $widget_id = $this->get_id(); $settings[ 'eael_widget_id' ] = $widget_id; if ( $settings[ 'post_type' ] === 'source_dynamic' && is_archive() || !empty( $_REQUEST[ 'post_type' ] ) ) { $settings[ 'posts_per_page' ] = $settings[ 'eael_product_gallery_products_count' ] ?: 3; $settings[ 'offset' ] = $settings[ 'product_offset' ]; $args = HelperClass::get_query_args( $settings ); $args = HelperClass::get_dynamic_args( $settings, $args ); } else { $args = $this->build_product_query( $settings ); } if ( Plugin::$instance->documents->get_current() ) { $this->page_id = Plugin::$instance->documents->get_current()->get_main_id(); } // render dom $this->add_render_attribute( 'wrap', [ 'class' => [ "eael-product-gallery", $settings[ 'eael_product_gallery_style_preset' ], $settings[ 'eael_product_gallery_items_layout' ] ], 'id' => 'eael-product-gallery', 'data-widget-id' => $widget_id, 'data-page-id' => $this->page_id, 'data-nonce' => wp_create_nonce( 'eael_product_gallery' ), ] ); $this->add_render_attribute( 'wrap', 'class', $settings[ 'eael_product_gallery_terms_position' ] ); ?>
No posts found!
', 'essential-addons-for-elementor-lite' ); } } else { _e( 'No layout found!
', 'essential-addons-for-elementor-lite' ); } if ( $found_posts > $args['posts_per_page'] ) { $this->print_load_more_button( $settings, $args, $dir_name ); } ?>