Order Details

[insert_php]
$order_from = $_GET[‘of’];
if($order_from == ‘dash’){
$order_type = $_GET[‘ot’];
if($order_type == ‘quote’) {
print ‘

‘;
print ‘

Thanks for getting in touch with us. We\’ll get back to you within 1 business day.

‘;
print ‘

‘;
}
else if($order_type == ‘service’) {
$client_email = $_GET[‘ce’];
print ‘

‘;
print ‘

Thanks for placing your order with us.

‘;
print ‘

Please login (login details sent to email ‘.$client_email.’) to track your order.

‘;
print ‘

‘;
}
}
else {
$_SESSION[‘order’]= $_POST;
$transaction_charge= 4;
$order_type= $_POST[‘order_type’];
$service_option= $_POST[‘service_option’];
$service_custom= $_POST[‘service_text’];
$other_service= $_POST[‘other_service’];
$quality_option= $_POST[‘quality_option’];
$quality_option_media= $_POST[‘quality_option_media’];
$quality_option_whitepaper= $_POST[‘quality_option_whitepaper’];
$wordcount_per_piece= $_POST[‘wordcount_per_piece’];
$number_of_pages= $_POST[‘number_of_pages’];
$number_of_months= $_POST[‘number_of_months’];
$package= $_POST[‘package’];
$total_quantity= $_POST[‘quantity’];
$delivery_time= $_POST[‘delivery_time’];
$amount= $_POST[‘hidden_amount’];
$amount_int= $_POST[‘hidden_del_amount_int’];
$email= $_POST[’email’];
$name= $_POST[‘username’];
$phone= $_POST[‘phone’];
$message= $_POST[‘message’];
$time= $_POST[‘time’];
$GLOBALS[‘service’]= array(
‘article’ => ‘Article Writing’,
‘blog’ => ‘Blog Writing’,
‘copy’ => ‘Copywriting’,
‘ebook’ => ‘eBook Writing’,
‘social’ => ‘Social Media Management’,
‘whitepaper’ => ‘Whitepaper’,
‘other’ => array (
‘resume’ => ‘Resume Writing’,
‘letter’ => ‘Letter / Application Writing’,
‘seo’ => ‘Search Engine optimization’,
‘business’ => ‘Business Writing’,
‘technical’ => ‘Technical Writing’,
),
);

$GLOBALS[‘quality’]= array(
‘elite’ => ‘Elite (by our best writers, edited for top quality, unlimited free revisions for 2 weeks)’,
‘premium’ => ‘Premium (by senior writers, unlimited free revisions for 1 week)’,
‘standard’ => ‘Standard (by writers with years of experience in the niche)’,
‘basic’ => ‘Basic (by junior writers)’,
);

$GLOBALS[‘quality_media’]= array(
‘elite’ => ‘Mid level (Mon-Fri 2 posts/day)’,
‘premium’ => ‘Starter (Mon-Fri 1 post/day)’,
);

$GLOBALS[‘quality_whitepaper’]= array(
‘elite’ => ‘4 page whitepaper’,
‘premium’ => ‘2 page whitepaper ‘,
);

$GLOBALS[‘wordcount’]= array(
‘article’ => ‘Number of Words/Article:’,
‘blog’ => ‘Number of Words/Post:’,
‘copy’ => ‘Number of Words/Copy:’,
‘ebook’ => ‘Number of Words/Page:’,
);

$GLOBALS[‘quantity’]= array(
‘article’ => ‘Number of Articles:’,
‘blog’ => ‘Number of Posts/Week:’,
‘copy’ => ‘Number of Pages:’,
‘ebook’ => ‘Number of eBooks:’,
‘whitepaper’ => ‘Number of Whitepapers:’,
);

print ‘

‘;
$out= ”;
$details= ”;

if(in_array($_POST[‘service_option’], array(‘article’, ‘blog’, ‘copy’, ‘ebook’, ‘social’, ‘whitepaper’)) AND $_POST[‘order_type’]== ‘place_order’)
{
$header= ‘

Order Details

‘;
$out.= ‘

‘;
$out.= ‘Service: ‘ . $GLOBALS[‘service’][$service_option] . ‘
‘;

if(in_array(@$_POST[‘service_option’], array(‘social’))) {
$out.= ‘Option: ‘ . $GLOBALS[‘quality_media’][$quality_option_media] . ‘
‘; }
else if(in_array(@$_POST[‘service_option’], array(‘whitepaper’))) {
$out.= ‘Option: ‘ . $GLOBALS[‘quality_whitepaper’][$quality_option_whitepaper] . ‘
‘; }
else {
$out.= ‘Quality: ‘ . $GLOBALS[‘quality’][$quality_option] . ‘
‘;}

if($_POST[‘service_option’] != ‘social’) {
if(in_array($_POST[‘service_option’], array(‘article’, ‘blog’, ‘copy’, ‘ebook’, ‘whitepaper’))) {
$out.= $GLOBALS[‘quantity’][$service_option] . ‘ ‘ . $total_quantity . ‘
‘;}
if($_POST[‘service_option’] == ‘ebook’) {
$out.= ‘Number of Pages: ‘ . $number_of_pages . ‘
‘;
}
if(@$_POST[‘service_option’] != ‘whitepaper’) {
$out.= $GLOBALS[‘wordcount’][$service_option] . ‘ ‘ . $wordcount_per_piece . ‘
‘;
}
}

else $out.= ‘Package:’ . $package . ‘
‘;
if(!in_array($_POST[‘service_option’], array(‘blog’, ‘social’))) {
$out.= ‘Delivery Time: ‘ . $delivery_time . ‘
‘;
}

$out.= “Amount: $” . $amount_int . “
“;
$amount_integer= substr($amount, 1);
$transaction_amount= round(($amount_integer*($transaction_charge/100)), 1);
$total_amount= ($amount_integer)+($transaction_amount);

$out.= ‘Transaction charge (@4%): $’ . $transaction_amount . ‘
‘;
$out.= ‘Total: $’ . $total_amount .’‘;

if(in_array($_POST[‘service_option’], array(‘blog’, ‘social’))) {
$out.= ‘ (per month)’;
if($_POST[‘service_option’] == ‘social’) $item_name = ‘Social media management’;
else $item_name = $total_quantity .’ x ‘ . $wordcount_per_piece . ‘ word blog posts/week’;

$paypal_link=’https://www.paypal.com/subscriptions/business=payments@godotmedia.com&item_name=’;
$paypal_img=’&image_url=https://www.godotmedia.com/themes/jaded/logo.png&no_shipping=1&return=https://www.godotmedia.com/order-placed&no_note=1&a3=’. $total_amount .’&p3=1&t3=M&src=1&sra=1&srt=0′;
$paypal_url= $paypal_link . $item_name . $paypal_img;

$checkout_link= ‘https://www.2checkout.com/2co/buyer/purchase?sid=1816932&mode=2CO&li_1_price=’;
$checkout_url= $checkout_link . $total_amount . ‘&li_1_name=’. $item_name .’&li_1_recurrence=1 Month&li_1_duration=Forever&Currency_code=USD’;
}
else{
$paypal_link=’https://www.paypal.com/xclick/business=payments@godotmedia.com&item_name=’;
$paypal_url= $paypal_link . $GLOBALS[‘service’][$service_option]. ‘&amount=’ . $total_amount . ‘&Currency_code=USD’;

$checkout_link= ‘https://www.2checkout.com/checkout/purchase?x_login=1816932&x_amount=’;
$checkout_url= $checkout_link . $total_amount . ‘&x_invoice_num=’.$GLOBALS[‘service’][$service_option].’&Currency_code=USD’;
}
$out.= ‘

‘;
$out.= ‘

‘;

$edit_order_btn = ‘

Pay now using:

‘;

if(in_array($_POST[‘service_option’], array(‘blog’, ‘social’))) {
$paypal_btn = ”;
$paypal_img = ”;
}
else {
$paypal_btn = ‘Paypal‘;
$paypal_img = ‘‘;
}

$twoco_btn = ‘2CheckOut
‘;
$twoco_img = ‘‘;

$payment = $edit_order_btn . $paypal_btn . $twoco_btn . $paypal_img . $twoco_img;

if(isset($message)) $details= ‘

Other Details: ‘ . $message . ‘

‘;
}
else if( ($_POST[‘service_option’] == ‘other’) OR ($_POST[‘service_option’] == ‘none’) OR ($_POST[‘order_type’] == ‘custom_quote’))
{
$header= ”;
$out.= ‘

Thanks for getting in touch with us. We\’ll get back to you within 1 business day.

‘;
$payment= ”;
$details= ”;
}

print $header;
print $out;
print $payment;
print $details;
print ‘

‘;

}
[/insert_php]

[insert_php]
echo do_shortcode(‘[KentoTestimonial]’);
[/insert_php]

[insert_php]
if($order_from != ‘dash’) {
$to= ‘sales@godotmedia.com’;
if(isset($email)) {
if($order_type== ‘place_order’) {
$subject= ‘Order placed’;
$body= $out;
}
else {
$subject= ‘Quote request’;
$body= ‘

‘;
$body.= ‘Service: ‘ . $service_custom . ‘

‘;
}
$body.= ‘

‘;
$body.= ‘Name: ‘ . $name . ‘
‘;
$body.= ‘Email: ‘ . $email . ‘
‘;
//$body.= ‘Phone: ‘ . $phone . ‘
‘;
$body.= ‘Other Details: ‘ . $message. ‘
‘;
$body.= ‘Order Placed at: ‘ . $time . ‘
‘;
$body.= $_SESSION[‘country_code’] . ‘
‘ . $_SESSION[‘source’] . ‘
‘ . $_SESSION[‘referer’];
$body.=’

‘;
$country= $_SESSION[‘country_code’];
omni_record_lead($email, $name, $subject, $body, $country);
}
}
[/insert_php]