$user_focus->retrieve_entity_info($smcreatorid, "Users"); foreach ($user_focus->column_fields as $key => $value) { $upperKey = "CREATOR_" . strtoupper($key); ${$upperKey} = $value; } $CREATOR_MOBILE = $user_focus->column_fields["phone_mobile"]; $CREATOR_NAME = $user_focus->column_fields["last_name"]; $CREATOR_EMAIL = $user_focus->column_fields["email1"]; } else { $CREATOR_NAME = ""; $CREATOR_EMAIL = ""; $CREATOR_OBILE = ""; } $focus->id = $focus->column_fields["record_id"]; if (isset($module_enable_product) && $module_enable_product) { $associated_products = getAssociatedProducts_NoPrice("Memdays", $focus); $num_products = count($associated_products); //This is to get all prodcut details as row basis for ($i = 1, $j = $i - 1; $i <= $num_products; $i++, $j++) { $product_name[$i] = $associated_products[$i]['productName' . $i]; $imagename[$i] = $associated_products[$i]['imagename' . $i]; $prod_description[$i] = $associated_products[$i]['comment' . $i]; $product_id[$i] = $associated_products[$i]['hdnProductId' . $i]; $qty[$i] = ec_number_format($associated_products[$i]['qty' . $i]); $unit_price[$i] = ec_number_format($associated_products[$i]['unitPrice' . $i]); $list_price[$i] = ec_number_format($associated_products[$i]['listPrice' . $i]); $list_pricet[$i] = $associated_products[$i]['listPrice' . $i]; $usageunit[$i] = $associated_products[$i]['usageunit' . $i]; $serial_no[$i] = $associated_products[$i]['serial_no' . $i]; $productcode[$i] = $associated_products[$i]['productcode' . $i]; $producttotal = $qty[$i] * $list_pricet[$i];
$user_focus->retrieve_entity_info($smcreatorid, "Users"); foreach ($user_focus->column_fields as $key => $value) { $upperKey = "CREATOR_" . strtoupper($key); ${$upperKey} = $value; } $CREATOR_MOBILE = $user_focus->column_fields["phone_mobile"]; $CREATOR_NAME = $user_focus->column_fields["last_name"]; $CREATOR_EMAIL = $user_focus->column_fields["email1"]; } else { $CREATOR_NAME = ""; $CREATOR_EMAIL = ""; $CREATOR_OBILE = ""; } $focus->id = $focus->column_fields["record_id"]; if (isset($module_enable_product) && $module_enable_product) { $associated_products = getAssociatedProducts_NoPrice("Contacts", $focus); $num_products = count($associated_products); //This is to get all prodcut details as row basis for ($i = 1, $j = $i - 1; $i <= $num_products; $i++, $j++) { $product_name[$i] = $associated_products[$i]['productName' . $i]; $imagename[$i] = $associated_products[$i]['imagename' . $i]; $prod_description[$i] = $associated_products[$i]['comment' . $i]; $product_id[$i] = $associated_products[$i]['hdnProductId' . $i]; $qty[$i] = ec_number_format($associated_products[$i]['qty' . $i]); $unit_price[$i] = ec_number_format($associated_products[$i]['unitPrice' . $i]); $list_price[$i] = ec_number_format($associated_products[$i]['listPrice' . $i]); $list_pricet[$i] = $associated_products[$i]['listPrice' . $i]; $usageunit[$i] = $associated_products[$i]['usageunit' . $i]; $serial_no[$i] = $associated_products[$i]['serial_no' . $i]; $productcode[$i] = $associated_products[$i]['productcode' . $i]; $producttotal = $qty[$i] * $list_pricet[$i];