/**
  * This method is used to retrieve the configurable options of the element.
  * @return array The list of options that compose the element and then passed as the argument for the render() function
  */
 function options()
 {
     /*
      * Get Shop categories
      */
     $categories = WpkZn::getShopCategories();
     $uid = $this->data['uid'];
     $options = array('has_tabs' => true, 'general' => array('title' => 'General options', 'options' => array(array("name" => __("Display style", 'zn_framework'), "description" => __("Select the display layout.", 'zn_framework'), "id" => "woo_spp_display", "std" => 'tabs', "options" => array('tabs' => __('Tabs', 'zn_framework'), 'rows' => __('Simple Rows', 'zn_framework')), "type" => "select"), array("name" => __("Shop Category", 'zn_framework'), "description" => __("Select the shop category to show items", 'zn_framework'), "id" => "woo_categories", "multiple" => true, "std" => "0", "type" => "select", "options" => $categories), array("name" => __("Number of products", 'zn_framework'), "description" => __("Please enter how many products you want to LOAD.", 'zn_framework'), "id" => "prods_per_page", "std" => "6", "type" => "text"), array('id' => 'element_scheme', 'name' => 'Element Color Scheme', 'description' => 'Select the color scheme of this element', 'type' => 'select', 'std' => '', 'options' => array('' => 'Inherit from Kallyas options > Color Options [Requires refresh]', 'light' => 'Light (default)', 'dark' => 'Dark'), 'live' => array('multiple' => array(array('type' => 'class', 'css_class' => '.' . $uid, 'val_prepend' => 'spp--')))))), 'featured' => array('title' => 'Featured', 'options' => array(array("name" => __("Show Featured Products?", 'zn_framework'), "description" => __("Select yes if you want to show the featured products.", 'zn_framework'), "id" => "woo_fp_prod", "std" => '1', "options" => array('1' => __('Yes', 'zn_framework'), '0' => __('No', 'zn_framework')), "type" => "zn_radio"), array("name" => __("Featured Products Title", 'zn_framework'), "description" => __("Please enter a title for the featured products. If no title is set, the default title\n\t\t\t\t\t\t\t\t\twill be shown ( FEATURED PRODUCTS )", 'zn_framework'), "id" => "woo_fp_title", "std" => "", "type" => "text", "placeholder" => "eg: FEATURED PRODUCTS"), array("name" => __("Shop Category <strong>[Override default]</strong>", 'zn_framework'), "description" => __("Select the shop category to show items", 'zn_framework'), "id" => "woo_categories_fp", "multiple" => true, "std" => "0", "type" => "select", "options" => $categories), array("name" => __("Number of products <strong>[Override default]</strong>", 'zn_framework'), "description" => __("Please enter how many products you want to LOAD.", 'zn_framework'), "id" => "prods_per_page_fp", "std" => "6", "type" => "text"), array("name" => __("Enable Carousel", 'zn_framework'), "description" => __("Please select if you want the products to be wrapped into a carousel.", 'zn_framework'), "id" => "woo_fp_crs", "std" => "1", "options" => array('1' => __('Yes', 'zn_framework'), '0' => __('No', 'zn_framework')), "type" => "zn_radio"), array("name" => __("Enable Autoplay?", 'zn_framework'), "description" => __("Please select if you want the Featured Products panel to be auto-played.", 'zn_framework'), "id" => "woo_fp_auto", "std" => "", "value" => "yes", "type" => "toggle2", 'dependency' => array('element' => 'woo_fp_crs', 'value' => array('1'))), array("name" => __("Autoplay timeout", 'zn_framework'), "description" => __("If autoplay is enabled, please select the autoplay timeout, duration between the carousel will slide. Add in miliseconds, 5000ms = 5 seconds .", 'zn_framework'), "id" => "woo_fp_timeout", "std" => "5000", "type" => "text", 'dependency' => array('element' => 'woo_fp_crs', 'value' => array('1'))), array("name" => __("Products per row", 'zn_framework'), "description" => __("Please select how many products per row to display.", 'zn_framework'), "id" => "woo_fp_perrow", "std" => "4", "type" => "select", 'options' => array('1' => '1 per row', '2' => '2 per row', '3' => '3 per row', '4' => '4 per row', '5' => '5 per row', '6' => '6 per row'), 'dependency' => array('element' => 'woo_fp_crs', 'value' => array('0'))))), 'latest' => array('title' => 'Latest', 'options' => array(array("name" => __("Show Latest Products?", 'zn_framework'), "description" => __("Select yes if you want to show the latest products.", 'zn_framework'), "id" => "woo_lp_prod", "std" => '1', "options" => array('1' => __('Yes', 'zn_framework'), '0' => __('No', 'zn_framework')), "type" => "zn_radio"), array("name" => __("Latest Products Title", 'zn_framework'), "description" => __("Please enter a title for the latest products. If no title is set, the default title will be shown ( LATEST PRODUCTS )", 'zn_framework'), "id" => "woo_lp_title", "std" => "", "type" => "text", "placeholder" => "eg: LATEST PRODUCTS"), array("name" => __("Shop Category <strong>[Override default]</strong>", 'zn_framework'), "description" => __("Select the shop category to show items", 'zn_framework'), "id" => "woo_categories_lp", "multiple" => true, "std" => "0", "type" => "select", "options" => $categories), array("name" => __("Number of products <strong>[Override default]</strong>", 'zn_framework'), "description" => __("Please enter how many products you want to LOAD.", 'zn_framework'), "id" => "prods_per_page_lp", "std" => "6", "type" => "text"), array("name" => __("Enable Carousel", 'zn_framework'), "description" => __("Please select if you want the products to be wrapped into a carousel.", 'zn_framework'), "id" => "woo_lp_crs", "std" => "1", "options" => array('1' => __('Yes', 'zn_framework'), '0' => __('No', 'zn_framework')), "type" => "zn_radio"), array("name" => __("Enable Autoplay?", 'zn_framework'), "description" => __("Please select if you want the Latest Products panel to be auto-played.", 'zn_framework'), "id" => "woo_lp_auto", "std" => "", "value" => "yes", "type" => "toggle2", 'dependency' => array('element' => 'woo_lp_crs', 'value' => array('1'))), array("name" => __("Autoplay timeout", 'zn_framework'), "description" => __("If autoplay is enabled, please select the autoplay timeout, duration between the carousel will slide. Add in miliseconds, 5000ms = 5 seconds .", 'zn_framework'), "id" => "woo_lp_timeout", "std" => "5000", "type" => "text", 'dependency' => array('element' => 'woo_lp_crs', 'value' => array('1'))), array("name" => __("Products per row", 'zn_framework'), "description" => __("Please select how many products per row to display.", 'zn_framework'), "id" => "woo_lp_perrow", "std" => "4", "type" => "select", 'options' => array('1' => '1 per row', '2' => '2 per row', '3' => '3 per row', '4' => '4 per row', '5' => '5 per row', '6' => '6 per row'), 'dependency' => array('element' => 'woo_lp_crs', 'value' => array('0'))))), 'best' => array('title' => 'Best-Selling', 'options' => array(array("name" => __("Show Best Selling Products", 'zn_framework'), "description" => __("Select yes if you want to show the best selling products.", 'zn_framework'), "id" => "woo_bs_prod", "std" => '1', "options" => array('1' => __('Yes', 'zn_framework'), '0' => __('No', 'zn_framework')), "type" => "zn_radio"), array("name" => __("Best Selling Title", 'zn_framework'), "description" => __("Please enter a title for the best selling products. If no title is set , the default\n\t\t\t\t\t\t\t\t\ttitle will be shown ( BEST SELLING PRODUCTS )", 'zn_framework'), "id" => "woo_bsp_title", "std" => "", "type" => "text", "placeholder" => "eg: BEST SELLING PRODUCTS"), array("name" => __("Shop Category <strong>[Override default]</strong>", 'zn_framework'), "description" => __("Select the shop category to show items", 'zn_framework'), "id" => "woo_categories_bs", "multiple" => true, "std" => "0", "type" => "select", "options" => $categories), array("name" => __("Number of products <strong>[Override default]</strong>", 'zn_framework'), "description" => __("Please enter how many products you want to LOAD.", 'zn_framework'), "id" => "prods_per_page_bs", "std" => "6", "type" => "text"), array("name" => __("Enable Carousel", 'zn_framework'), "description" => __("Please select if you want the products to be wrapped into a carousel.", 'zn_framework'), "id" => "woo_bs_crs", "std" => "1", "options" => array('1' => __('Yes', 'zn_framework'), '0' => __('No', 'zn_framework')), "type" => "zn_radio"), array("name" => __("Enable Autoplay?", 'zn_framework'), "description" => __("Please select if you want the Best Selling panel to be auto-played.", 'zn_framework'), "id" => "woo_bs_auto", "std" => "", "value" => "yes", "type" => "toggle2", 'dependency' => array('element' => 'woo_bs_crs', 'value' => array('1'))), array("name" => __("Autoplay timeout", 'zn_framework'), "description" => __("If autoplay is enabled, please select the autoplay timeout, duration between the carousel will slide. Add in miliseconds, 5000ms = 5 seconds .", 'zn_framework'), "id" => "woo_bs_timeout", "std" => "5000", "type" => "text", 'dependency' => array('element' => 'woo_bs_crs', 'value' => array('1'))), array("name" => __("Products per row", 'zn_framework'), "description" => __("Please select how many products per row to display.", 'zn_framework'), "id" => "woo_bs_perrow", "std" => "4", "type" => "select", 'options' => array('1' => '1 per row', '2' => '2 per row', '3' => '3 per row', '4' => '4 per row', '5' => '5 per row', '6' => '6 per row'), 'dependency' => array('element' => 'woo_bs_crs', 'value' => array('0'))))), 'other' => array('title' => 'Other Options', 'options' => array(array('id' => 'css_class', 'name' => 'CSS class', 'description' => 'Enter a css class that will be applied to this element. You can than edit the custom css, either in the Page builder\'s CUSTOM CSS (which is loaded only into that particular page), or in Kallyas options > Advanced > Custom CSS which will load the css into the entire website.', 'type' => 'text', 'std' => ''))), 'help' => znpb_get_helptab(array('video' => 'http://support.hogash.com/kallyas-videos/#hy-twTGcQ7c', 'docs' => 'http://support.hogash.com/documentation/shop-products-presentation/', 'copy' => $uid, 'general' => true)));
     return $options;
 }
