# shopbuilder/1.0.0/app/Elementor/Widgets/Controls/SettingsFields.php

ShopBuilder – WooCommerce Builder For Elementor, version 1.0.0. 1,183 lines.

- Page: https://pluginprobe.com/plugins/shopbuilder/1.0.0/code/app/Elementor/Widgets/Controls/SettingsFields.php
- Raw: https://pluginprobe.com/plugins/shopbuilder/1.0.0/raw/app/Elementor/Widgets/Controls/SettingsFields.php
- Modified: 2023-03-09T09:36:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shopbuilder/1.0.0/code/app/Elementor/Widgets/Controls/SettingsFields.php#L10-L20`.

```php
<?php
/**
 * Elementor Settings Fields Class.
 *
 * This class contains all the common fields for Settings tab.
 *
 * @package RadiusTheme\SB
 */

namespace RadiusTheme\SB\Elementor\Widgets\Controls;

use RadiusTheme\SB\Elementor\Helper\ControlHelper;


// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'This script cannot be accessed directly.' );
}

/**
 * Elementor Settings Fields Class.
 */
class SettingsFields {
	/**
	 * Tab name.
	 *
	 * @access private
	 * @static
	 *
	 * @var array
	 */
	private static $tab = 'settings';

	/**
	 * Visibility section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function content_visibility( $obj ) {
		$fields['visibility_section'] = $obj->start_section(
			esc_html__( 'Content Visibility', 'shopbuilder' ),
			self::$tab
		);

		$fields['show_title'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Title?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product title.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
			'separator'   => 'default',
		];

		$fields['show_short_desc'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Short Description?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product short description.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
		];

		$fields['show_price'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Price?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product price.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['show_rating'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Rating?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product rating.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['show_badges'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Badges?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product badges.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['show_categories'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Categories?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product categories.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['visibility_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/visibility_control', $fields, $obj );
	}

	/**
	 * Action buttons section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function action_buttons( $obj ) {
		$fields['action_visibility_section'] = $obj->start_section(
			esc_html__( 'Action Buttons', 'shopbuilder' ),
			self::$tab
		);

		$fields['action_btn_settings'] = $obj->el_heading( esc_html__( 'Buttons Settings', 'shopbuilder' ), 'default' );

		$fields['action_btn_position'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Action Buttons Position', 'shopbuilder' ),
			'description' => esc_html__( 'Please select the action buttons position.', 'shopbuilder' ),
			'options'     => [
				'above' => esc_html__( 'Above Image', 'shopbuilder' ),
				'after' => esc_html__( 'After Content', 'shopbuilder' ),
			],
			'default'     => 'above',
			'label_block' => true,
			'separator'   => 'default',
		];

		$fields['action_btn_preset'] = [
			'type'        => 'rtsb-image-selector',
			'label'       => esc_html__( 'Action Buttons Appearance', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose your preferred action buttons preset.', 'shopbuilder' ),
			'options'     => ControlHelper::action_btn_presets(),
			'default'     => 'preset1',
			'condition'   => [ 'action_btn_position' => [ 'above' ] ],
		];

		$fields['action_btn_gap'] = [
			'type'        => 'slider',
			'mode'        => 'responsive',
			'label'       => esc_html__( 'Action Buttons Gap / Spacing (px)', 'shopbuilder' ),
			'size_units'  => [ 'px' ],
			'range'       => [
				'px' => [
					'min'  => 0,
					'max'  => 100,
					'step' => 1,
				],
			],
			'description' => esc_html__( 'Please select the action buttons gap in px.', 'shopbuilder' ),
			'selectors'   => [
				$obj->selectors['action_buttons']['action_btn_gap'] => 'gap: {{SIZE}}{{UNIT}};',
			],
		];

		$fields['action_btn_visibility'] = $obj->el_heading( esc_html__( 'Buttons Visibility', 'shopbuilder' ), 'before' );

		$fields['show_compare'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Compare?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product compare.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
			'separator'   => 'default',
		];

		$fields['show_quick_view'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Quick View?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product quick view.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['show_wishlist'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Wishlist?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product wishlist.', 'shopbuilder' ),
		];

		$fields['show_add_to_cart'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Add to Cart?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product add to cart.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['action_visibility_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/visibility_control', $fields, $obj );
	}

	/**
	 * Category Visibility section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function cat_content_visibility( $obj ) {
		$fields['cat_visibility_section'] = $obj->start_section(
			esc_html__( 'Content Visibility', 'shopbuilder' ),
			self::$tab
		);

		$fields['show_title'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Category Title?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show category title.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
			'separator'   => 'default',
		];

		$fields['show_short_desc'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Category Description?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show category description.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
		];

		$fields['show_count'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Product Count?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show product count.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['show_badges'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Custom Badge?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show custom category badge.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
			'condition'   => [ 'layout!' => [ 'category-layout1', 'category-layout2' ] ],
		];

		$fields['cat_visibility_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/cat_visibility_control', $fields, $obj );
	}

	/**
	 * Filter section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function filter( $obj ) {
		$fields['filter_section'] = $obj->start_section(
			esc_html__( 'Filters (Front-End)', 'shopbuilder' ),
			self::$tab
		);

		$fields['filter_note'] = [
			'type'            => 'html',
			'raw'             => '',
			'content_classes' => 'elementor-panel-heading-title',
			'separator'       => 'default',
		];

		$fields['show_taxonomy_filter'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Enable Taxonomy Filter Button?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable taxonomy filter button.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'separator'   => $obj->pro_class(),
			'classes'     => $obj->pro_class(),
		];

		$fields['filter_section_end'] = $obj->end_section();

//      TODO: Will be activated later.
//		return apply_filters( 'rtsb/elements/elementor/filter_control', $fields, $obj );
		return [];
	}

	/**
	 * Slider section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function slider_settings( $obj ) {
		$fields['slider_control_section'] = $obj->start_section(
			esc_html__( 'Slider Settings', 'shopbuilder' ),
			self::$tab
		);

		$fields['slider_control_note'] = $obj->el_heading(
			esc_html__( 'Controls', 'shopbuilder' ),
			'default'
		);

		$fields['slider_loop'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Infinite Loop', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable slider infinite loop.', 'shopbuilder' ),
			'separator'   => 'default',
		];

		$fields['slider_nav'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Navigation Arrows', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable slider navigation arrows.', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['slider_nav_position'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Navigation Arrows Position', 'shopbuilder' ),
			'options'     => [
				'top'      => esc_html__( 'Top', 'shopbuilder' ),
				'standard' => esc_html__( 'Middle', 'shopbuilder' ),
				'bottom'   => esc_html__( 'Bottom', 'shopbuilder' ),
			],
			'description' => esc_html__( 'Please select the slider arrows position.', 'shopbuilder' ),
			'default'     => 'standard',
			'label_block' => true,
			'condition'   => [ 'slider_nav' => [ 'yes' ] ],
		];

		$fields['slider_left_arrow_icon'] = [
			'label'       => esc_html__( 'Left Arrow Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the slider left arrow icon.', 'shopbuilder' ),
			'type'        => 'icons',
			'default'     => [
				'value'   => 'fas fa-chevron-left',
				'library' => 'fa-solid',
			],
			'condition'   => [ 'slider_nav' => 'yes' ],
		];

		$fields['slider_right_arrow_icon'] = [
			'label'       => esc_html__( 'Right Arrow Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the slider right arrow icon.', 'shopbuilder' ),
			'type'        => 'icons',
			'default'     => [
				'value'   => 'fas fa-chevron-right',
				'library' => 'fa-solid',
			],
			'condition'   => [ 'slider_nav' => 'yes' ],
		];

		$fields['slider_pagi'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Dot Pagination', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable slider dot pagination.', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['slider_auto_height'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Auto Height', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable slider dynamic height.', 'shopbuilder' ),
		];

		$fields['slider_lazy_load'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Image Lazy Load', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable slider image lazy load.', 'shopbuilder' ),
		];

		$fields['slide_speed'] = [
			'type'        => 'number',
			'label'       => esc_html__( 'Slide Speed (in ms)', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter the duration of transition between slides (in ms).', 'shopbuilder' ),
			'default'     => 2000,
		];

		$fields['slider_autoplay_note'] = $obj->el_heading(
			esc_html__( 'Autoplay', 'shopbuilder' ),
			'before'
		);

		$fields['slide_autoplay'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Enable Autoplay?', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable slider autoplay.', 'shopbuilder' ),
			'default'     => 'yes',
			'separator'   => 'default',
		];

		$fields['pause_hover'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Pause on Mouse Hover?', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable slider autoplay pause on mouse hover.', 'shopbuilder' ),
			'default'     => 'yes',
			'condition'   => [ 'slide_autoplay' => 'yes' ],
		];

		$fields['autoplay_timeout'] = [
			'type'                    => 'number',
			'label'                   => esc_html__( 'Autoplay Delay (in ms)', 'shopbuilder' ),
			// 'options'     => Fns::getTTPShortcodeList(),
							'default' => 5000,
			'description'             => esc_html__( 'Please select autoplay interval delay (in ms).', 'shopbuilder' ),
			'condition'               => [ 'slide_autoplay' => 'yes' ],
		];

		$fields['slider_control_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/slider_settings_control', $fields, $obj );
	}

	/**
	 * Title section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function product_title( $obj ) {
		$condition = [
			'show_title' => [ 'yes' ],
		];

		$fields['product_title_section'] = $obj->start_section(
			esc_html__( 'Product Title', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['title_tag'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Product Title Tag', 'shopbuilder' ),
			'options'     => ControlHelper::heading_tags(),
			'label_block' => true,
			'default'     => 'h3',
			'description' => esc_html__( 'Please select the product title tag.', 'shopbuilder' ),
			'separator'   => 'after',
		];

		$fields['title_hover'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Title Hover Underline', 'shopbuilder' ),
			'default'     => 200,
			'description' => esc_html__( 'Switch on to enable title hover underline.', 'shopbuilder' ),
			'classes'     => $obj->pro_class(),
			'separator'   => 'default',
		];

		$fields['title_limit'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Product Title Limit', 'shopbuilder' ),
			'options'     => [
				'default' => esc_html__( 'Default', 'shopbuilder' ),
				'1-line'  => esc_html__( 'Show in 1 line', 'shopbuilder' ),
				'2-lines' => esc_html__( 'Show in 2 lines', 'shopbuilder' ),
				'3-lines' => esc_html__( 'Show in 3 lines', 'shopbuilder' ),
				'custom'  => esc_html__( 'Custom', 'shopbuilder' ),
			],
			'label_block' => true,
			'default'     => 'default',
			'description' => esc_html__( 'Please select the product title limit.', 'shopbuilder' ),
			'separator'   => 'before',
		];

		$fields['title_limit_custom'] = [
			'type'        => 'number',
			'label'       => esc_html__( 'Custom Character Limit', 'shopbuilder' ),
			'default'     => 200,
			'description' => esc_html__( 'Please enter the product title character limit.', 'shopbuilder' ),
			'condition'   => [ 'title_limit' => [ 'custom' ] ],
		];

		$fields['product_title_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/product_title_control', $fields, $obj );
	}

    /**
     * Title section
     *
     * @param object $obj Reference object.
     *
     * @return array
     */
    public static function section_title( $obj ) {
        $condition = [
            'show_section_title' => [ 'yes' ],
        ];

        $fields['section_title_section'] = $obj->start_section(
            esc_html__( 'Section Title', 'shopbuilder' ),
            self::$tab,
            [],
            $condition
        );

        $fields['section_title_tag'] = [
            'type'        => 'select2',
            'label'       => esc_html__( 'Section Title Tag', 'shopbuilder' ),
            'options'     => ControlHelper::heading_tags(),
            'label_block' => true,
            'default'     => 'h3',
            'description' => esc_html__( 'Please select the section title tag.', 'shopbuilder' ),
            'separator'   => 'default',
        ];

        $fields['section_title_text'] = [
            'type'        => 'text',
            'label'       => esc_html__( 'Section Title Text', 'shopbuilder' ),
            'default'     => esc_html__( 'Section Title', 'shopbuilder' ),
            'description' => esc_html__( 'Please enter the section title text.', 'shopbuilder' ),
            'label_block' => true,
        ];

        $fields['section_title_section_end'] = $obj->end_section();

        return apply_filters( 'rtsb/elements/elementor/section_title_control', $fields, $obj );
    }

	/**
	 * Category Title section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function cat_title( $obj ) {
		$condition = [
			'show_title' => [ 'yes' ],
		];

		$fields['category_title_section'] = $obj->start_section(
			esc_html__( 'Category Title', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['title_tag'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Category Title Tag', 'shopbuilder' ),
			'options'     => ControlHelper::heading_tags(),
			'label_block' => true,
			'default'     => 'h3',
			'description' => esc_html__( 'Please select the category title tag.', 'shopbuilder' ),
			'separator'   => rtsb()->has_pro() ? 'before-short' : 'default',
		];

		$fields['show_custom_title'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Enable Custom Title?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to display alternate custom title.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'classes'     => $obj->pro_class(),
			'separator'   => rtsb()->has_pro() ? 'before-short' : 'default',
			'condition'   => [ 'layout' => [ 'category-single-layout1' ] ],
		];

		$fields['custom_title'] = [
			'type'        => 'textarea',
			'label'       => esc_html__( 'Alternate Custom Title', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter an alternate custom title.', 'shopbuilder' ),
			'condition'   => [
				'show_custom_title' => [ 'yes' ],
				'layout'            => [ 'category-single-layout1' ],
			],
			'classes'     => $obj->pro_class(),
			'separator'   => rtsb()->has_pro() ? 'before-short' : 'default',
		];

		$fields['title_limit'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Category Title Limit', 'shopbuilder' ),
			'options'     => [
				'default' => esc_html__( 'Default', 'shopbuilder' ),
				'1-line'  => esc_html__( 'Show in 1 line', 'shopbuilder' ),
				'2-lines' => esc_html__( 'Show in 2 lines', 'shopbuilder' ),
				'3-lines' => esc_html__( 'Show in 3 lines', 'shopbuilder' ),
				'custom'  => esc_html__( 'Custom', 'shopbuilder' ),
			],
			'label_block' => true,
			'default'     => 'default',
			'description' => esc_html__( 'Please select the category title limit.', 'shopbuilder' ),
		];

		$fields['title_limit_custom'] = [
			'type'        => 'number',
			'label'       => esc_html__( 'Custom Character Limit', 'shopbuilder' ),
			'default'     => 200,
			'description' => esc_html__( 'Please select the category title custom limit.', 'shopbuilder' ),
			'condition'   => [ 'title_limit' => [ 'custom' ] ],
		];

		$fields['category_title_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/category_title_control', $fields, $obj );
	}

	/**
	 * Excerpt section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function product_excerpt( $obj ) {
		$condition = [
			'show_short_desc' => [ 'yes' ],
		];

		$fields['product_excerpt_section'] = $obj->start_section(
			esc_html__( 'Short Description', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['excerpt_limit'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Short Description Limit', 'shopbuilder' ),
			'description' => esc_html__( 'Please select the product short description limit.', 'shopbuilder' ),
			'options'     => [
				'default' => esc_html__( 'Default', 'shopbuilder' ),
				'1-line'  => esc_html__( 'Show in 1 line', 'shopbuilder' ),
				'2-lines' => esc_html__( 'Show in 2 lines', 'shopbuilder' ),
				'3-lines' => esc_html__( 'Show in 3 lines', 'shopbuilder' ),
				'custom'  => esc_html__( 'Custom', 'shopbuilder' ),
			],
			'label_block' => true,
			'default'     => 'default',
			'separator'   => 'default',
		];

		$fields['excerpt_limit_custom'] = [
			'type'        => 'number',
			'label'       => esc_html__( 'Custom Character Limit', 'shopbuilder' ),
			'default'     => 200,
			'description' => esc_html__( 'Please enter the product short description character limit.', 'shopbuilder' ),
			'condition'   => [ 'excerpt_limit' => [ 'custom' ] ],
		];

		$fields['product_excerpt_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/product_excerpt_control', $fields, $obj );
	}

	/**
	 * Category Excerpt section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function cat_excerpt( $obj ) {
		$condition = [
			'show_short_desc' => [ 'yes' ],
		];

		$fields['cat_excerpt_section'] = $obj->start_section(
			esc_html__( 'Category Description', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['desciption_note'] = [
			'type'            => 'html',
			'raw'             => '',
			'content_classes' => 'elementor-panel-heading-title',
			'separator'       => 'default',
			'condition'       => [ 'layout' => [ 'category-single-layout1' ] ],
		];

		$fields['show_custom_description'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Enable Custom Description?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to display alternate custom description.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'classes'     => $obj->pro_class(),
			'separator'   => rtsb()->has_pro() ? 'before-short' : $obj->pro_class(),
			'condition'   => [ 'layout' => [ 'category-single-layout1' ] ],
		];

		$fields['custom_description'] = [
			'type'        => 'textarea',
			'label'       => esc_html__( 'Alternate Custom Description', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter an alternate custom description.', 'shopbuilder' ),
			'condition'   => [
				'show_custom_description' => [ 'yes' ],
				'layout'                  => [ 'category-single-layout1' ],
			],
			'classes'     => $obj->pro_class(),
			'separator'   => rtsb()->has_pro() ? 'before-short' : 'default',
		];

		$fields['excerpt_position'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Category Description Position', 'shopbuilder' ),
			'description' => esc_html__( 'Please select the category short description position.', 'shopbuilder' ),
			'options'     => [
				'above' => esc_html__( 'Top', 'shopbuilder' ),
				'below' => esc_html__( 'Bottom', 'shopbuilder' ),
			],
			'label_block' => true,
			'condition'   => [ 'layout!' => [ 'category-layout2' ] ],
			'default'     => 'below',
			'separator'   => 'default',
		];

		$fields['excerpt_limit'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Category Description Limit', 'shopbuilder' ),
			'description' => esc_html__( 'Please select the category short description limit.', 'shopbuilder' ),
			'options'     => [
				'default' => esc_html__( 'Default', 'shopbuilder' ),
				'1-line'  => esc_html__( 'Show in 1 line', 'shopbuilder' ),
				'2-lines' => esc_html__( 'Show in 2 lines', 'shopbuilder' ),
				'3-lines' => esc_html__( 'Show in 3 lines', 'shopbuilder' ),
				'custom'  => esc_html__( 'Custom', 'shopbuilder' ),
			],
			'label_block' => true,
			'default'     => 'default',
		];

		$fields['excerpt_limit_custom'] = [
			'type'        => 'number',
			'label'       => esc_html__( 'Custom Character Limit', 'shopbuilder' ),
			'default'     => 200,
			'description' => esc_html__( 'Please select the category short description custom limit.', 'shopbuilder' ),
			'condition'   => [ 'excerpt_limit' => [ 'custom' ] ],
		];

		$fields['cat_excerpt_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/cat_excerpt_control', $fields, $obj );
	}

	/**
	 * Add to cart section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function add_to_cart( $obj ) {
		$condition = [
			'show_add_to_cart' => [ 'yes' ],
		];

		$fields['add_to_cart_section'] = $obj->start_section(
			esc_html__( 'Add to Cart', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['show_cart_icon'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Add to Cart Icon?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show add to cart icon.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
			'separator'   => 'default',
		];

		$fields['add_to_cart_icon'] = [
			'type'        => 'icons',
			'label'       => esc_html__( 'Choose Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the Add to Cart icon.', 'shopbuilder' ),
			'default'     => [
				'value'   => 'fas fa-shopping-cart',
				'library' => 'fa-solid',
			],
			'condition'   => [ 'show_cart_icon' => [ 'yes' ] ],
		];

		$fields['add_to_cart_success_icon'] = [
			'type'        => 'icons',
			'label'       => esc_html__( 'Choose Success Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the Add to Cart success icon.', 'shopbuilder' ),
			'default'     => [
				'value'   => 'fas fa-check',
				'library' => 'fa-solid',
			],
			'condition'   => [ 'show_cart_icon' => [ 'yes' ] ],
		];
		// TODO:: Variable product button text change option.
		$fields['show_cart_text'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Show Add to Cart Text?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to show add to cart text.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['add_to_cart_text'] = [
			'type'        => 'text',
			'label'       => esc_html__( 'Add to Cart Text', 'shopbuilder' ),
			'default'     => esc_html__( 'Add to Cart', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter the add to cart text.', 'shopbuilder' ),
			'condition'   => [ 'show_cart_text' => [ 'yes' ] ],
		];

		$fields['add_to_cart_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/add_to_cart_control', $fields, $obj );
	}

	/**
	 * Quick View section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function quick_view( $obj ) {
		$condition = [
			'show_quick_view' => [ 'yes' ],
		];

		$fields['quick_view_section'] = $obj->start_section(
			esc_html__( 'Quick View', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['quick_view_icon'] = [
			'type'        => 'icons',
			'label'       => esc_html__( 'Choose Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the Quick View icon.', 'shopbuilder' ),
			'default'     => [
				'value'   => 'fas fa-eye',
				'library' => 'fa-solid',
			],
			'separator'   => 'default',
		];

		$fields['quick_view_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/quick_view_control', $fields, $obj );
	}

	/**
	 * Quick View section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function compare( $obj ) {
		$condition = [
			'show_compare' => [ 'yes' ],
		];

		$fields['compare_section'] = $obj->start_section(
			esc_html__( 'Compare', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['comparison_icon'] = [
			'type'        => 'icons',
			'label'       => esc_html__( 'Choose Compare Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the Compare icon.', 'shopbuilder' ),
			'default'     => [
				'value'   => 'fas fa-exchange-alt',
				'library' => 'fa-solid',
			],
			'separator'   => 'default',
		];

		$fields['comparison_icon_added'] = [
			'type'        => 'icons',
			'label'       => esc_html__( 'Choose Compare Added Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the Compare icon.', 'shopbuilder' ),
			'default'     => [
				'value'   => 'fas fa-check',
				'library' => 'fa-solid',
			],
		];

		$fields['compare_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/compare_control', $fields, $obj );
	}

	/**
	 * Quick View section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function wishlist( $obj ) {
		$condition = [
			'show_wishlist' => [ 'yes' ],
		];

		$fields['wishlist_section'] = $obj->start_section(
			esc_html__( 'Wishlist', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['wishlist_icon'] = [
			'type'        => 'icons',
			'label'       => esc_html__( 'Choose Wishlist Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the Wishlist icon.', 'shopbuilder' ),
			'default'     => [
				'value'   => 'far fa-heart',
				'library' => 'fa-regular',
			],
			'separator'   => 'default',
		];

		$fields['wishlist_icon_added'] = [
			'type'        => 'icons',
			'label'       => esc_html__( 'Choose Wishlist Added Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the Wishlist icon.', 'shopbuilder' ),
			'default'     => [
				'value'   => 'fas fa-heart',
				'library' => 'fa-solid',
			],
		];

		$fields['wishlist_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/wishlist_control', $fields, $obj );
	}

	/**
	 * Badge section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function badges( $obj ) {
		$condition = [
			'show_badges' => [ 'yes' ],
			'layout!'     => [ 'category-layout1', 'category-layout2' ],
		];

		$fields['badges_section'] = $obj->start_section(
			esc_html__( 'Badges', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['custom_badge_preset'] = [
			'type'        => 'rtsb-image-selector',
			'label'       => esc_html__( 'Custom Badge Appearance', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the custom badge appearance.', 'shopbuilder' ),
			'options'     => ControlHelper::badge_presets(),
			'default'     => 'preset1',
			'separator'   => 'default',
		];

		$fields['sale_badges_type'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Sale Badge Type', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter the sale badge text.', 'shopbuilder' ),
			'options'     => [
				'percentage' => esc_html__( 'Show Sale Percentage', 'shopbuilder' ),
				'text'       => esc_html__( 'Show Sale Text', 'shopbuilder' ),
			],
			'default'     => 'percentage',
			'label_block' => true,
			'condition'   => [ 'layout!' => [ 'category-single-layout1', 'category-layout1', 'category-layout2' ] ],
		];

		$fields['sale_badges_text'] = [
			'type'        => 'text',
			'label'       => esc_html__( 'Sale Badge Text', 'shopbuilder' ),
			'default'     => esc_html__( 'Sale', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter the sale badge text.', 'shopbuilder' ),
			'label_block' => true,
			'condition'   => [
				'sale_badges_type' => [ 'text' ],
				'layout!'          => [ 'category-single-layout1', 'category-layout1', 'category-layout2' ],
			],
		];

		$fields['stock_badges_text'] = [
			'type'        => 'text',
			'label'       => esc_html__( 'Out of Stock Badge Text', 'shopbuilder' ),
			'default'     => esc_html__( 'Out of Stock', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter the out of stock badge text.', 'shopbuilder' ),
			'label_block' => true,
			'condition'   => [ 'layout!' => [ 'category-single-layout1', 'category-layout1', 'category-layout2' ] ],
		];

		$fields['custom_badge_text'] = [
			'type'        => 'text',
			'label'       => esc_html__( 'Custom Badge Text', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter the custom badge text.', 'shopbuilder' ),
			'label_block' => true,
			'default'     => esc_html__( 'Popular', 'shopbuilder' ),
			'condition'   => [ 'layout' => [ 'category-single-layout1', 'category-layout1', 'category-layout2' ] ],
		];

		$fields['badges_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/badges_control', $fields, $obj );
	}

	/**
	 * Count section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function cat_count_settings( $obj ) {
		$condition = [
			'show_count' => [ 'yes' ],
		];

		$fields['count_section'] = $obj->start_section(
			esc_html__( 'Product Count', 'shopbuilder' ),
			self::$tab,
			[],
			$condition
		);

		$fields['count_display_type'] = [
			'type'        => 'select2',
			'label'       => esc_html__( 'Display Position', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the count display position.', 'shopbuilder' ),
			'options'     => [
				'flex'  => esc_html__( 'Same Line with Title', 'shopbuilder' ),
				'block' => esc_html__( 'After Title', 'shopbuilder' ),
			],
			'label_block' => true,
			'default'     => 'block',
			'separator'   => 'default',
			'render_type' => 'template',
			'condition'   => [ 'layout!' => [ 'category-layout2' ] ],
			'selectors'   => [
				$obj->selectors['cat_count_settings']['count_display_type'] => 'display: {{VALUE}};',
			],
		];

		$fields['before_count'] = [
			'type'        => 'text',
			'label'       => esc_html__( 'Text Before Count', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter the text to show before count.', 'shopbuilder' ),
		];

		$fields['after_count'] = [
			'type'        => 'text',
			'label'       => esc_html__( 'Text After Count', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter the text to show after count.', 'shopbuilder' ),
			'default'     => esc_html__( ' Products', 'shopbuilder' ),
		];

		$fields['count_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/count_control', $fields, $obj );
	}

	/**
	 * Pagination section
	 *
	 * @param object $obj Reference object.
	 *
	 * @return array
	 */
	public static function links( $obj ) {
		$fields['links_section'] = $obj->start_section(
			esc_html__( 'Links', 'shopbuilder' ),
			self::$tab
		);
		$obj->start_section( 'links_section', esc_html__( 'Detail Page', 'shopbuilder' ), self::$tab );

		$fields['title_link'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Title Clickable?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable title linking.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
			'separator'   => 'default',
		];

		$fields['image_link'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Image Clickable?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable image linking.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
		];

		$fields['hover_btn_note'] = $obj->el_heading(
			esc_html__( 'Hover Button', 'shopbuilder' ),
			'before',
			[],
			[ 'layout' => [ 'grid-layout2', 'slider-layout2' ] ]
		);

		$fields['hover_btn_text'] = [
			'type'        => 'text',
			'label'       => esc_html__( 'Hover Button Text', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter the button text.', 'shopbuilder' ),
			'default'     => esc_html__( 'See Details', 'shopbuilder' ),
			'condition'   => [ 'layout' => [ 'grid-layout2', 'slider-layout2' ] ],
			'separator'   => 'default',
		];

		$fields['show_hover_btn_icon'] = [
			'type'        => 'switch',
			'label'       => esc_html__( 'Enable Hover Button Icon?', 'shopbuilder' ),
			'description' => esc_html__( 'Switch on to enable hover button icon.', 'shopbuilder' ),
			'label_on'    => esc_html__( 'On', 'shopbuilder' ),
			'label_off'   => esc_html__( 'Off', 'shopbuilder' ),
			'default'     => 'yes',
			'condition'   => [ 'layout' => [ 'grid-layout2', 'slider-layout2' ] ],
		];

		$fields['hover_btn_icon'] = [
			'type'        => 'icons',
			'label'       => esc_html__( 'Choose Icon', 'shopbuilder' ),
			'description' => esc_html__( 'Please choose the hover button icon.', 'shopbuilder' ),
			'default'     => [
				'value'   => 'fas fa-angle-right',
				'library' => 'fa-solid',
			],
			'condition'   => [
				'show_hover_btn_icon' => [ 'yes' ],
				'layout'              => [ 'grid-layout2', 'slider-layout2' ],
			],
		];

		$fields['custom_link'] = [
			'type'        => 'link',
			'label'       => esc_html__( 'Alternate Custom Link', 'shopbuilder' ),
			'description' => esc_html__( 'Please enter an alternate custom link.', 'shopbuilder' ),
			'placeholder' => esc_html__( 'https://custom-link.com', 'shopbuilder' ),
			'options'     => [ 'url', 'is_external', 'nofollow' ],
			'condition'   => [ 'layout' => [ 'category-single-layout1' ] ],
		];

		$fields['links_section_end'] = $obj->end_section();

		return apply_filters( 'rtsb/elements/elementor/links_control', $fields, $obj );
	}
}

```
