| 1 |
<?php |
| 2 |
|
| 3 |
namespace Disco\App\DropDown; |
| 4 |
|
| 5 |
/** |
| 6 |
* Class DropDown |
| 7 |
* |
| 8 |
* @package Disco |
| 9 |
* @subpackage app\DropDown |
| 10 |
* @author Ohidul Islam <wahid0003@gmail.com> |
| 11 |
* @link https://webappick.com |
| 12 |
* @license https://opensource.org/licenses/gpl-license.php GNU Public License |
| 13 |
* @category Disco |
| 14 |
*/ |
| 15 |
class DiscountDropDown { |
| 16 |
|
| 17 |
public function __construct() { |
| 18 |
// Constructor... |
| 19 |
} |
| 20 |
|
| 21 |
/** |
| 22 |
* Available Discount Intents. |
| 23 |
* |
| 24 |
* @return array |
| 25 |
* @throws \Exception If the file is not found. |
| 26 |
*/ |
| 27 |
public static function discount_intents() { |
| 28 |
return array( |
| 29 |
'Product' => esc_html__( 'Product', 'disco' ), |
| 30 |
'Cart' => esc_html__( 'Cart', 'disco' ), |
| 31 |
'Shipping' => esc_html__( 'Free Shipping', 'disco' ), |
| 32 |
'Bulk' => esc_html__( 'Bulk Discount', 'disco' ), |
| 33 |
'Bundle' => esc_html__( 'Bundle Discount', 'disco' ), |
| 34 |
'BOGO' => esc_html__( 'BOGO', 'disco' ), |
| 35 |
); |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* Available Discount Types. |
| 40 |
* |
| 41 |
* @return array |
| 42 |
* @throws \Exception If the file is not found. |
| 43 |
*/ |
| 44 |
public static function discount_types() { |
| 45 |
return array( |
| 46 |
'percent' => esc_html__( '% - Percentage Discount', 'disco' ), |
| 47 |
'fixed' => esc_html__( '$ - Fixed Discount', 'disco' ), |
| 48 |
// 'fixed_price' => esc_html__( '$ - Fixed Price', 'disco' ), |
| 49 |
'fixed_per_product' => esc_html__( '$ - Fixed Discount Per Cart Item', 'disco' ), |
| 50 |
// 'percent_per_product' => esc_html__( '% - Percent Discount Per Cart Item', 'disco' ), |
| 51 |
'free' => esc_html__( 'Free Items', 'disco' ), |
| 52 |
); |
| 53 |
} |
| 54 |
|
| 55 |
/** |
| 56 |
* Available Discount Types. |
| 57 |
* |
| 58 |
* @return array |
| 59 |
* @throws \Exception If the file is not found. |
| 60 |
*/ |
| 61 |
public static function discount_based_on() { |
| 62 |
return array( |
| 63 |
'item_quantity' => esc_html__( 'Item Quantity', 'disco' ), |
| 64 |
'item_price' => esc_html__( 'Item Price', 'disco' ), |
| 65 |
'cart_quantity' => esc_html__( 'Cart Quantity', 'disco' ), |
| 66 |
'cart_subtotal' => esc_html__( 'Cart Subtotal', 'disco' ), |
| 67 |
); |
| 68 |
} |
| 69 |
|
| 70 |
/** |
| 71 |
* Available BOGO Types. |
| 72 |
* |
| 73 |
* @return array |
| 74 |
* @throws \Exception If the file is not found. |
| 75 |
*/ |
| 76 |
public static function bogo_types() { |
| 77 |
return array( |
| 78 |
'all' => esc_html__( 'Buy X Get X', 'disco' ), |
| 79 |
'products' => esc_html__( 'Buy X Get Y (Products)', 'disco' ), |
| 80 |
'categories' => esc_html__( 'Buy X Get Y (Categories)', 'disco' ), |
| 81 |
); |
| 82 |
} |
| 83 |
|
| 84 |
/** |
| 85 |
* Available Discount Types. |
| 86 |
* |
| 87 |
* @return array |
| 88 |
* @throws \Exception If the file is not found. |
| 89 |
*/ |
| 90 |
public static function discount_methods() { |
| 91 |
return array( |
| 92 |
'automated' => esc_html__( 'Automated Discount', 'disco' ), |
| 93 |
// 'coupon' => esc_html__('Coupon Discount', 'disco'), |
| 94 |
); |
| 95 |
} |
| 96 |
|
| 97 |
/** |
| 98 |
* Select Products to add discount. |
| 99 |
* |
| 100 |
* @return array |
| 101 |
* @throws \Exception If the file is not found. |
| 102 |
*/ |
| 103 |
public static function products() { |
| 104 |
return array( |
| 105 |
'all_products' => esc_html__( 'All Products', 'disco' ), |
| 106 |
'products' => esc_html__( 'Few Products', 'disco' ), |
| 107 |
); |
| 108 |
} |
| 109 |
|
| 110 |
} |
| 111 |
|