product-list-config.php
90 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Elementor; |
| 4 | |
| 5 | defined('ABSPATH') || exit; |
| 6 | |
| 7 | class ShopEngine_Product_List_Config extends \ShopEngine\Base\Widget_Config{ |
| 8 | |
| 9 | public function get_name() { |
| 10 | return 'product-list'; |
| 11 | } |
| 12 | |
| 13 | |
| 14 | public function get_title() { |
| 15 | return esc_html__('Product List', 'shopengine'); |
| 16 | } |
| 17 | |
| 18 | |
| 19 | public function get_icon() { |
| 20 | return 'shopengine-widget-icon shopengine-icon-archive_products'; |
| 21 | } |
| 22 | |
| 23 | |
| 24 | public function get_categories() { |
| 25 | return ['shopengine-archive']; |
| 26 | } |
| 27 | |
| 28 | |
| 29 | public function get_keywords() { |
| 30 | return ['woocommerce', 'shopengine', 'product', 'product list']; |
| 31 | } |
| 32 | |
| 33 | public function get_template_territory() { |
| 34 | return []; |
| 35 | } |
| 36 | |
| 37 | public function product_order_by() { |
| 38 | |
| 39 | if (class_exists('ShopEngine_Pro')) { |
| 40 | return [ |
| 41 | 'ID' => esc_html__('ID', 'shopengine'), |
| 42 | 'title' => esc_html__('Title', 'shopengine'), |
| 43 | 'name' => esc_html__('Name', 'shopengine'), |
| 44 | 'date' => esc_html__('Date', 'shopengine'), |
| 45 | 'comment_count' => esc_html__('Popular', 'shopengine'), |
| 46 | 'modified' => esc_html__('Modified', 'shopengine'), |
| 47 | 'price' => esc_html__('Price', 'shopengine'), |
| 48 | 'sales' => esc_html__('Sales', 'shopengine'), |
| 49 | 'rated' => esc_html__('Top Rated', 'shopengine'), |
| 50 | 'rand' => esc_html__('Random', 'shopengine'), |
| 51 | 'menu_order' => esc_html__('Menu Order', 'shopengine'), |
| 52 | 'sku' => esc_html__('SKU', 'shopengine'), |
| 53 | 'stock_status' => esc_html__('Stock Status', 'shopengine') |
| 54 | ]; |
| 55 | } |
| 56 | return [ |
| 57 | 'ID' => esc_html__('ID', 'shopengine'), |
| 58 | 'title' => esc_html__('Title', 'shopengine'), |
| 59 | 'name' => esc_html__('Name', 'shopengine'), |
| 60 | 'date' => esc_html__('Date', 'shopengine'), |
| 61 | 'comment_count' => esc_html__('Popular', 'shopengine') |
| 62 | ]; |
| 63 | } |
| 64 | |
| 65 | public function product_query_by() { |
| 66 | |
| 67 | if (class_exists('ShopEngine_Pro')) { |
| 68 | return [ |
| 69 | 'category' => esc_html__('Category', 'shopengine'), |
| 70 | 'tag' => esc_html__('Tag', 'shopengine'), |
| 71 | 'product' => esc_html__('Product', 'shopengine'), |
| 72 | 'rating' => esc_html__('Rating', 'shopengine'), |
| 73 | 'attribute' => esc_html__('Attribute', 'shopengine'), |
| 74 | 'author' => esc_html__('Author', 'shopengine'), |
| 75 | 'featured' => esc_html__('Featured', 'shopengine'), |
| 76 | 'sale' => esc_html__('Sale', 'shopengine'), |
| 77 | 'viewed' => esc_html__('Recently Viewed', 'shopengine') |
| 78 | ]; |
| 79 | } |
| 80 | return [ |
| 81 | 'category' => esc_html__('Category', 'shopengine'), |
| 82 | 'tag' => esc_html__('Tag', 'shopengine'), |
| 83 | 'product' => esc_html__('Product', 'shopengine'), |
| 84 | 'rating' => esc_html__('Rating', 'shopengine'), |
| 85 | 'attribute' => esc_html__('Attribute', 'shopengine'), |
| 86 | 'author' => esc_html__('Author', 'shopengine'), |
| 87 | ]; |
| 88 | } |
| 89 | |
| 90 | } |