Current File : /home/kelaby89/diamondtiptiling.com/wp-content/plugins/floens-addon/includes/Widgets/Shop.php
<?php

namespace Layerdrops\Floens\Widgets;


class Shop extends \Elementor\Widget_Base
{
    public function get_name()
    {
        return 'floens-shop';
    }

    public function get_title()
    {
        return __('Shop', 'floens-addon');
    }

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

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

    protected function register_controls()
    {

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

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

        $this->end_controls_section();

        include  floens_get_elementor_option('shop-option.php');
        include  floens_get_elementor_option('shop-option-two.php');


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

        floens_elementor_general_style_options($this, 'Section Title', '{{WRAPPER}} .sec-title__title', ['layout_one']);
        floens_elementor_general_style_options($this, 'Section Sub Title', '{{WRAPPER}} .sec-title__tagline', ['layout_one']);
        floens_elementor_general_style_options($this, 'Title Tagline Color One', '{{WRAPPER}} .sec-title__tagline::before', ['layout_one']);
        floens_elementor_general_style_options($this, 'Title Tagline Color Two', '{{WRAPPER}} .sec-title__tagline::after', ['layout_one']);


        floens_elementor_general_style_options($this, 'Product Title', '{{WRAPPER}} .product__item__title a', ['layout_one', 'layout_two']);
        floens_elementor_general_style_options($this, 'Product Price', '{{WRAPPER}} .product__item__price', ['layout_one', 'layout_two']);

        $this->end_controls_section();

        //Button Style
        $this->start_controls_section(
            'button_style',
            [
                'label' => esc_html__('Button Style', 'floens-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
            ]
        );

        floens_elementor_button_style_options($this, 'Button', '{{WRAPPER}} .product__item .thm-btn', '{{WRAPPER}} .thm-btn::before', ['layout_one']);
        $this->end_controls_section();

        floens_get_elementor_carousel_options($this, ['layout_two']);
    }

    protected function render()
    {
        $settings = $this->get_settings_for_display();
        include floens_get_template('shop-one.php');
        include floens_get_template('shop-two.php');
    }
}
Hello World !