PluginProbe
Tiered Pricing Table for WooCommerce / 6.1.0
Tiered Pricing Table for WooCommerce v6.1.0
8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 All 91 releases
tier-pricing-table / src / Settings / Sections / GeneralSection / Subsections / CartSubsection.php

CartSubsection.php in Tiered Pricing Table for WooCommerce 6.1.0, at src/Settings/Sections/GeneralSection/Subsections/CartSubsection.php

80 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Settings\Sections\GeneralSection\Subsections;
2
3 use TierPricingTable\Settings\CustomOptions\TPTSwitchOption;
4 use TierPricingTable\Settings\CustomOptions\TPTTextTemplate;
5 use TierPricingTable\Settings\Sections\SubsectionAbstract;
6 use TierPricingTable\Settings\Settings;
7
8 class CartSubsection extends SubsectionAbstract {
9
10 public function getTitle() {
11 return __( 'Tiered pricing in the cart and checkout pages', 'tier-pricing-table' );
12 }
13
14 public function getDescription() {
15 return __( 'This section controls how the tiered pricing will look and behave on the cart and checkout pages',
16 'tier-pricing-table' );
17 }
18
19 public function getSlug() {
20 return 'cart';
21 }
22
23 public function getSettings() {
24 return array(
25 array(
26 'title' => __( 'Consider different product variations as the same product during calculation tiered pricing',
27 'tier-pricing-table' ),
28 'id' => Settings::SETTINGS_PREFIX . 'summarize_variations',
29 'type' => TPTSwitchOption::FIELD_TYPE,
30 'default' => 'no',
31 'desc' => __( 'For the same variable product, the plugin will consider all its variations as the same product when calculating a discount.',
32 'tier-pricing-table' ),
33 'desc_tip' => true,
34 ),
35 array(
36 'title' => __( 'Show tiered price in the cart as a discount', 'tier-pricing-table' ),
37 'id' => Settings::SETTINGS_PREFIX . 'show_discount_in_cart',
38 'desc' => __( 'Show the crossed-out original price with a discounted price beside it. Example: ', 'tier-pricing-table' ) . ' <b><del>$10.00</del> $8.00<b>',
39 'type' => TPTSwitchOption::FIELD_TYPE,
40 'default' => 'yes',
41 'desc_tip' => true,
42 'custom_attributes' => [ 'data-tiered-pricing-premium-option' => 'yes' ]
43 ),
44
45 array(
46 'title' => __( 'Cart upsells', 'tier-pricing-table' ),
47 'id' => Settings::SETTINGS_PREFIX . 'cart_upsell_enabled',
48 'type' => TPTSwitchOption::FIELD_TYPE,
49 'default' => 'no',
50 'desc_tip' => false,
51 'custom_attributes' => [ 'data-tiered-pricing-premium-option' => 'yes' ]
52 ),
53
54 array(
55 'title' => __( 'Cart upsell template', 'tier-pricing-table' ),
56 'id' => Settings::SETTINGS_PREFIX . 'cart_upsell_template',
57 'type' => TPTTextTemplate::FIELD_TYPE,
58 'placeholders' => array(
59 'tp_required_quantity',
60 'tp_next_price',
61 'tp_next_discount',
62 'tp_actual_discount',
63 ),
64 'default' => __( 'Buy <b>{tp_required_quantity}</b> more to get <b>{tp_next_price}</b> each', 'tier-pricing-table' ),
65 'desc_tip' => false,
66 'custom_attributes' => [ 'data-tiered-pricing-premium-option' => 'yes' ]
67 ),
68
69 array(
70 'title' => __( 'Cart upsell color', 'tier-pricing-table' ),
71 'id' => Settings::SETTINGS_PREFIX . 'cart_upsell_color',
72 'type' => 'color',
73 'default' => '#96598A',
74 'css' => 'width:6em;',
75 'desc_tip' => false,
76 'custom_attributes' => [ 'data-tiered-pricing-premium-option' => 'yes' ]
77 ),
78 );
79 }
80 }