Changeset 2314038
- Timestamp:
- 05/28/2020 09:28:43 PM (6 years ago)
- Location:
- zsquared-connector-for-zoho-crm
- Files:
-
- 10 edited
-
tags/1.0/README.txt (modified) (1 diff)
-
tags/1.0/include/ZsqConnectorOptions.php (modified) (2 diffs)
-
tags/1.0/templates/options.php (modified) (3 diffs)
-
tags/1.0/templates/scripts.php (modified) (1 diff)
-
tags/1.0/zsq-connector-crm.php (modified) (1 diff)
-
trunk/README.txt (modified) (1 diff)
-
trunk/include/ZsqConnectorOptions.php (modified) (2 diffs)
-
trunk/templates/options.php (modified) (3 diffs)
-
trunk/templates/scripts.php (modified) (1 diff)
-
trunk/zsq-connector-crm.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
zsquared-connector-for-zoho-crm/tags/1.0/README.txt
r2303034 r2314038 16 16 Features include: 17 17 18 * Populate WooCommerce store with items from Zoho CRM Inventory19 * Synchronize Inventoryand Woocommerce products and available quantities18 * Populate WooCommerce store with items from Zoho CRM 19 * Synchronize CRM and Woocommerce products and available quantities 20 20 * Field Mapping of taxation to Zoho CRM defined taxation product (see manual) 21 21 * Send store transaction alerts to your Slack Channel -
zsquared-connector-for-zoho-crm/tags/1.0/include/ZsqConnectorOptions.php
r2310375 r2314038 48 48 $check = zsq_crm_sync_order($order_number, '', $this->hook_trigger); 49 49 if(false === $check) { 50 echo "<div class=\"notice notice-error is-dismissible\"><p>Order replay failed. Please see Slack output for details.</p></div>";50 echo "<div class=\"notice notice-error is-dismissible\"><p>Order replay failed. Please see Slack output or error output for details.</p></div>"; 51 51 } 52 52 else if(true === $check) { 53 echo "<div class=\"notice notice-success is-dismissible\"><p>Order replay succeeded.</p></div>";53 echo "<div class=\"notice notice-success is-dismissible\"><p>Order replay accepted. ZSquared will now attempt to transfer the order into Zoho CRM again. Please check your email for any error reports.</p></div>"; 54 54 } 55 55 else if(is_null($check)) { … … 240 240 array('sslverify' => FALSE)); 241 241 if(is_a($response, WP_Error::class)) { 242 echo "ERROR: " . $response->get_error_message();243 die;242 ZsqSlackNotifications::send('Error on taxes API call: '.$response->get_error_message()); 243 return []; 244 244 } 245 245 $output = json_decode($response['body'], true); 246 if (isset($output['data']['taxes']) && !empty($output['data']['taxes'])) {246 if (isset($output['data']['taxes']) && is_array($output['data']['taxes'])) { 247 247 return $output['data']['taxes']; 248 248 } -
zsquared-connector-for-zoho-crm/tags/1.0/templates/options.php
r2305894 r2314038 57 57 </form> 58 58 <div class="zspl-sync-settings"> 59 <h2>Add/change InventoryItems (Optional)</h2>60 <p>Use the button below to add/update all products from zoho inventoryto woocommerce.</p>59 <h2>Add/change CRM Items (Optional)</h2> 60 <p>Use the button below to add/update all products from Zoho CRM to woocommerce.</p> 61 61 <p><strong> 62 62 Note: Products will be created if their SKU is not already assigned to an existing Woocommerce Product; … … 77 77 <h2>Replay order submission</h2> 78 78 <p>Sometimes an order may not make it into Zoho for a variety of reasons. When this happens, you can replay the order submission to try again.</p> 79 <p>Enter the woocommerce sales order number to attempt to send it again to zoho inventory, regardless of status.</p>79 <p>Enter the woocommerce sales order number to attempt to send it again to Zoho CRM</p> 80 80 <form method="post" action="options-general.php?page=zsq_crm.php&replay=1&show=replay"> 81 81 <table class="form-table"> … … 102 102 <h2>Tax Information Mapping</h2> 103 103 <?php if(empty($woo_taxes)) : ?> 104 <p>No Woocommerce taxes found; sales orders will be transferred to Zoho CRM without any tax information applied.</p>104 <p>No Woocommerce or Zoho tax settings found; sales orders will be transferred to Zoho CRM without any tax information applied.</p> 105 105 <?php elseif(!empty($woo_taxes) && empty($ex_taxes)) : ?> 106 106 <p>Woocommerce tax settings detected but no Zoho CRM taxes detected. Please check your tax settings in Zoho CRM, and confirm that your ZSquared API key has been added here. If you have set your taxes in Woocommerce and Zoho CRM and you still see this message, please contact the ZSquared team.</p> -
zsquared-connector-for-zoho-crm/tags/1.0/templates/scripts.php
r2305894 r2314038 22 22 }, 10000); 23 23 } 24 }, 25 error: function(error) { 26 $("#zsq_crm_manual_sync_message").text("ERROR: "+error); 24 27 } 25 28 }); -
zsquared-connector-for-zoho-crm/tags/1.0/zsq-connector-crm.php
r2305894 r2314038 56 56 } 57 57 $order = wc_get_order($order_id); 58 if($order == false) { 59 return "Order $order_id not found"; 60 } 58 61 $obj = new \PCIS\ZSquared\CRM\ZsqOrderSync($order); 59 62 if(!$obj->getState()) { -
zsquared-connector-for-zoho-crm/trunk/README.txt
r2303034 r2314038 16 16 Features include: 17 17 18 * Populate WooCommerce store with items from Zoho CRM Inventory19 * Synchronize Inventoryand Woocommerce products and available quantities18 * Populate WooCommerce store with items from Zoho CRM 19 * Synchronize CRM and Woocommerce products and available quantities 20 20 * Field Mapping of taxation to Zoho CRM defined taxation product (see manual) 21 21 * Send store transaction alerts to your Slack Channel -
zsquared-connector-for-zoho-crm/trunk/include/ZsqConnectorOptions.php
r2310375 r2314038 48 48 $check = zsq_crm_sync_order($order_number, '', $this->hook_trigger); 49 49 if(false === $check) { 50 echo "<div class=\"notice notice-error is-dismissible\"><p>Order replay failed. Please see Slack output for details.</p></div>";50 echo "<div class=\"notice notice-error is-dismissible\"><p>Order replay failed. Please see Slack output or error output for details.</p></div>"; 51 51 } 52 52 else if(true === $check) { 53 echo "<div class=\"notice notice-success is-dismissible\"><p>Order replay succeeded.</p></div>";53 echo "<div class=\"notice notice-success is-dismissible\"><p>Order replay accepted. ZSquared will now attempt to transfer the order into Zoho CRM again. Please check your email for any error reports.</p></div>"; 54 54 } 55 55 else if(is_null($check)) { … … 240 240 array('sslverify' => FALSE)); 241 241 if(is_a($response, WP_Error::class)) { 242 echo "ERROR: " . $response->get_error_message();243 die;242 ZsqSlackNotifications::send('Error on taxes API call: '.$response->get_error_message()); 243 return []; 244 244 } 245 245 $output = json_decode($response['body'], true); 246 if (isset($output['data']['taxes']) && !empty($output['data']['taxes'])) {246 if (isset($output['data']['taxes']) && is_array($output['data']['taxes'])) { 247 247 return $output['data']['taxes']; 248 248 } -
zsquared-connector-for-zoho-crm/trunk/templates/options.php
r2305894 r2314038 57 57 </form> 58 58 <div class="zspl-sync-settings"> 59 <h2>Add/change InventoryItems (Optional)</h2>60 <p>Use the button below to add/update all products from zoho inventoryto woocommerce.</p>59 <h2>Add/change CRM Items (Optional)</h2> 60 <p>Use the button below to add/update all products from Zoho CRM to woocommerce.</p> 61 61 <p><strong> 62 62 Note: Products will be created if their SKU is not already assigned to an existing Woocommerce Product; … … 77 77 <h2>Replay order submission</h2> 78 78 <p>Sometimes an order may not make it into Zoho for a variety of reasons. When this happens, you can replay the order submission to try again.</p> 79 <p>Enter the woocommerce sales order number to attempt to send it again to zoho inventory, regardless of status.</p>79 <p>Enter the woocommerce sales order number to attempt to send it again to Zoho CRM</p> 80 80 <form method="post" action="options-general.php?page=zsq_crm.php&replay=1&show=replay"> 81 81 <table class="form-table"> … … 102 102 <h2>Tax Information Mapping</h2> 103 103 <?php if(empty($woo_taxes)) : ?> 104 <p>No Woocommerce taxes found; sales orders will be transferred to Zoho CRM without any tax information applied.</p>104 <p>No Woocommerce or Zoho tax settings found; sales orders will be transferred to Zoho CRM without any tax information applied.</p> 105 105 <?php elseif(!empty($woo_taxes) && empty($ex_taxes)) : ?> 106 106 <p>Woocommerce tax settings detected but no Zoho CRM taxes detected. Please check your tax settings in Zoho CRM, and confirm that your ZSquared API key has been added here. If you have set your taxes in Woocommerce and Zoho CRM and you still see this message, please contact the ZSquared team.</p> -
zsquared-connector-for-zoho-crm/trunk/templates/scripts.php
r2305894 r2314038 22 22 }, 10000); 23 23 } 24 }, 25 error: function(error) { 26 $("#zsq_crm_manual_sync_message").text("ERROR: "+error); 24 27 } 25 28 }); -
zsquared-connector-for-zoho-crm/trunk/zsq-connector-crm.php
r2305894 r2314038 56 56 } 57 57 $order = wc_get_order($order_id); 58 if($order == false) { 59 return "Order $order_id not found"; 60 } 58 61 $obj = new \PCIS\ZSquared\CRM\ZsqOrderSync($order); 59 62 if(!$obj->getState()) {
Note: See TracChangeset
for help on using the changeset viewer.