Exemplo n.º 2
0
 /**
  * This method is used to retrieve the configurable options of the element.
  * @return array The list of options that compose the element and then passed as the argument for the render() function
  */
 function options()
 {
     /*
      * Get Shop categories
      */
     $categories = WpkZn::getShopCategories();
     $uid = $this->data['uid'];
     $options = array('has_tabs' => true, 'general' => array('title' => 'General options', 'options' => array(array("name" => __("Element Title", 'zn_framework'), "description" => __("Enter a title for this element", 'zn_framework'), "id" => "woo_lo_title", "std" => "", "type" => "text"), array("name" => __("Shop Category", 'zn_framework'), "description" => __("Select the shop category to show items", 'zn_framework'), "id" => "woo_categories", "multiple" => true, "std" => "0", "type" => "select", "options" => $categories), array("name" => __("Number of products", 'zn_framework'), "description" => __("Please enter how many products you want to load.", 'zn_framework'), "id" => "prods_per_page", "std" => "6", "type" => "text"), array("name" => __("Autoplay carousel?", 'zn_framework'), "description" => __("Does the carousel autoplay itself?", 'zn_framework'), "id" => "sl_autoplay", "std" => "1", "value" => "1", "type" => "toggle2"), array("name" => __("Timeout duration", 'zn_framework'), "description" => __("The amount of milliseconds the carousel will pause", 'zn_framework'), "id" => "sl_timeout", "std" => "6000", "type" => "text"), array('id' => 'element_scheme', 'name' => 'Element Color Scheme', 'description' => 'Select the color scheme of this element', 'type' => 'select', 'std' => '', 'options' => array('' => 'Inherit from Kallyas options > Color Options [Requires refresh]', 'light' => 'Light (default)', 'dark' => 'Dark'), 'live' => array('multiple' => array(array('type' => 'class', 'css_class' => '.' . $uid, 'val_prepend' => 'slo--')))))), 'other' => array('title' => 'Other Options', 'options' => array(array('id' => 'css_class', 'name' => 'CSS class', 'description' => 'Enter a css class that will be applied to this element. You can than edit the custom css, either in the Page builder\'s CUSTOM CSS (which is loaded only into that particular page), or in Kallyas options > Advanced > Custom CSS which will load the css into the entire website.', 'type' => 'text', 'std' => ''))), 'help' => znpb_get_helptab(array('video' => 'http://support.hogash.com/kallyas-videos/#H06NN5lC_Ic', 'docs' => 'http://support.hogash.com/documentation/shop-limited-offers/', 'copy' => $uid, 'general' => true)));
     return $options;
 }