コード例 #1
0
                $gateway->payment_fields();
                echo '</div>';
            }
            ?>
                        </li>
                        <?php 
        }
    } else {
        echo '<p>' . __('Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'fflcommerce') . '</p>';
    }
    ?>
            </ul>
        <?php 
}
?>

        <div class="form-row">
            <?php 
fflcommerce::nonce_field('pay');
?>
            <input type="submit" class="button-alt" name="pay" id="place_order" value="<?php 
_e('Pay for order', 'fflcommerce');
?>
" />

        </div>

    </div>

</form>
コード例 #2
0
function fflcommerce_order_tracking($atts)
{
    extract(shortcode_atts(array(), $atts));
    global $post;
    $fflcommerce_options = FFLCommerce_Base::get_options();
    if ($_POST) {
        $order = new fflcommerce_order();
        $order->id = !empty($_POST['orderid']) ? $_POST['orderid'] : 0;
        if (isset($_POST['order_email']) && $_POST['order_email']) {
            $order_email = trim($_POST['order_email']);
        } else {
            $order_email = '';
        }
        if (!fflcommerce::verify_nonce('order_tracking')) {
            echo '<p>' . __('You have taken too long. Please refresh the page and retry.', 'fflcommerce') . '</p>';
        } elseif ($order->id && $order_email && $order->get_order(apply_filters('fflcommerce_shortcode_order_tracking_order_id', $order->id))) {
            if ($order->billing_email == $order_email) {
                echo '<p>' . sprintf(__('Order %s which was made %s ago and has the status "%s"', 'fflcommerce'), $order->get_order_number(), human_time_diff(strtotime($order->order_date), current_time('timestamp')), __($order->status, 'fflcommerce'));
                if ($order->status == 'completed') {
                    $completed = (array) get_post_meta($order->id, '_js_completed_date', true);
                    if (!empty($completed)) {
                        $completed = $completed[0];
                    } else {
                        $completed = '';
                    }
                    // shouldn't happen, reset to be sure
                    echo sprintf(__(' was completed %s ago', 'fflcommerce'), human_time_diff(strtotime($completed), current_time('timestamp')));
                }
                echo '.</p>';
                do_action('fflcommerce_tracking_details_info', $order);
                ?>
				<?php 
                do_action('fflcommerce_before_track_order_details', $order->id);
                ?>
				<h2><?php 
                _e('Order Details', 'fflcommerce');
                ?>
</h2>
				<table class="shop_table">
					<thead>
						<tr>
							<th><?php 
                _e('ID/SKU', 'fflcommerce');
                ?>
</th>
							<th><?php 
                _e('Title', 'fflcommerce');
                ?>
</th>
							<th><?php 
                _e('Price', 'fflcommerce');
                ?>
</th>
							<th><?php 
                _e('Quantity', 'fflcommerce');
                ?>
</th>
						</tr>
					</thead>
					<tfoot>
                        <tr>
                            <?php 
                if ($fflcommerce_options->get('fflcommerce_calc_taxes') == 'yes' && $order->has_compound_tax() || $fflcommerce_options->get('fflcommerce_tax_after_coupon') == 'yes' && $order->order_discount > 0) {
                    ?>
                                <td colspan="3"><?php 
                    _e('Retail Price', 'fflcommerce');
                    ?>
</td>
                            <?php 
                } else {
                    ?>
                                <td colspan="3"><?php 
                    _e('Subtotal', 'fflcommerce');
                    ?>
</td>
                            <?php 
                }
                ?>
                                <td><?php 
                echo $order->get_subtotal_to_display();
                ?>
</td>
                        </tr>
                        <?php 
                if ($order->order_shipping > 0) {
                    ?>
                            <tr>
                                <td colspan="3"><?php 
                    _e('Shipping', 'fflcommerce');
                    ?>
</td>
                                <td><?php 
                    echo $order->get_shipping_to_display();
                    ?>
</td>
                            </tr>
                            <?php 
                }
                do_action('fflcommerce_processing_fee_after_shipping');
                if ($fflcommerce_options->get('fflcommerce_tax_after_coupon') == 'yes' && $order->order_discount > 0) {
                    ?>
                            <tr class="discount">
                                <td colspan="3"><?php 
                    _e('Discount', 'fflcommerce');
                    ?>
</td>
                                <td>-<?php 
                    echo fflcommerce_price($order->order_discount);
                    ?>
</td>
                            </tr>
                            <?php 
                }
                if ($fflcommerce_options->get('fflcommerce_calc_taxes') == 'yes' && $order->has_compound_tax() || $fflcommerce_options->get('fflcommerce_tax_after_coupon') == 'yes' && $order->order_discount > 0) {
                    ?>
                            <tr>
                                <td colspan="3"><?php 
                    _e('Subtotal', 'fflcommerce');
                    ?>
</td>
                                <td><?php 
                    echo fflcommerce_price($order->order_discount_subtotal);
                    ?>
</td>
                            </tr>
                            <?php 
                }
                if ($fflcommerce_options->get('fflcommerce_calc_taxes') == 'yes') {
                    foreach ($order->get_tax_classes() as $tax_class) {
                        if ($order->show_tax_entry($tax_class)) {
                            ?>
                                    <tr>
                                        <td colspan="3"><?php 
                            echo $order->get_tax_class_for_display($tax_class) . ' (' . (double) $order->get_tax_rate($tax_class) . '%):';
                            ?>
</td>
                                        <td><?php 
                            echo $order->get_tax_amount($tax_class);
                            ?>
</td>
                                    </tr>
                                    <?php 
                        }
                    }
                }
                ?>
						<?php 
                if ($fflcommerce_options->get('fflcommerce_tax_after_coupon') == 'no' && $order->order_discount > 0) {
                    ?>
<tr class="discount">
							<td colspan="3"><?php 
                    _e('Discount', 'fflcommerce');
                    ?>
</td>
							<td>-<?php 
                    echo fflcommerce_price($order->order_discount);
                    ?>
</td>
						</tr><?php 
                }
                ?>
						<tr>
							<td colspan="3"><strong><?php 
                _e('Grand Total', 'fflcommerce');
                ?>
</strong></td>
							<td><strong><?php 
                echo fflcommerce_price($order->order_total);
                ?>
</strong></td>
						</tr>
					</tfoot>
					<tbody>
						<?php 
                foreach ($order->items as $order_item) {
                    if (isset($order_item['variation_id']) && $order_item['variation_id'] > 0) {
                        $_product = new fflcommerce_product_variation($order_item['variation_id']);
                    } else {
                        $_product = new fflcommerce_product($order_item['id']);
                    }
                    echo '<tr>';
                    echo '<td>' . $_product->sku . '</td>';
                    echo '<td class="product-name">' . $_product->get_title();
                    if ($_product instanceof fflcommerce_product_variation) {
                        echo fflcommerce_get_formatted_variation($_product, $order_item['variation']);
                    }
                    do_action('fflcommerce_display_item_meta_data', $order_item);
                    echo '</td>';
                    echo '<td>' . fflcommerce_price($order_item['cost']) . '</td>';
                    echo '<td>' . $order_item['qty'] . '</td>';
                    echo '</tr>';
                }
                ?>
					</tbody>
				</table>
				<?php 
                do_action('fflcommerce_after_track_order_details', $order->id);
                ?>

				<div style="width: 49%; float:left;">
					<h2><?php 
                _e('Billing Address', 'fflcommerce');
                ?>
</h2>
					<p><?php 
                $address = $order->billing_first_name . ' ' . $order->billing_last_name . '<br/>';
                if ($order->billing_company) {
                    $address .= $order->billing_company . '<br/>';
                }
                $address .= $order->formatted_billing_address;
                echo $address;
                ?>
</p>
				</div>
				<div style="width: 49%; float:right;">
					<h2><?php 
                _e('Shipping Address', 'fflcommerce');
                ?>
</h2>
					<p><?php 
                $address = $order->shipping_first_name . ' ' . $order->shipping_last_name . '<br/>';
                if ($order->shipping_company) {
                    $address .= $order->shipping_company . '<br/>';
                }
                $address .= $order->formatted_shipping_address;
                echo $address;
                ?>
</p>
				</div>
				<div class="clear"></div>
				<?php 
            } else {
                echo '<p>' . __('Sorry, we could not find that order id in our database. <a href="' . get_permalink($post->ID) . '">Want to retry?</a>', 'fflcommerce') . '</p>';
            }
        } else {
            echo '<p>' . sprintf(__('Sorry, we could not find that order id in our database. <a href="%s">Want to retry?</a></p>', 'fflcommerce'), get_permalink($post->ID));
        }
    } else {
        ?>
		<form action="<?php 
        echo esc_url(get_permalink($post->ID));
        ?>
" method="post" class="track_order">

			<p><?php 
        _e('To track your order please enter your Order ID and email address in the boxes below and press return. This was given to you on your receipt and in the confirmation email you should have received.', 'fflcommerce');
        ?>
</p>

			<p class="form-row form-row-first"><label for="orderid"><?php 
        _e('Order ID', 'fflcommerce');
        ?>
</label> <input class="input-text" type="text" name="orderid" id="orderid" placeholder="<?php 
        _e('Found in your order confirmation email.', 'fflcommerce');
        ?>
" /></p>
			<p class="form-row form-row-last"><label for="order_email"><?php 
        _e('Billing Email', 'fflcommerce');
        ?>
</label> <input class="input-text" type="text" name="order_email" id="order_email" placeholder="<?php 
        _e('Email you used during checkout.', 'fflcommerce');
        ?>
" /></p>
			<div class="clear"></div>
			<p class="form-row"><input type="submit" class="button" name="track" value="<?php 
        _e('Track"', 'fflcommerce');
        ?>
" /></p>
			<?php 
        fflcommerce::nonce_field('order_tracking');
        ?>
		</form>
		<?php 
    }
}
コード例 #3
0
    function fflcommerce_login_form()
    {
        if (is_user_logged_in()) {
            return;
        }
        ?>
		<form method="post" class="login">
			<p class="form-row form-row-first">
				<label for="username"><?php 
        _e('Username', 'fflcommerce');
        ?>
 <span class="required">*</span></label>
				<input type="text" class="input-text" name="username" id="username" />
			</p>
			<p class="form-row form-row-last">
				<label for="password"><?php 
        _e('Password', 'fflcommerce');
        ?>
 <span class="required">*</span></label>
				<input class="input-text" type="password" name="password" id="password" />
			</p>
			<div class="clear"></div>
			<p class="form-row">
				<?php 
        fflcommerce::nonce_field('login', 'login');
        ?>
				<input type="submit" class="button" name="login" value="<?php 
        esc_html_e('Login', 'fflcommerce');
        ?>
" />
				<a class="lost_password" href="<?php 
        echo esc_url(wp_lostpassword_url(get_permalink()));
        ?>
"><?php 
        _e('Lost Password?', 'fflcommerce');
        ?>
</a>
			</p>
		</form>
	<?php 
    }
