<?php

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( !function_exists('shrk_vc_maps') ) {

	function shrk_vc_maps() {

		$shrk_vc_shortcodes 			= array();

		$mapping_data['targets_arr']            = array(esc_html__("Same window", 'dvl-uxshop-shortcodes') => "_self", esc_html__("New window", 'dvl-uxshop-shortcodes') => "_blank");
		$mapping_data['ccarousel_post_types']   = shrk_vc_get_public_posttypes();
		$mapping_data['width_to_grid_classes']  = array( 
			'1 slide'   => '12', 
			'2 slides'  => '6', 
			'3 slides'  => '4', 
			'4 slides'  => '3', 
			'6 slides'  => '2', 
			'12 slides' => '1' 
		);

		$mapping_data['padding_options'] = array();

		for ($i=0; $i < 151; $i++) { $mapping_data['padding_options'][$i.'px'] = $i; }

		$mapping_data['alignment_options'] = array(
			esc_html__("Default", 'dvl-uxshop-shortcodes') => "default",
			esc_html__("Center", 'dvl-uxshop-shortcodes')  => "center",
			esc_html__("Left", 'dvl-uxshop-shortcodes')    => "left",
			esc_html__("Right", 'dvl-uxshop-shortcodes')   => "right"                                    
		);

		$mapping_data['alignment_text_options'] = array(
			esc_html__("Left aligned text.", 'dvl-uxshop-shortcodes')   => "text-left",
			esc_html__("Center aligned text.", 'dvl-uxshop-shortcodes') => "text-center",
			esc_html__("Right aligned text.", 'dvl-uxshop-shortcodes')  => "text-right",
			esc_html__("Justified text.", 'dvl-uxshop-shortcodes')      => "text-justify",
		);

		$mapping_data['add_css_animation'] = array(
			"type"        => "dropdown",
			"heading"     => esc_html__("CSS Animation", 'dvl-uxshop-shortcodes'),
			"param_name"  => "css_animation",
			"admin_label" => true,
			"value"       => array(
				esc_html__("No", 'dvl-uxshop-shortcodes')                 => '', 
				esc_html__("Top to bottom", 'dvl-uxshop-shortcodes')      => "top-to-bottom", 
				esc_html__("Bottom to top", 'dvl-uxshop-shortcodes')      => "bottom-to-top", 
				esc_html__("Left to right", 'dvl-uxshop-shortcodes')      => "left-to-right", 
				esc_html__("Right to left", 'dvl-uxshop-shortcodes')      => "right-to-left", 
				esc_html__("Appear from center", 'dvl-uxshop-shortcodes') => "appear"
				),
			"description" => esc_html__("Select animation type if you want this element to be animated when it enters into the browsers viewport. Note: Works only in modern browsers.", 'dvl-uxshop-shortcodes')
		);
	

		/**
		 * Woocommerce shortcodes 
		 */

		if ( function_exists( 'WC' ) ) {

			$woo_products_order_options = array(
				esc_html__("ID", 'dvl-uxshop-shortcodes')         => "id",
				esc_html__("Menu Order", 'dvl-uxshop-shortcodes') => "menu_order", 
				esc_html__("Title", 'dvl-uxshop-shortcodes')      => "title", 
				esc_html__("Date", 'dvl-uxshop-shortcodes')       => "date", 
				esc_html__("Random", 'dvl-uxshop-shortcodes')     => "rand", 
				);

			/**
			 * Default Woocommerce shortcodes
			 */

			/* Used on the cart page, the cart shortcode displays the cart contents and interface for coupon codes and other cart bits and pieces. */
			$shrk_vc_shortcodes["woocommerce_cart"] =  array(
			   "name" => esc_html__("Cart", 'dvl-uxshop-shortcodes'), 
			   "base" => "woocommerce_cart",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => false,
			   "description" => "",
			   "params" => array()
			);    

			/* Used on the checkout page, the checkout shortcode displays the checkout process. */
			$shrk_vc_shortcodes["woocommerce_checkout"] =  array(
			   "name" => esc_html__("Checkout", 'dvl-uxshop-shortcodes'), 
			   "base" => "woocommerce_checkout",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => false,
			   "params" => array()
			);    

			/* Lets a user see the status of an order by entering their order details. */
			$shrk_vc_shortcodes["woocommerce_order_tracking"] =  array(
			   "name" => esc_html__("Order Tracking form", 'dvl-uxshop-shortcodes'), 
			   "base" => "woocommerce_order_tracking",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => false,
			   "params" => array()
			);   		

			/* Shows the 'my account' section where the customer can view past orders and update their information. You can specify the number or order to show, it's set by default to 15 (use -1 to display all orders.) */
			$shrk_vc_shortcodes["woocommerce_my_account"] =  array(
			   "name" => esc_html__("My Account", 'dvl-uxshop-shortcodes'), 
			   "base" => "woocommerce_my_account",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => false,
			   "params" => array(
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of orders", 'dvl-uxshop-shortcodes'),
								"param_name" => "order_count",
								"description" => esc_html__("You can specify the number of orders to show, it's set by default to 15 (use -1 to display all orders.)", 'dvl-uxshop-shortcodes'),
								"value" => "15",
							),
						)
			);    

			/* Lists recent products – useful on the homepage. The 'per_page' shortcode determines how many products to show on the page and the columns attribute controls how many columns wide the products should be before wrapping. */
			$shrk_vc_shortcodes["recent_products"] =  array(
			   "name" => esc_html__("Recent products", 'dvl-uxshop-shortcodes'), 
			   "base" => "recent_products",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => false,
			   "params" => array(
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
								"param_name" => "per_page",
								"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
								"value" => "12",
							),
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
								"param_name" => "columns",
								"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
								"value" => "4",
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
								"param_name" => "orderby",
								"value" => $woo_products_order_options, 
								"std" => 'date'
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
								"param_name" => "order",
								"value" => array(
									esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
								),
							),
						)
			); 

			/* Works exactly the same as recent products but displays products which have been set as “featured”. In this example, the shortcode is saying show 12 featured products in 4 columns. */
			$shrk_vc_shortcodes["featured_products"] =  array(
			   "name" => esc_html__("Featured products", 'dvl-uxshop-shortcodes'), 
			   "base" => "featured_products",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => false,
			   "params" => array(
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
								"param_name" => "per_page",
								"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
								"value" => "12",
							),
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
								"param_name" => "columns",
								"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
								"value" => "4",
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
								"param_name" => "orderby",
								"value" => $woo_products_order_options, 
								"std" => 'date'
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
								"param_name" => "order",
								"value" => array(
									esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
								),
							)
						)
			); 

			/* Show a single product by ID or SKU. */
			$shrk_vc_shortcodes["product"] =  array(
			   "name" => esc_html__("Product", 'dvl-uxshop-shortcodes'), 
			   "base" => "product",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => true,
			   "params" => array(
							array(
								"type" => "woo_products",
								"heading" => esc_html__("Select a product from the list.", 'dvl-uxshop-shortcodes'),
								"param_name" => "id",
								"multiple" => false,
								"description" => "",
								"value" => "",
							),
							array(
								"type" => "textfield",
								"heading" => esc_html__("Extra classes", 'dvl-uxshop-shortcodes'),
								"param_name" => "class",
								"description" => esc_html__("Add extra classes to element. 'columns-1' class is required. Don't remove it unless you know what you are doing.", 'dvl-uxshop-shortcodes'),
								"value" => "columns-1",
								"save_always" => true, //required to save default value after vc 4.9.1
							)
						)
			); 

			/* Show multiple products by ID or SKU. Make note of the plural 'products'. */
			$shrk_vc_shortcodes["products"] =  array(
			   "name" => esc_html__("Products", 'dvl-uxshop-shortcodes'), 
			   "base" => "products",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => true,
			   "params" => array(
							array(
								"type" => "woo_products",
								"heading" => esc_html__("Select one or more products from the list.", 'dvl-uxshop-shortcodes'),
								"param_name" => "ids",
								"multiple" => true,
								"description" => esc_html__("Hold down CTRL button to select more than one items.", 'dvl-uxshop-shortcodes'),
								"value" => "",
								),
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
								"param_name" => "columns",
								"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
								"value" => "4",
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
								"param_name" => "orderby",
								"value" => $woo_products_order_options, 
								"std" => 'title'
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
								"param_name" => "order",
								"value" => array(
									esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
									esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
								),
							)
						)
			); 

			/* Show the price and add to cart button of a single product by ID. */
			$shrk_vc_shortcodes["add_to_cart"] =  array(
			   "name" => esc_html__("Add to cart", 'dvl-uxshop-shortcodes'), 
			   "base" => "add_to_cart",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => true,
			   "params" => array(
							array(
								"type" => "woo_products",
								"heading" => esc_html__("Select a product from the list.", 'dvl-uxshop-shortcodes'),
								"param_name" => "id",
								"multiple" => false,
								"description" => "",
								"value" => "",
							),
						)
			); 

			/* Echo the URL on the add to cart button of a single product by ID. */
			$shrk_vc_shortcodes["add_to_cart_url"] =  array(
			   "name" => esc_html__("Add to cart URL", 'dvl-uxshop-shortcodes'), 
			   "base" => "add_to_cart_url",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => true,
			   "params" => array(
							array(
								"type" => "woo_products",
								"heading" => esc_html__("Select a product from the list.", 'dvl-uxshop-shortcodes'),
								"param_name" => "id",
								"multiple" => false,
								"description" => "",
								"value" => "",
							),
						)
			); 

			/* Show a full single product page by ID or SKU. */
			$shrk_vc_shortcodes["product_page"] =  array(
			   "name" => esc_html__("Product page", 'dvl-uxshop-shortcodes'), 
			   "base" => "product_page",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => true,
			   "params" => array(
							array(
								"type" => "woo_products",
								"heading" => esc_html__("Select a product from the list.", 'dvl-uxshop-shortcodes'),
								"param_name" => "id",
								"multiple" => false,
								"description" => "",
								"value" => "",
							),
						)
			); 

			/* Product category - Show multiple products in a category by slug. */
			$shrk_vc_shortcodes["product_category"] =  array(
			   "name" => esc_html__("Product category", 'dvl-uxshop-shortcodes'), 
			   "base" => "product_category",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-shrk",
			   "show_settings_on_create" => true,
			   "params" => array(
							array(
								"type" => "woo_categories",
								"heading" => esc_html__("Select a product category from the list.", 'dvl-uxshop-shortcodes'),
								"param_name" => "category",
								"multiple" => false,
								"output" => "slug",
								"description" => "",
								"value" => "",
							),
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
								"param_name" => "per_page",
								"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
								"value" => "12",
							),
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
								"param_name" => "columns",
								"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
								"value" => "4",
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
								"param_name" => "orderby",
								"value" => $woo_products_order_options, 
								"std" => 'title'
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
								"param_name" => "order",
								"value" => array(
									esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
									esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
								),
							)
						)
			); 

			/* Product Categories - Display product categories loop */
			$shrk_vc_shortcodes["product_categories"] =  array(
				"name" => esc_html__("Product categories", 'dvl-uxshop-shortcodes'), 
				"base" => "product_categories",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-shrk",
				"show_settings_on_create" => true,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
									"param_name" => "columns",
									"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
									"value" => "4",
								),
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of items shown", 'dvl-uxshop-shortcodes'),
									"param_name" => "number",
									"description" => esc_html__("Enter a number to limit the number of categories shown. Leave empty to show them all.", 'dvl-uxshop-shortcodes'),
									"value" => "",
								),
								array(
									"type" => 'checkbox',
									"heading" => esc_html__("Display only top level categories", 'dvl-uxshop-shortcodes'),
									"param_name" => "parent", //default '' , set to '0' to activate
									"value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => '0')
								),					
								array(
									"type" => 'checkbox',
									"heading" => esc_html__("Show empty categories", 'dvl-uxshop-shortcodes'),
									"param_name" => "hide_empty", //default '1', set '0' to show empty
									"value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => '0')
								),
								array(
									"type" => "woo_categories",
									"heading" => esc_html__("Limit product categories.", 'dvl-uxshop-shortcodes'),
									"param_name" => "ids",
									"multiple" => true,
									"output" => "id",
									"description" => esc_html__("Select one or more categories to show only these. Selecting none displays all. Use CTRL+click to select/de-select multiple items.", 'dvl-uxshop-shortcodes'),
									"value" => "",
								),
							),
			);

			/* Sale Products - List all products on sale. */
			$shrk_vc_shortcodes["sale_products"] =  array(
				"name" => esc_html__("Sale products", 'dvl-uxshop-shortcodes'), 
				"base" => "sale_products",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-shrk",
				"show_settings_on_create" => false,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
									"param_name" => "columns",
									"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
									"value" => "4",
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
									"param_name" => "orderby",
									"value" => $woo_products_order_options, 
									"std" => 'title'
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
									"param_name" => "order",
									"value" => array(
										esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
										esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									),
								)
						)
			); 


			/* Best Selling Products */
			$shrk_vc_shortcodes["best_selling_products"] =  array(
				"name" => esc_html__("Best Selling products", 'dvl-uxshop-shortcodes'), 
				"base" => "best_selling_products",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-shrk",
				"show_settings_on_create" => false,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
									"param_name" => "columns",
									"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
									"value" => "4",
								),
						)
			); 

			/* Top Rated Products */
			$shrk_vc_shortcodes["top_rated_products"] =  array(
				"name" => esc_html__("Top Rated products", 'dvl-uxshop-shortcodes'), 
				"base" => "top_rated_products",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-shrk",
				"show_settings_on_create" => false,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
									"param_name" => "columns",
									"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
									"value" => "4",
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
									"param_name" => "orderby",
									"value" => $woo_products_order_options, 
									"std" => 'title'
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
									"param_name" => "order",
									"value" => array(
										esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
										esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									),
								)
						)
			); 

			/* Product Attribute - List products with an attribute shortcode */
			$shrk_vc_shortcodes["product_attribute"] =  array(
				"name" => esc_html__("Product Attribute", 'dvl-uxshop-shortcodes'), 
				"base" => "product_attribute",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-shrk",
				"show_settings_on_create" => true,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
									"param_name" => "columns",
									"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
									"value" => "4",
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
									"param_name" => "orderby",
									"value" => $woo_products_order_options, 
									"std" => 'title'
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
									"param_name" => "order",
									"value" => array(
										esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
										esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									),
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Attribute", 'dvl-uxshop-shortcodes'),
									"param_name" => "attribute",
									"value" => shrk_vc_get_product_attributes()
								),
								array(
									"type" => "textfield",
									"heading" => esc_html__("Filter value", 'dvl-uxshop-shortcodes'),
									"param_name" => "filter",
									"description" => esc_html__("Enter the slug of the attribute value to show products only with this attribute.", 'dvl-uxshop-shortcodes'),
									"value" => "",
								),
						)
			); 

			/* Related Products */
			$shrk_vc_shortcodes["related_products"] =  array(
				"name" => esc_html__("Related products", 'dvl-uxshop-shortcodes'), 
				"base" => "related_products",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-shrk",
				"show_settings_on_create" => false,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of columns", 'dvl-uxshop-shortcodes'),
									"param_name" => "columns",
									"description" => esc_html__("Controls how many columns wide the products should be before wrapping. Entering any number larger than 10 will ignore the setting and use the 'Shop Columns grid' setting from the theme options instead.", 'dvl-uxshop-shortcodes'),
									"value" => "4",
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
									"param_name" => "orderby",
									"value" => $woo_products_order_options, 
									"std" => 'title'
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
									"param_name" => "order",
									"value" => array(
										esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
										esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									),
								)
						)
			); 

			/**
			 * Extra Woocommerce shortcodes
			 *
			 *
			 * Sliders
			 */
			
			$swiper_option_loop =	 	array(
											"type" => "dropdown",
											"class" => "",
											"heading" => esc_html__("Loop slider", 'dvl-uxshop-shortcodes'),
											"param_name" => "swiper_loop",
											"value" => array(
												esc_html__("No", 'dvl-uxshop-shortcodes') => "false",
												esc_html__("Yes", 'dvl-uxshop-shortcodes') => "true",
											)
										);
			$swiper_option_perview =	array(
											"type" => "textfield",
											"class" => "",
											"heading" => esc_html__("Visible slides", 'dvl-uxshop-shortcodes'),
											"param_name" => "swiper_slidesperview",
											"value" => "3"
										);

			/* Slider - Lists recent products – useful on the homepage. The 'per_page' shortcode determines how many products to show on the page and the columns attribute controls how many columns wide the products should be before wrapping. */
			$shrk_vc_shortcodes["shrk_recent_products_slider"] =  array(
			   "name" => esc_html__("Recent products slider", 'dvl-uxshop-shortcodes'), 
			   "base" => "shrk_recent_products_slider",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-slider-shrk",
			   "show_settings_on_create" => false,
			   "params" => array(
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
								"param_name" => "per_page",
								"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
								"value" => "12",
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
								"param_name" => "orderby",
								"value" => $woo_products_order_options, 
								"std" => 'date'
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
								"param_name" => "order",
								"value" => array(
									esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
								),
							),
							$swiper_option_loop,
							$swiper_option_perview
						)
			); 

			/* Slider - Works exactly the same as recent products but displays products which have been set as “featured”. In this example, the shortcode is saying show 12 featured products in 4 columns. */
			$shrk_vc_shortcodes["shrk_featured_products_slider"] =  array(
			   "name" => esc_html__("Featured products slider", 'dvl-uxshop-shortcodes'), 
			   "base" => "shrk_featured_products_slider",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-slider-shrk",
			   "show_settings_on_create" => false,
			   "params" => array(
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
								"param_name" => "per_page",
								"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
								"value" => "12",
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
								"param_name" => "orderby",
								"value" => $woo_products_order_options, 
								"std" => 'date'
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
								"param_name" => "order",
								"value" => array(
									esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
								),
							),
							$swiper_option_loop,
							$swiper_option_perview
						)
			); 

			/* Slider - Show multiple products by ID or SKU. Make note of the plural 'products'. */
			$shrk_vc_shortcodes["shrk_products_slider"] =  array(
			   "name" => esc_html__("Products slider", 'dvl-uxshop-shortcodes'), 
			   "base" => "shrk_products_slider",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-slider-shrk",
			   "show_settings_on_create" => true,
			   "params" => array(
							array(
								"type" => "woo_products",
								"heading" => esc_html__("Select one or more products from the list.", 'dvl-uxshop-shortcodes'),
								"param_name" => "ids",
								"multiple" => true,
								"description" => esc_html__("Hold down CTRL button to select more than one items.", 'dvl-uxshop-shortcodes'),
								"value" => "",
								),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
								"param_name" => "orderby",
								"value" => $woo_products_order_options, 
								"std" => 'title'
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
								"param_name" => "order",
								"value" => array(
									esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
									esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
								),
							),
							$swiper_option_loop,
							$swiper_option_perview
						)
			); 

			/* Slider - Product category - Show multiple products in a category by slug. */
			$shrk_vc_shortcodes["shrk_product_category_slider"] =  array(
			   "name" => esc_html__("Product category slider", 'dvl-uxshop-shortcodes'), 
			   "base" => "shrk_product_category_slider",
			   "category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
			   "icon" => "icon-woo-slider-shrk",
			   "show_settings_on_create" => true,
			   "params" => array(
							array(
								"type" => "woo_categories",
								"heading" => esc_html__("Select a product category from the list.", 'dvl-uxshop-shortcodes'),
								"param_name" => "category",
								"multiple" => false,
								"output" => "slug",
								"description" => "",
								"value" => "",
							),
							array(
								"type" => "textfield",
								"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
								"param_name" => "per_page",
								"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
								"value" => "12",
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
								"param_name" => "orderby",
								"value" => $woo_products_order_options, 
								"std" => 'title'
							),
							array(
								"type" => "dropdown",
								"class" => "",
								"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
								"param_name" => "order",
								"value" => array(
									esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
									esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
								),
							),
							$swiper_option_loop,
							$swiper_option_perview
						)
			); 

			/* Slider - Product Categories - Display product categories loop */
			$shrk_vc_shortcodes["shrk_product_categories_slider"] =  array(
				"name" => esc_html__("Product categories slider", 'dvl-uxshop-shortcodes'), 
				"base" => "shrk_product_categories_slider",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-slider-shrk",
				"show_settings_on_create" => true,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of items shown", 'dvl-uxshop-shortcodes'),
									"param_name" => "number",
									"description" => esc_html__("Enter a number to limit the number of categories shown. Leave empty to show them all.", 'dvl-uxshop-shortcodes'),
									"value" => "",
								),
								array(
									"type" => 'checkbox',
									"heading" => esc_html__("Display only top level categories", 'dvl-uxshop-shortcodes'),
									"param_name" => "parent", //default '' , set to '0' to activate
									"value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => '0') 
								),					
								array(
									"type" => 'checkbox',
									"heading" => esc_html__("Show empty categories", 'dvl-uxshop-shortcodes'),
									"param_name" => "hide_empty", //default '1', set '0' to show empty
									"value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => '0')
								),
								array(
									"type" => "woo_categories",
									"heading" => esc_html__("Limit product categories.", 'dvl-uxshop-shortcodes'),
									"param_name" => "ids",
									"multiple" => true,
									"output" => "id",
									"description" => esc_html__("Select one or more categories to show only these. Selecting none displays all. Use CTRL+click to select/de-select multiple items.", 'dvl-uxshop-shortcodes'),
									"value" => "",
								),
								$swiper_option_loop,
								$swiper_option_perview
							),
			);

			/* Slider - Sale Products - List all products on sale. */
			$shrk_vc_shortcodes["shrk_sale_products_slider"] =  array(
				"name" => esc_html__("Sale products slider", 'dvl-uxshop-shortcodes'), 
				"base" => "shrk_sale_products_slider",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-slider-shrk",
				"show_settings_on_create" => false,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
									"value" => $woo_products_order_options, 
									"param_name" => "orderby",
									"std" => 'title'
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
									"param_name" => "order",
									"value" => array(
										esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
										esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									),
								),
								$swiper_option_loop,
								$swiper_option_perview
						)
			); 


			/* Slider - Best Selling Products */
			$shrk_vc_shortcodes["shrk_best_selling_products_slider"] =  array(
				"name" => esc_html__("Best Selling products slider", 'dvl-uxshop-shortcodes'), 
				"base" => "shrk_best_selling_products_slider",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-slider-shrk",
				"show_settings_on_create" => false,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								$swiper_option_loop,
								$swiper_option_perview
						)
			); 

			/* Slider - Top Rated Products */
			$shrk_vc_shortcodes["shrk_top_rated_products_slider"] =  array(
				"name" => esc_html__("Top Rated products slider", 'dvl-uxshop-shortcodes'), 
				"base" => "shrk_top_rated_products_slider",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-slider-shrk",
				"show_settings_on_create" => false,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
									"param_name" => "orderby",
									"value" => $woo_products_order_options, 
									"std" => 'title'
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
									"param_name" => "order",
									"value" => array(
										esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
										esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									),
								),
								$swiper_option_loop,
								$swiper_option_perview
						)
			); 

			/* Slider - Product Attribute - List products with an attribute shortcode */
			$shrk_vc_shortcodes["shrk_product_attribute_slider"] =  array(
				"name" => esc_html__("Product Attribute Slider", 'dvl-uxshop-shortcodes'), 
				"base" => "shrk_product_attribute_slider",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-slider-shrk",
				"show_settings_on_create" => true,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
									"param_name" => "orderby",
									"value" => $woo_products_order_options, 
									"std" => 'title'
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
									"param_name" => "order",
									"value" => array(
										esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
										esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									),
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Attribute", 'dvl-uxshop-shortcodes'),
									"param_name" => "attribute",
									"value" => shrk_vc_get_product_attributes()
								),
								array(
									"type" => "textfield",
									"heading" => esc_html__("Filter value", 'dvl-uxshop-shortcodes'),
									"param_name" => "filter",
									"description" => esc_html__("Enter the slug of the attribute value to show products only with this attribute.", 'dvl-uxshop-shortcodes'),
									"value" => "",
								),
								$swiper_option_loop,
								$swiper_option_perview
						)
			); 

			/* Slider - Related Products */
			$shrk_vc_shortcodes["shrk_related_products_slider"] =  array(
				"name" => esc_html__("Related products slider", 'dvl-uxshop-shortcodes'), 
				"base" => "shrk_related_products_slider",
				"category" => esc_html__("Woocommerce", 'dvl-uxshop-shortcodes'),
				"icon" => "icon-woo-slider-shrk",
				"show_settings_on_create" => false,
				"params" => array(
								array(
									"type" => "textfield",
									"heading" => esc_html__("No of Items to show", 'dvl-uxshop-shortcodes'),
									"param_name" => "per_page",
									"description" => esc_html__("You can specify the number of products to show.", 'dvl-uxshop-shortcodes'),
									"value" => "12",
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order By", 'dvl-uxshop-shortcodes'),
									"param_name" => "orderby",
									"value" => $woo_products_order_options, 
									"std" => 'title'
								),
								array(
									"type" => "dropdown",
									"class" => "",
									"heading" => esc_html__("Order", 'dvl-uxshop-shortcodes'),
									"param_name" => "order",
									"value" => array(
										esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc",
										esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc",
									),
								),
								$swiper_option_loop,
								$swiper_option_perview
						)
			); 

		}

		return apply_filters( 'shrk_filter_vc_mappings', $shrk_vc_shortcodes, $mapping_data );
	}

}

?>