Exemple #1
0
        _e('Final Step', 'appthemes');
    } else {
        _e('Ad Listing Received', 'appthemes');
    }
    ?>
   </h2>

   <img src="<?php 
    bloginfo('template_url');
    ?>
/images/step3.gif" alt="" class="stepimg" />

	<div class="processlog">
	<?php 
    // insert the ad and get back the post id
    $post_id = cp_add_new_listing($advals);
    ?>
	</div>
    <div class="thankyou">


    <?php 
    //incriment coupon code count only if total ad price was not zero
    if (isset($advals['cp_coupon_code']) && cp_check_coupon_discount($advals['cp_coupon_code'])) {
        cp_use_coupon($advals['cp_coupon_code']);
    }
    // call in the selected payment gateway as long as the price isn't zero
    if (get_option('cp_charge_ads') == 'yes' && $advals['cp_sys_total_ad_cost'] != 0) {
        //load payment gateway page to process checkout
        include_once TEMPLATEPATH . '/includes/gateways/gateway.php';
    } else {
Exemple #2
0
        _e('Final Step', APP_TD);
    } else {
        _e('Ad Listing Received', APP_TD);
    }
    ?>
</span></div>
	

	

	<div class="processlog">
		<?php 
    // insert the ad and get back the post id
    $renew_id = isset($_GET['renew']) ? $_GET['renew'] : false;
    //var_dump($advals);
    $post_id = cp_add_new_listing($advals, $renew_id);
    ?>
	</div>
	<div class="thankyou">

		<?php 
    // call in the selected payment gateway as long as the price isn't zero
    if (cp_payments_is_enabled() && $advals['cp_sys_total_ad_cost'] > 0) {
        $order = appthemes_new_order();
        $order->add_item(CP_ITEM_LISTING, $advals['cp_sys_total_ad_cost'], $post_id);
        do_action('appthemes_create_order', $order);
        echo html('h3', __('Payment', APP_TD));
        echo html('p', __('Please wait while we redirect you to our payment page.', APP_TD));
        echo html('p', html('small', __('(Click the button below if you are not automatically redirected within 5 seconds.)', APP_TD)));
        cp_js_redirect($order->get_return_url(), __('Continue to Payment', APP_TD));
    } else {