コード例 #4
0
}
?>
	</ul>
	<div class="form-row">
		<noscript>
			<?php 
_e('Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'fflcommerce');
?>
			<br /><input type="submit" class="button-alt" name="update_totals" value="<?php 
_e('Update totals', 'fflcommerce');
?>
" />
		</noscript>

		<?php 
fflcommerce::nonce_field('process_checkout');
?>

		<?php 
do_action('fflcommerce_review_order_before_submit');
?>

		<?php 
if (fflcommerce_get_page_id('terms') > 0) {
    ?>
			<p class="form-row terms">
				<label for="terms" class="checkbox"><?php 
    _e('I accept the', 'fflcommerce');
    ?>
					<a href="<?php 
    echo esc_url(get_permalink(fflcommerce_get_page_id('terms')));
コード例 #5
0
ファイル: cart.php プロジェクト: barnent1/fflcommerce
					<div class="coupon">
						<label for="coupon_code"><?php 
        _e('Coupon', 'fflcommerce');
        ?>
:</label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" />
						<input type="submit" class="button" name="apply_coupon" value="<?php 
        _e('Apply Coupon', 'fflcommerce');
        ?>
" />
					</div>
				<?php 
    }
    ?>

				<?php 
    fflcommerce::nonce_field('cart');
    ?>

				<?php 
    if ($options->get('fflcommerce_cart_shows_shop_button') == 'no') {
        ?>
					<noscript>
						<input type="submit" class="button" name="update_cart" value="<?php 
        _e('Update Shopping Cart', 'fflcommerce');
        ?>
" />
					</noscript>
					<a href="<?php 
        echo esc_url(fflcommerce_cart::get_checkout_url());
        ?>
" class="checkout-button button-alt"><?php 
コード例 #6
0
?>
<form action="<?php 
echo esc_url(apply_filters('fflcommerce_get_change_password_page_id', get_permalink(fflcommerce_get_page_id('change_password'))));
?>
" method="post">
	<p class="form-row form-row-first">
		<label for="password-1"><?php 
_e('New password', 'fflcommerce');
?>
 <span class="required">*</span></label>
		<input type="password" class="input-text" name="password-1" id="password-1" />
	</p>

	<p class="form-row form-row-last">
		<label for="password-2"><?php 
_e('Re-enter new password', 'fflcommerce');
?>
 <span class="required">*</span></label>
		<input type="password" class="input-text" name="password-2" id="password-2" />
	</p>

	<div class="clear"></div>
	<?php 
fflcommerce::nonce_field('change_password');
?>
	<p><input type="submit" class="button" name="save_password" value="<?php 
_e('Save', 'fflcommerce');
?>
" /></p>
</form>
コード例 #7
0
ファイル: edit_address.php プロジェクト: barnent1/fflcommerce
    _e('Shipping Address', 'fflcommerce');
    ?>
		<?php 
}
?>
	</h3>
	<?php 
foreach ($address as $field) {
    ?>
		<?php 
    fflcommerce_customer::address_form_field($field);
    ?>
	<?php 
}
?>
	<?php 
fflcommerce::nonce_field('edit_address');
?>
	<input type="submit" class="button" name="save_address" value="<?php 
_e('Save Address', 'fflcommerce');
?>
" />
	<a class="button-alt" href="<?php 
echo $account_url;
?>
"><?php 
_e('Go back to My Account', 'fflcommerce');
?>
</a>
</form>
コード例 #8
0
</div>
				<div class="nav-next"><?php 
            next_comments_link(__('Next <span class="meta-nav">&rarr;</span>', 'fflcommerce'));
            ?>
</div>
			</div>
		<?php 
        }
        echo '<p class="add_review"><a href="#review_form" class="inline show_review_form button">' . __('Add Review', 'fflcommerce') . '</a></p>';
        $title_reply = __('Add a review', 'fflcommerce');
    } else {
        $title_reply = __('Be the first to review ', 'fflcommerce') . '&ldquo;' . $post->post_title . '&rdquo;';
        echo '<p>' . __('There are no reviews yet, would you like to <a href="#review_form" class="inline show_review_form">submit yours</a>?', 'fflcommerce') . '</p>';
    }
    $commenter = wp_get_current_commenter();
    echo '</div><div id="review_form_wrapper"><div id="review_form">';
    comment_form(array('title_reply' => $title_reply, 'comment_notes_before' => '', 'comment_notes_after' => '', 'fields' => array('author' => '<p class="comment-form-author">' . '<label for="author">' . __('Name') . '</label> ' . '<span class="required">*</span>' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30" aria-required="true" /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __('Email') . '</label> ' . '<span class="required">*</span>' . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" aria-required="true" /></p>'), 'label_submit' => __('Submit Review', 'fflcommerce'), 'logged_in_as' => '', 'comment_field' => '
			<p class="comment-form-rating"><label for="rating">' . __('Rating', 'fflcommerce') . '</label><select name="rating" id="rating">
				<option value="">' . __('Rate...', 'fflcommerce') . '</option>
				<option value="5">' . __('Perfect', 'fflcommerce') . '</option>
				<option value="4">' . __('Good', 'fflcommerce') . '</option>
				<option value="3">' . __('Average', 'fflcommerce') . '</option>
				<option value="2">' . __('Not that bad', 'fflcommerce') . '</option>
				<option value="1">' . __('Very Poor', 'fflcommerce') . '</option>
			</select></p>
			<p class="comment-form-comment"><label for="comment">' . _x('Your Review', 'noun', 'fflcommerce') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>' . fflcommerce::nonce_field('comment_rating', true, false)));
    echo '</div></div>';
    ?>
<div class="clear"></div></div>
<?php 
}