PluginProbe ʕ •ᴥ•ʔ
PiWeb Product Enquiry or product catalog for WooCommerce / 2.2.33.34
PiWeb Product Enquiry or product catalog for WooCommerce v2.2.33.34
2.2.34.43 2.2.34.42 2.2.34.41 2.2.34.40 2.2.34.39 trunk 2.2.22 2.2.26 2.2.33.16 2.2.33.17 2.2.33.19 2.2.33.20 2.2.33.21 2.2.33.22 2.2.33.23 2.2.33.24 2.2.33.26 2.2.33.27 2.2.33.29 2.2.33.30 2.2.33.31 2.2.33.32 2.2.33.33 2.2.33.34 2.2.33.36 2.2.33.37 2.2.33.39 2.2.33.40 2.2.33.41 2.2.33.42 2.2.33.43 2.2.33.44 2.2.33.46 2.2.33.47 2.2.33.49 2.2.34.0 2.2.34.1 2.2.34.10 2.2.34.11 2.2.34.12 2.2.34.13 2.2.34.14 2.2.34.16 2.2.34.17 2.2.34.19 2.2.34.2 2.2.34.20 2.2.34.21 2.2.34.22 2.2.34.23 2.2.34.24 2.2.34.26 2.2.34.27 2.2.34.29 2.2.34.3 2.2.34.30 2.2.34.31 2.2.34.32 2.2.34.33 2.2.34.34 2.2.34.36 2.2.34.37 2.2.34.4 2.2.34.6 2.2.34.7 2.2.34.9
enquiry-quotation-for-woocommerce / admin / class-eqw-email.php
enquiry-quotation-for-woocommerce / admin Last commit date
css 1 year ago img 1 year ago js 1 year ago partials 1 year ago class-eqw-advance.php 1 year ago class-eqw-cart.php 1 year ago class-eqw-email.php 1 year ago class-eqw-enquiry.php 1 year ago class-eqw-form-control.php 1 year ago class-eqw-menu.php 1 year ago class-eqw-option.php 1 year ago class-eqw-product-options.php 1 year ago class-pisol-enquiry-quotation-woocommerce-admin.php 1 year ago index.php 1 year ago plugins.php 1 year ago
class-eqw-email.php
121 lines
1 <?php
2
3 class Class_Pi_Eqw_Email{
4
5 public $plugin_name;
6
7 private $settings = array();
8
9 private $active_tab;
10
11 private $this_tab = 'email';
12
13 private $tab_name = "Email setting";
14
15 private $setting_key = 'pi_eqw_email_setting';
16
17 public $tab;
18
19
20 function __construct($plugin_name){
21 $this->plugin_name = $plugin_name;
22
23 $this->settings = array(
24
25
26 array('field'=>'pi_eqw_email', 'label'=>__('Email id','pisol-enquiry-quotation-woocommerce'),'type'=>'text', 'desc'=>__('Email id that will receive the enquiry, <strong class="text-danger">In PRO version you can add multiple email separated with coma like this text@email.com, text2@email.com </strong>','pisol-enquiry-quotation-woocommerce'),'default'=> get_option('admin_email')),
27
28 array('field'=>'pi_eqw_email_subject', 'label'=>__('Subject of the email','pisol-enquiry-quotation-woocommerce'),'type'=>'text', 'default'=>__('New enquiry received'), 'desc'=>__('subject of the email', 'pisol-enquiry-quotation-woocommerce')),
29
30 array('field'=>'pi_eqw_show_message_as_row', 'label'=>__('Show product message as row in email','pisol-enquiry-quotation-woocommerce'),'type'=>'switch','default'=> 1, 'desc'=>__('Show message as row in the email else it will be shown as a columns in the product row','pisol-enquiry-quotation-woocommerce')),
31
32 array('field'=>'pi_eqw_email_template', 'label'=>__('Use WooCommerce email template','pisol-enquiry-quotation-woocommerce'),'type'=>'switch','default'=> 1, 'desc'=>__('Use Woocommerce email template all the colors will be as per woocommerce email template ','pisol-enquiry-quotation-woocommerce')),
33
34 array('field'=>'pi_enq_add_img_url', 'label'=>__('Enable this option If product and logo image are not shown in the email or You dont want image attached in email','pisol-enquiry-quotation-woocommerce'),'type'=>'switch','default'=>0, 'desc'=>__('Enable this option only if you are having issue in seeing image inside the enquiry email or You dont want image to be send as attachment in the email','pisol-enquiry-quotation-woocommerce')),
35
36 array('field'=>'pi_eqw_email_to_customer', 'label'=>__('Send enquiry email to customer as well','pisol-enquiry-quotation-woocommerce'),'type'=>'switch','default'=>1, 'desc'=>__('Will send the enquiry email copy to customer as well','pisol-enquiry-quotation-woocommerce'), 'pro'=>true),
37
38 array('field'=>'pi_eqw_customer_email_subject', 'label'=>__('Subject of the email to customer','pisol-enquiry-quotation-woocommerce'),'type'=>'text', 'default'=>__('Your enquiry is submitted'), 'desc'=>__('Subject of the enquiry email send to customer', 'pisol-enquiry-quotation-woocommerce'), 'pro'=>true),
39 array('field'=>'pi_eqw_company_logo', 'label'=>__('Logo added in the email','pisol-enquiry-quotation-woocommerce'),'type'=>'image', 'desc'=>__('This is the image that will be added inside the email copy, sed to you and the customer', 'pisol-enquiry-quotation-woocommerce'),'pro'=>true),
40
41 array('field'=>'title', 'class'=> 'hide-pro bg-primary text-light', 'class_title'=>'text-light font-weight-light h4', 'label'=>__('Custom message for customer email', 'pisol-enquiry-quotation-woocommerce'), 'type'=>'setting_category'),
42
43 array('field'=>'pi_eqw_customer_email_above_product_table', 'label'=>__('Above product table','pisol-enquiry-quotation-woocommerce'),'type'=>'textarea', 'default'=>"", 'desc'=>__('This message will appear above the product table','pisol-enquiry-quotation-woocommerce'),'pro'=>true),
44
45 array('field'=>'pi_eqw_customer_email_below_product_table', 'label'=>__('Below product table','pisol-enquiry-quotation-woocommerce'),'type'=>'textarea', 'default'=>"", 'desc'=>__('This message will appear below the product table','pisol-enquiry-quotation-woocommerce'),'pro'=>true),
46
47 array('field'=>'pi_eqw_customer_email_below_customer_detail', 'label'=>__('Below customer detail','pisol-enquiry-quotation-woocommerce'),'type'=>'textarea', 'default'=>"", 'desc'=>__('This message will appear below the customer detail table','pisol-enquiry-quotation-woocommerce'),'pro'=>true),
48
49 array('field'=>'title', 'class'=> 'hide-pro bg-primary text-light', 'class_title'=>'text-light font-weight-light h4', 'label'=>__('Custom message for admin email', 'pisol-enquiry-quotation-woocommerce'), 'type'=>'setting_category'),
50
51 array('field'=>'pi_eqw_admin_email_above_product_table', 'label'=>__('Above product table','pisol-enquiry-quotation-woocommerce'),'type'=>'textarea', 'default'=>"", 'desc'=>__('This message will appear above the product table','pisol-enquiry-quotation-woocommerce'),'pro'=>true),
52
53 array('field'=>'pi_eqw_admin_email_below_product_table', 'label'=>__('Below product table','pisol-enquiry-quotation-woocommerce'),'type'=>'textarea', 'default'=>"", 'desc'=>__('This message will appear below the product table','pisol-enquiry-quotation-woocommerce'),'pro'=>true),
54
55 array('field'=>'pi_eqw_admin_email_below_customer_detail', 'label'=>__('Below customer detail','pisol-enquiry-quotation-woocommerce'),'type'=>'textarea', 'default'=>"", 'desc'=>__('This message will appear below the customer detail table','pisol-enquiry-quotation-woocommerce'),'pro'=>true)
56
57
58 );
59
60 $this->tab = sanitize_text_field(filter_input( INPUT_GET, 'tab'));
61 $this->active_tab = $this->tab != "" ? $this->tab : 'default';
62
63 if($this->this_tab == $this->active_tab){
64 add_action($this->plugin_name.'_tab_content', array($this,'tab_content'));
65 }
66
67
68 add_action($this->plugin_name.'_tab', array($this,'tab'),3);
69
70
71 $this->register_settings();
72
73 if(PI_EQW_DELETE_SETTING){
74 $this->delete_settings();
75 }
76
77
78 }
79
80
81 function delete_settings(){
82 foreach($this->settings as $setting){
83 delete_option( $setting['field'] );
84 }
85 }
86
87 function register_settings(){
88
89 foreach($this->settings as $setting){
90 register_setting( $this->setting_key, $setting['field']);
91 }
92
93 }
94
95 function tab(){
96 $page = sanitize_text_field(filter_input( INPUT_GET, 'page'));
97 $this->tab_name = __('Email setting','pisol-enquiry-quotation-woocommerce');
98 ?>
99 <a class=" px-3 text-light d-flex align-items-center border-left border-right <?php echo ($this->active_tab == $this->this_tab ? 'bg-primary' : 'bg-secondary'); ?>" href="<?php echo esc_url( admin_url( 'admin.php?page='.$page.'&tab='.$this->this_tab ) ); ?>">
100 <?php echo esc_html( $this->tab_name); ?>
101 </a>
102 <?php
103 }
104
105 function tab_content(){
106 ?>
107 <form method="post" action="options.php" class="pisol-setting-form">
108 <?php settings_fields( $this->setting_key ); ?>
109 <?php
110 foreach($this->settings as $setting){
111 new pisol_class_form_eqw($setting, $this->setting_key);
112 }
113 ?>
114 <input type="submit" class="mt-3 btn btn-primary btn-sm" value="Save Option" />
115 </form>
116 <?php
117 }
118
119 }
120
121