Skip to content

Commit

Permalink
skip processing updates from contact form for now
Browse files Browse the repository at this point in the history
use order details for account
  • Loading branch information
dgtlmoon committed Sep 5, 2012
1 parent 522a9ad commit cff01cd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions uc_ascent_salesforce.module
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ function uc_ascent_salesforce_cron() {
}
}

function uc_ascent_connect($skip_cron_check = FALSE) {
function uc_ascent_connect() {
// skip or not
if (variable_get('uc_ascent_salesforce_run_cron', FALSE) == FALSE && $skip_cron_check == FALSE) {
if (variable_get('uc_ascent_salesforce_run_cron', FALSE) == FALSE) {
watchdog('salesforceascent', t('Cron run skipped because we werent enabled to run.'));
return FALSE;
}
Expand Down Expand Up @@ -202,6 +202,10 @@ function uc_ascent_salesforce_process_jobs($sf, $parent = 0) {
}

while ($row = db_fetch_array($db_result)) {
// temp fix, skip things from the contact form
if(stristr($row['extra_data'],"Added from contact form")) {
continue;
}
$order = uc_order_load($row['order_id']);
$time_start = time();
$request = "";
Expand All @@ -220,8 +224,8 @@ function uc_ascent_salesforce_process_jobs($sf, $parent = 0) {
, $info['deliveryEmail']
, $info['billingEmail']
, $info['description']
, $info['billingPhone']
, $info['deliveryPhone'])
, $order->billing_phone
, $order->delivery_phone)
) {
$info = $info + $result;
// record the status and set the flag as 1 = processed
Expand Down

0 comments on commit cff01cd

Please sign in to comment.