Your IP : 216.73.216.0


Current Path : /home/goldnueh/netsetsolution.com/wp-content/plugins/zeinet-addon/includes/Widgets/
Upload File :
Current File : /home/goldnueh/netsetsolution.com/wp-content/plugins/zeinet-addon/includes/Widgets/Price.php

<?php

namespace Layerdrops\Zeinet\Widgets;


class Price extends \Elementor\Widget_Base
{
    public function get_name()
    {
        return 'zeinet-price';
    }

    public function get_title()
    {
        return __('Price', 'zeinet-addon');
    }

    public function get_icon()
    {
        return 'eicon-cogs';
    }

    public function get_categories()
    {
        return ['zeinet-category'];
    }

    protected function register_controls()
    {
        $this->start_controls_section(
            'layout_section',
            [
                'label' => __('Layout', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );

        $this->add_control(
            'layout_type',
            [
                'label' => __('Select Layout', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::SELECT2,
                'default' => 'layout_one',
                'options' => [
                    'layout_one' => __('Layout One', 'zeinet-addon'),
                    'layout_two' => __('Layout Two', 'zeinet-addon'),
                    'layout_three' => __('Layout Three', 'zeinet-addon'),
                    'layout_four' => __('Layout Four', 'zeinet-addon'),
                ]
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
            'content_section',
            [
                'label' => __('Content', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition'   => [
                    'layout_type' => 'layout_one'
                ]
            ]
        );

        $this->add_control(
            'title',
            [
                'label' => __('Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Fiber Internet', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'sub_title',
            [
                'label' => __('Sub Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Internet', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $price_icon = new \Elementor\Repeater();

        $price_icon->add_control(
            'icon',
            [
                'label' => __('Icon', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::ICONS,
                'default' => [
                    'value' => 'icon-wifi',
                    'library' => 'custom-icon',
                ],
            ]
        );


        $this->add_control(
            'price_icon',
            [
                'label' => __('Price Icon', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::REPEATER,
                'fields' => $price_icon->get_controls(),
                'prevent_empty' => false,
            ]
        );

        $features_list = new \Elementor\Repeater();

        $features_list->add_control(
            'title',
            [
                'label' => __('Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Up to 50Mbps', 'zeinet-addon'),
                'label_block' => true,
            ]
        );


        $features_list->add_control(
            'icon',
            [
                'label' => __('Icon', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::ICONS,
                'default' => [
                    'value' => 'fa fa-check',
                    'library' => 'custom-icon',
                ],
            ]
        );


        $this->add_control(
            'features_list',
            [
                'label' => __('Feature List', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::REPEATER,
                'fields' => $features_list->get_controls(),
                'prevent_empty' => false,
                'title_field' => '{{{ title }}}',
            ]
        );

        $this->add_control(
            'currency',
            [
                'label' => __('Currency', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('$', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'price',
            [
                'label' => __('Price', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('29', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'price_decimal',
            [
                'label' => __('Price Decimal', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('.99', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'validity',
            [
                'label' => __('Validity Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('/ month', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'button_label',
            [
                'label' => __('Button Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Get started', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'button_url',
            [
                'label' => __('Button Url', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::URL,
                'placeholder' => __('#', 'zeinet-addon'),
                'show_external' => false,
                'default' => [
                    'url' => '#',
                    'is_external' => false,
                    'nofollow' => true,
                ],
                'show_label' => false,
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
            'layout_two_progress_bar_section',
            [
                'label' => __('Progress Bar', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition'   => [
                    'layout_type' => 'layout_two'
                ]
            ]
        );

        $this->add_control(
            'layout_two_progressbar_size',
            [
                'label' => __('Progress Bar Size', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::SLIDER,
                'size_units' => ['count'],
                'range' => [
                    'count' => [
                        'min' => .1,
                        'max' => 1,
                        'step' => .1,
                    ],
                ],
                'default' => [
                    'unit' => 'count',
                    'size' => .5,
                ],
            ]
        );

        $this->add_control(
            'layout_two_progressbar_title',
            [
                'label' => __('Progressbar Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Mbps', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'layout_two_progressbar_count_text',
            [
                'label' => __('Progressbar Count Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('50', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'layout_two_progressbar_color',
            [
                'label' => __('Progressbar Color', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::COLOR,
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
            'layout_two_content_section',
            [
                'label' => __('Content', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition'   => [
                    'layout_type' => 'layout_two'
                ]
            ]
        );

        $this->add_control(
            'layout_two_title',
            [
                'label' => __('Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Fiber Internet', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'layout_two_sub_title',
            [
                'label' => __('Sub Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Internet', 'zeinet-addon'),
                'label_block' => true,
            ]
        );


        $layout_two_features_list = new \Elementor\Repeater();

        $layout_two_features_list->add_control(
            'title',
            [
                'label' => __('Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Internet with a 50 Mbps', 'zeinet-addon'),
                'label_block' => true,
            ]
        );


        $layout_two_features_list->add_control(
            'icon',
            [
                'label' => __('Icon', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::ICONS,
                'default' => [
                    'value' => 'fa fa-check',
                    'library' => 'custom-icon',
                ],
            ]
        );


        $this->add_control(
            'layout_two_features_list',
            [
                'label' => __('Feature List', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::REPEATER,
                'fields' => $layout_two_features_list->get_controls(),
                'prevent_empty' => false,
                'title_field' => '{{{ title }}}',
            ]
        );

        $this->add_control(
            'layout_two_currency',
            [
                'label' => __('Currency', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('$', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'layout_two_price',
            [
                'label' => __('Price', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('29', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'layout_two_price_decimal',
            [
                'label' => __('Price Decimal', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('.99', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'layout_two_button_label',
            [
                'label' => __('Button Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Get started', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'layout_two_button_url',
            [
                'label' => __('Button Url', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::URL,
                'placeholder' => __('#', 'zeinet-addon'),
                'show_external' => false,
                'default' => [
                    'url' => '#',
                    'is_external' => false,
                    'nofollow' => true,
                ],
                'show_label' => false,
            ]
        );


        $this->end_controls_section();

        $this->start_controls_section(
            'layout_three_content_section',
            [
                'label' => __('Content', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition'   => [
                    'layout_type' => 'layout_three'
                ]
            ]
        );

        $this->add_control(
            'layout_three_title',
            [
                'label' => __('Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Default Title', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'layout_three_sub_title',
            [
                'label' => __('Sub Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Default Sub Title', 'zeinet-addon'),
                'label_block' => true,
            ]
        );


        $layout_three_price_list = new \Elementor\Repeater();

        $layout_three_price_list->add_control(
            'title',
            [
                'label' => __('Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Internet', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_three_price_list->add_control(
            'summary',
            [
                'label' => __('Summary Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Default Text', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_three_price_list->add_control(
            'price',
            [
                'label' => __('Price', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('$35.00', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_three_price_list->add_control(
            'discount_text',
            [
                'label' => __('Discount Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Save Up To 9%', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_three_price_list->add_control(
            'features',
            [
                'label' => __('Features Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::CODE,
                'default' => __('<li>Internet with a 1000 Mbps</li>', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_three_price_list->add_control(
            'item_count_text',
            [
                'label' => __('Item Count Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('20', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_three_price_list->add_control(
            'item_text',
            [
                'label' => __('Item Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Mbps', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_three_price_list->add_control(
            'button_label',
            [
                'label' => __('Button Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('View All Services', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_three_price_list->add_control(
            'button_url',
            [
                'label' => __('Button Url', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::URL,
                'placeholder' => __('#', 'zeinet-addon'),
                'show_external' => false,
                'default' => [
                    'url' => '#',
                    'is_external' => false,
                    'nofollow' => true,
                ],
                'show_label' => false,
            ]
        );

        $layout_three_price_list->add_control(
            'image',
            [
                'label' => __('Image ', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [],
            ]
        );

        $layout_three_price_list->add_control(
            'active_price',
            [
                'label' => __('Enable Active Color?', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::SWITCHER,
                'label_on' => __('Yes', 'zeinet-addon'),
                'label_off' => __('No', 'zeinet-addon'),
                'return_value' => 'yes',
                'default' => 'no',
            ]
        );

        $layout_three_price_list->add_control(
            'active_image',
            [
                'label' => __('Active Price Background Image ', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [],
            ]
        );


        $this->add_control(
            'layout_three_price_list',
            [
                'label' => __('Price List', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::REPEATER,
                'fields' => $layout_three_price_list->get_controls(),
                'prevent_empty' => false,
                'title_field' => '{{{ title }}}',
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
            'layout_four_content_section',
            [
                'label' => __('Content', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition'   => [
                    'layout_type' => 'layout_four'
                ]
            ]
        );

        $this->add_control(
            'layout_four_title',
            [
                'label' => __('Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Default Title', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $this->add_control(
            'layout_four_sub_title',
            [
                'label' => __('Sub Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Default Sub Title', 'zeinet-addon'),
                'label_block' => true,
            ]
        );


        $layout_four_price_list = new \Elementor\Repeater();

        $layout_four_price_list->add_control(
            'title',
            [
                'label' => __('Title', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Internet', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_four_price_list->add_control(
            'item_count_text',
            [
                'label' => __('Item Count Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('20', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_four_price_list->add_control(
            'item_text',
            [
                'label' => __('Item Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Mbps', 'zeinet-addon'),
                'label_block' => true,
            ]
        );


        $layout_four_price_list->add_control(
            'price',
            [
                'label' => __('Price', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('$35.00', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_four_price_list->add_control(
            'summary',
            [
                'label' => __('Summary Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Default Text', 'zeinet-addon'),
                'label_block' => true,
            ]
        );


        $layout_four_price_list->add_control(
            'features',
            [
                'label' => __('Features Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::CODE,
                'default' => __('<li><i class="far fa-check-circle"></i>Internet with a 1000 Mbps</li>', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_four_price_list->add_control(
            'button_label',
            [
                'label' => __('Button Text', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('View All Services', 'zeinet-addon'),
                'label_block' => true,
            ]
        );

        $layout_four_price_list->add_control(
            'button_url',
            [
                'label' => __('Button Url', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::URL,
                'placeholder' => __('#', 'zeinet-addon'),
                'show_external' => false,
                'default' => [
                    'url' => '#',
                    'is_external' => false,
                    'nofollow' => true,
                ],
                'show_label' => false,
            ]
        );

        $layout_four_price_list->add_control(
            'shape',
            [
                'label' => __('Shape ', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [],
            ]
        );

        $this->add_control(
            'layout_four_price_list',
            [
                'label' => __('Price List', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::REPEATER,
                'fields' => $layout_four_price_list->get_controls(),
                'prevent_empty' => false,
                'title_field' => '{{{ title }}}',
            ]
        );

        $this->add_control(
            'layout_four_background_image',
            [
                'label' => __('Background ', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [],
            ]
        );

        $this->end_controls_section();

        //General style
        $this->start_controls_section(
            'general_style',
            [
                'label' => esc_html__('Style Options', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
            ]
        );

        zeinet_typo_and_color_options($this, 'Section Title', '{{WRAPPER}} .section-title__title', ['layout_three', 'layout_four']);
        zeinet_typo_and_color_options($this, 'Section Sub Title', '{{WRAPPER}} .section-title__tagline', ['layout_three', 'layout_four']);

        zeinet_typo_and_color_options($this, 'Title', '{{WRAPPER}} .plans-one__title,{{WRAPPER}} .price__progress-content h3,{{WRAPPER}} .price-three__item__title,{{WRAPPER}} .price-four__item__title', ['layout_one', 'layout_two', 'layout_three', 'layout_four']);
        zeinet_typo_and_color_options($this, 'Summary', '{{WRAPPER}} .price-three__item__text,{{WRAPPER}} .price-four__item__text', ['layout_three', 'layout_four']);
        zeinet_typo_and_color_options($this, 'Sub Title', '{{WRAPPER}} .plans-one__sub-title,{{WRAPPER}} .price__progress-content p', ['layout_one', 'layout_two']);
        zeinet_typo_and_color_options($this, 'Features', '{{WRAPPER}} .plans-one__list li .text, {{WRAPPER}} .price__right-content-box p,{{WRAPPER}} .price-three__item__list li,{{WRAPPER}} .price-four__item__list li', ['layout_one', 'layout_two', 'layout_three']);
        zeinet_typo_and_color_options($this, 'Price', '{{WRAPPER}} .plans-one__price,{{WRAPPER}} .price__box .price__box-price,{{WRAPPER}} .price-three__item__price,{{WRAPPER}} .price-four__item__price', ['layout_one', 'layout_two', 'layout_three', 'layout_four']);
        zeinet_typo_and_color_options($this, 'Discount Text', '{{WRAPPER}} .price-three__item__off', ['layout_three']);

        zeinet_typo_and_color_options($this, 'Item Count Text', '{{WRAPPER}} .price-four__item__pack__inner', ['layout_four']);
        zeinet_typo_and_color_options($this, 'Item Text', '{{WRAPPER}} .price-four__item__pack__inner span', ['layout_four']);

        zeinet_typo_and_color_options($this, 'Button', '{{WRAPPER}} .thm-btn', ['layout_one', 'layout_two', 'layout_three', 'layout_four']);
        zeinet_typo_and_color_options($this, 'Button Background', '{{WRAPPER}} .thm-btn', ['layout_one', 'layout_two', 'layout_three', 'layout_four'], 'background-color', false);

        $this->end_controls_section();
    }


    protected function render()
    {
        $settings = $this->get_settings_for_display();
        include zeinet_get_template('price-one.php');
        include zeinet_get_template('price-two.php');
        include zeinet_get_template('price-three.php');
        include zeinet_get_template('price-four.php');
    }
}