Changeset 1791771
- Timestamp:
- 12/23/2017 07:37:32 PM (8 years ago)
- Location:
- eewee-sellsy/trunk
- Files:
-
- 13 edited
-
changelog (modified) (1 diff)
-
controllers/CookieController.php (modified) (1 diff)
-
controllers/InstallController.php (modified) (1 diff)
-
controllers/SellsyCustomFieldsController.php (modified) (1 diff)
-
controllers/ShortcodeController.php (modified) (2 diffs)
-
forms/FContactFormEdit.php (modified) (2 diffs)
-
helpers/dbUpdate.php (modified) (1 diff)
-
index.php (modified) (4 diffs)
-
models/TContactForm.php (modified) (3 diffs)
-
models/TSellsyOpportunities.php (modified) (2 diffs)
-
readme.md (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
view/manuel.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
eewee-sellsy/trunk/changelog
r1790856 r1791771 1 = 1.11 = 2 * Add deadline on opportunity 3 1 4 = 1.1 = 2 * Create table version 5 * Create table version and update version auto 3 6 4 7 = 1.0.14 = -
eewee-sellsy/trunk/controllers/CookieController.php
r1790856 r1791771 46 46 public function get() 47 47 { 48 if (!isset($_COOKIE[$this->_name])) { return false; } 49 48 50 $cookie = stripslashes($_COOKIE[$this->_name]); 49 50 if (!isset($cookie)) { return false; }51 51 52 52 // check cookie isn't json, delete -
eewee-sellsy/trunk/controllers/InstallController.php
r1790856 r1791771 98 98 `contact_form_setting_opportunity_step` int(11) NOT NULL, 99 99 `contact_form_setting_notification_email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 100 `contact_form_setting_deadline` int(11) NOT NULL DEFAULT '30', 100 101 101 102 `contact_form_company_name` int(11) NOT NULL, -
eewee-sellsy/trunk/controllers/SellsyCustomFieldsController.php
r1789048 r1791771 219 219 } 220 220 221 222 221 }//fin class 223 222 }//fin if -
eewee-sellsy/trunk/controllers/ShortcodeController.php
r1791694 r1791771 503 503 'funnelid' => $contact[0]->contact_form_setting_opportunity_pipeline, 504 504 'stepid' => $contact[0]->contact_form_setting_opportunity_step, 505 'stickyNote'=> $api_opportunity['stickyNote'] 505 'deadline' => $contact[0]->contact_form_setting_deadline, 506 'stickyNote'=> $api_opportunity['stickyNote'], 506 507 )); 507 508 // API : success … … 653 654 } elseif (isset($api_third['web']) && !empty($api_third['web'])) { 654 655 $contact_form_website = $api_third['web']; 655 } 656 } else { 657 $contact_form_website = ""; 658 } 656 659 657 660 $render .= ' -
eewee-sellsy/trunk/forms/FContactFormEdit.php
r1790856 r1791771 147 147 $t_opportunities = new models\TSellsyOpportunities(); 148 148 $responseOppFun = $t_opportunities->getFunnels(); 149 if (isset($responseOppFun->response) && !empty($responseOppFun->response)) {149 if (isset($responseOppFun->response) && !empty($responseOppFun->response)) { 150 150 foreach ( $responseOppFun->response as $vOppFun ) { 151 151 if ( isset( $vOppFun->status ) && $vOppFun->status == 'ok' ) { … … 197 197 </td> 198 198 </tr> 199 <tr> 200 <th> 201 <?php _e('Deadline (in days)', PLUGIN_NOM_LANG); ?> : 202 </th> 203 <td> 204 <?php 205 // DEADLINE 206 echo ' 207 <input name="contact_form_setting_deadline" id="contact_form_setting_deadline" value="'.$contactForm[0]->contact_form_setting_deadline.'"> 208 <p class="description">'.__('Only if you use the option "add prospect and opportunity"', PLUGIN_NOM_LANG).'</p>'; 209 ?> 210 </td> 211 </tr> 199 212 200 213 -
eewee-sellsy/trunk/helpers/dbUpdate.php
r1790856 r1791771 73 73 $this->updateVersion("1.1"); 74 74 75 //$table_name = EEWEE_SELLSY_PREFIXE_BDD . 'version'; 76 //$sql = "ALTER TABLE `".$table_name."` ADD `test` VARCHAR(255) NOT NULL AFTER `version_value`"; 77 //$wpdb->query($sql); 75 $table_name = EEWEE_SELLSY_PREFIXE_BDD . 'contact_form'; 76 $sql = "ALTER TABLE `".$table_name."` ADD ` contact_form_setting_deadline` INT(11) NOT NULL DEFAULT '30' AFTER `contact_form_setting_notification_email`; 77 "; 78 $wpdb->query($sql); 78 79 } 79 80 -
eewee-sellsy/trunk/index.php
r1790856 r1791771 4 4 Plugin URI: http://www.eewee.fr 5 5 Description: Simple form for : add support ticket to Sellsy, add prospect to Sellsy. 6 Version: 1.1 6 Version: 1.11 7 7 Author: Michael DUMONTET 8 8 Author URI: http://www.eewee.fr/wordpress/ … … 19 19 */ 20 20 global $wpdb; 21 define( 'EEWEE_VERSION', '1.1 ' );21 define( 'EEWEE_VERSION', '1.11' ); 22 22 define( 'EEWEE_SELLSY_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) ); 23 23 define( 'EEWEE_SELLSY_PLUGIN_URL', WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) ); … … 102 102 103 103 use fr\eewee\eewee_sellsy\controllers; 104 use fr\eewee\eewee_sellsy\helpers; 104 105 105 106 $s = new controllers\ShortcodeController(); … … 107 108 108 109 // UPDATE DB 109 use fr\eewee\eewee_sellsy\helpers; 110 $dbUpdate = new helpers\DbUpdate(); 111 $dbVersion = $dbUpdate->getVersion(); 112 if (EEWEE_VERSION > $dbVersion) { $dbUpdate->updateDb($dbVersion); } 110 if (is_admin()) { 111 $dbUpdate = new helpers\DbUpdate(); 112 $dbVersion = $dbUpdate->getVersion(); 113 if (EEWEE_VERSION > $dbVersion) { $dbUpdate->updateDb($dbVersion); } 114 } 113 115 114 116 /** -
eewee-sellsy/trunk/models/TContactForm.php
r1787929 r1791771 78 78 $contact_form_setting_opportunity_pipeline = (int)$p['contact_form_setting_opportunity_pipeline']; 79 79 $contact_form_setting_opportunity_step = (int)$p['contact_form_setting_opportunity_step']; 80 $contact_form_custom_fields_quantity = (int)$p['contact_form_custom_fields_quantity']; 81 $contact_form_custom_fields_value = array(); 82 for ($i=0; $i<$contact_form_custom_fields_quantity; $i++) { 83 $contact_form_custom_fields_value[] = (int)$p['contact_form_custom_fields_value_'.$i]; 80 $contact_form_custom_fields_quantity = 0; 81 $contact_form_custom_fields_value_json = ""; 82 83 if (isset($p['contact_form_custom_fields_quantity']) && !empty($p['contact_form_custom_fields_quantity'])) { 84 $contact_form_custom_fields_quantity = (int)$p['contact_form_custom_fields_quantity']; 85 $contact_form_custom_fields_value = array(); 86 for ($i=0; $i<$contact_form_custom_fields_quantity; $i++) { 87 $contact_form_custom_fields_value[] = (int)$p['contact_form_custom_fields_value_'.$i]; 88 } 89 $contact_form_custom_fields_value_json = json_encode($contact_form_custom_fields_value, JSON_FORCE_OBJECT); 84 90 } 85 $contact_form_custom_fields_value_json = json_encode($contact_form_custom_fields_value, JSON_FORCE_OBJECT);86 91 87 92 $r = $wpdb->update( … … 98 103 'contact_form_setting_opportunity_step' => $contact_form_setting_opportunity_step, 99 104 'contact_form_setting_notification_email' => $p['contact_form_setting_notification_email'], 105 'contact_form_setting_deadline' => $p['contact_form_setting_deadline'], 100 106 101 107 'contact_form_company_name' => $p['contact_form_company_name'], … … 133 139 '%d', 134 140 '%s', 141 '%d', 135 142 136 143 '%d', -
eewee-sellsy/trunk/models/TSellsyOpportunities.php
r1787929 r1791771 93 93 $funnelid = (int)$d['funnelid']; 94 94 $stepid = (int)$d['stepid']; 95 $deadline = (int)$d['deadline']; 95 96 $stickyNote = (string)$d['stickyNote']; 96 97 $currentIdent = $this->getCurrentIdent(); … … 104 105 'ident' => $currentIdent->response, 105 106 'sourceid' => $sourceid, 106 'dueDate' => strtotime('+ 1 month'), // @todo : BO custom - Ex : 1 week, 1 month107 'dueDate' => strtotime('+'.$deadline.' day'), 107 108 //'creationDate' => {{creationDate}}, 108 109 'name' => $name, // @todo : BO custom -
eewee-sellsy/trunk/readme.md
r1790856 r1791771 4 4 2. Add a contact form shortcode (Wordpress > Sellsy prospect). 5 5 3. Add a contact form shortcode (Wordpress > Sellsy prospect and opportunity). 6 4. Tracking page views 7 5. You can use the Sellsy custom fields 6 8 7 9 Form with captcha -
eewee-sellsy/trunk/readme.txt
r1790856 r1791771 54 54 == Changelog == 55 55 56 = 1.11 = 57 * Add deadline on opportunity 58 56 59 = 1.1 = 57 * Create table version 60 * Create table version and update auto sql 58 61 59 62 = 1.0.14 = -
eewee-sellsy/trunk/view/manuel.php
r1787929 r1791771 55 55 echo '<u>'.__('Default setting', PLUGIN_NOM_LANG).' : </u><br> 56 56 - '.__('Prospect', PLUGIN_NOM_LANG).'<br> 57 - '.__('Deadline: + 1 month', PLUGIN_NOM_LANG).'<br>57 - '.__('Deadline: +30 days', PLUGIN_NOM_LANG).'<br> 58 58 - '.__('Name: website', PLUGIN_NOM_LANG).'<br> 59 59 - '.__('Probability: 10%', PLUGIN_NOM_LANG).'<br>
Note: See TracChangeset
for help on using the changeset viewer.