<?php

echo html::formStart('bestSelldWidg' . $this->post->ID, array('attrs' => 'onsubmit="toeAddToCart(this, \'\', true); return false;"', 'method' => 'POST'));
?>
	<?php 
//echo html::text('qty', array('value' => 1))
?>
	<?php 
echo html::hidden('addQty', array('value' => 1));
?>
	<?php 
echo html::hidden('mod', array('value' => 'user'));
?>
	<?php 
echo html::hidden('action', array('value' => 'addToCart'));
?>
	<?php 
echo html::hidden('pid', array('value' => $this->post->ID));
?>
	<?php 
echo html::hidden('reqType', array('value' => 'ajax'));
?>
	<?php 
echo html::submit('add', array('value' => lang::_('Add')));
?>
	<div class="toeAddToCartMsg"></div>
<?php 
echo html::formEnd();
			
			<div id="content" role="main">

			<?php 
if (have_posts()) {
    ?>

				<header class="page-header">
					<h1 class="page-title">
						<?php 
    if (is_day()) {
        printf(lang::_('Daily Archives: %s'), '<span>' . get_the_date() . '</span>');
    } elseif (is_month()) {
        printf(lang::_('Monthly Archives: %s'), '<span>' . get_the_date('F Y') . '</span>');
    } elseif (is_year()) {
        printf(lang::_('Yearly Archives: %s'), '<span>' . get_the_date('Y') . '</span>');
    } else {
        lang::_e('Archives');
    }
    ?>
					</h1>
				</header>

				<?php 
    rewind_posts();
    ?>

				<?php 
    ready_ecommerce_content_nav('nav-above');
    ?>
 * @since Ready_ecommerce 0.1
 */
get_header();
?>

		<section id="primary">
			
			<div id="content" role="main">

			<?php 
if (have_posts()) {
    ?>

				<header class="page-header">
					<h1 class="page-title"><?php 
    printf(lang::_('Category Archives: %s'), '<span>' . single_cat_title('', false) . '</span>');
    ?>
</h1>

					<?php 
    $category_description = category_description();
    if (!empty($category_description)) {
        echo apply_filters('category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>');
    }
    ?>
				</header>

				<?php 
    ready_ecommerce_content_nav('nav-above');
    ?>
Beispiel #4
0
        </p>
    </div>
    <span class="cart_items">
        <?php 
$count_items = 0;
foreach ($this->cart as $inCartId => $c) {
    $count_items += $c['qty'];
}
if ($count_items > 1) {
    $txt = 'sản phẩm';
} else {
    $txt = 'sản phẩm';
}
?>
        <?php 
echo $count_items . ' ' . lang::_("{$txt}") . ' - ' . frame::_()->getModule('currency')->display(frame::_()->getModule('checkout')->getTotal());
?>
 
    </span>
    <div class="shopping_cart_list" style="display: none;">
        <div class="close"><a href="#">-X-</a></div>
        <?php 
$cart = frame::_()->getModule('user')->getModel('cart')->get();
?>
        <table class="cart-content">
            <thead>
                <tr>
                    <td>Hình</td>
                    <td>Tên sản phẩm</td>
                    <td>SL</td>
                </tr>
            if(res.data.totalHtml) {
                updateCart(new Array(), res.data.totalHtml);
            }
            if(!res.error) {
                jQuery('#toeCoupon').val('');
            }
        }
    });
}
function toeShouCouponsDescription(link) {
    var linkPos = jQuery(link).position();
    subScreen.show(<?php 
echo $this->couponsDescription;
?>
, linkPos.left, linkPos.top);
}
// -->
</script>
<h4 class="cuponTitle"><?php 
lang::_e('Enter coupon number:');
?>
</h4>
<?php 
echo html::text('coupon', array('attrs' => 'id="toeCoupon"'));
echo html::button(array('value' => lang::_('OK'), 'attrs' => 'onclick="toeApplyCoupon(); return false;" class="tcf_submit couponBtn"'));
?>
<div id="toeCouponsCheckoutMsg"></div>
<!-- <a href="#" onclick="toeShouCouponsDescription(this); return false;"><?php 
lang::_e('Where I can get It?');
?>
</a> -->
    /**
     * adds javescript code to check the values
     */
    function addScript()
    {
        global $tcf_script_printed;
        if ($tcf_script_printed) {
            // only once
            return;
        }
        $script = "\n\t\t<script type=\"text/javascript\">\n\t\t//<![CDATA[\n\t\tfunction checkForm( n )\n\t\t{\n\t\t\tvar f = new Array();\n\t\t\tf[1] = document.getElementById('tcf_sender' + n).value;\n\t\t\tf[2] = document.getElementById('tcf_email' + n).value;\n\t\t\tf[3] = document.getElementById('tcf_subject' + n).value;\n\t\t\tf[4] = document.getElementById('tcf_msg' + n).value;\n\t\t\tf[5] = f[6] = f[7] = f[8] = f[9] = '-';\n\t\t";
        for ($x = 1; $x <= 5; $x++) {
            if (!empty($this->o['field_' . $x])) {
                $script .= 'f[' . ($x + 4) . '] = document.getElementById("tcf_field_' . $x . '" + n).value;' . "\n";
            }
        }
        $script .= '
		var msg = "";
		var msgArr = [];
		for ( i=0; i < f.length; i++ )
		{
			if ( f[i] == "" ) {
				msgArr.push("' . lang::_('Please fill out all fields.') . '");
				break;
			}
		}
		if ( !isEmail(f[2]) )
			msgArr.push("' . lang::_('Wrong Email.') . '");
		if ( msgArr.length)
		{
			alert(msgArr.join("\\n"));
			return false;
		}
	}
	function isEmail(email)
	{
		var rx = /^([^\\s@,:"<>]+)@([^\\s@,:"<>]+\\.[^\\s@,:"<>.\\d]{2,}|(\\d{1,3}\\.){3}\\d{1,3})$/;
		var part = email.match(rx);
		if ( part )
			return true;
		else
			return false
	}
	//]]>
	</script>
	';
        $tcf_script_printed = 1;
        return $script;
    }
                    echo html::hidden('action', array('value' => 'updateCart'));
                    ?>
							<?php 
                    echo html::hidden('mod', array('value' => 'user'));
                    ?>
							<?php 
                    /** @deprecated @see inCartId key, but DO NOT delete this*/
                    ?>
							<?php 
                    echo html::hidden('pid', array('value' => $c['pid']));
                    ?>
							<?php 
                    /*****/
                    ?>
							<?php 
                    echo html::submit('update', array('value' => lang::_('Update'), 'attrs' => 'class="update_qty"'));
                    ?>
							<div id="qty_update_msg_<?php 
                    echo $inCartId;
                    ?>
"></div>
							<?php 
                    echo html::formEnd();
                    ?>
                        <?php 
                } else {
                    if ($this->canEdit && $c['gift']) {
                        //Show this for gifts
                        echo html::formStart('qty_cart', array('action' => '', 'attrs' => 'class="cartQtyUpdate"'));
                        echo html::hidden('inCartId', array('value' => $inCartId));
                        echo html::formEnd();
Beispiel #8
0
					<div class="widget">
						<h2 class="widgettitle"><?php 
lang::_e('Most Used Categories');
?>
</h2>
						<ul>
						<?php 
wp_list_categories(array('orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10));
?>
						</ul>
					</div>

					<?php 
/* translators: %1$s: smilie */
$archive_content = '<p>' . sprintf(lang::_('Try looking in the monthly archives. %1$s'), convert_smilies(':)')) . '</p>';
the_widget('WP_Widget_Archives', 'dropdown=1', "after_title=</h2>{$archive_content}");
?>

					<?php 
the_widget('WP_Widget_Tag_Cloud');
?>

				</div><!-- .entry-content -->
			</article><!-- #post-0 -->

		</div><!-- #content -->
	</div><!-- #primary -->

<?php 
get_footer();
if (have_posts()) {
    ?>

				<?php 
    /* Queue the first post, that way we know
     * what author we're dealing with (if that is the case).
     *
     * We reset this later so we can run the loop
     * properly with a call to rewind_posts().
     */
    the_post();
    ?>

				<header class="page-header">
					<h1 class="page-title author"><?php 
    printf(lang::_('Author Archives: %s'), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url(get_the_author_meta("ID")) . '" title="' . esc_attr(get_the_author()) . '" rel="me">' . get_the_author() . '</a></span>');
    ?>
</h1>
				</header>

				<?php 
    /* Since we called the_post() above, we need to
     * rewind the loop back to the beginning that way
     * we can run the loop properly, in full.
     */
    rewind_posts();
    ?>

				<?php 
    ready_ecommerce_content_nav('nav-above');
    ?>
echo html::hidden('addQty', array('value' => 1));
?>
        <?php 
echo html::hidden('mod', array('value' => 'user'));
?>
        <?php 
echo html::hidden('action', array('value' => 'addToCart'));
?>
        <?php 
echo html::hidden('pid', array('value' => $this->post->ID));
?>
        <?php 
echo html::hidden('reqType', array('value' => 'ajax'));
?>
        <?php 
echo html::submit('add', array('value' => lang::_('Thêm vào giỏ')));
?>
        </div>
    <?php 
/*if($this->useFormOnButtonsTpl) { ?>
      </form>
  <?php }*/
?>
    <div class="clear"></div>
    <?php 
if ($this->stockCheck && !$this->availableQty) {
    ?>
        <div class="toeErrorMsg"><?php 
    lang::_e('Please be advised that this product is out of stock');
    ?>
</div>
Beispiel #11
0
 public function _($key)
 {
     return lang::_($this->lang_dir, $key, func_get_args());
 }
		</tr>
        <tr>
            <td>
                <?php 
if (!empty($this->toeReturn)) {
    echo html::hidden('toeReturn', array('value' => $this->toeReturn));
}
?>
                <span class="toePasswordForgotLinkBox">
                    <a href="#" class="toeForgotPasswordLink"><?php 
lang::_e('Forgot password?');
?>
</a>
                </span>
                <?php 
echo html::submit('login', array('value' => lang::_('Sign In'), 'attrs' => 'class="tcf_submit" id="toeLoginFormSubmit"'));
?>
                <div id="toeLoginMsg"></div>
            </td>
        </tr>
		
    </table>
<?php 
if (!$this->fieldsOnly) {
    echo html::formEnd();
}
if (!empty($this->registrationLink)) {
    ?>
<div>
    <?php 
    lang::_e('If you have no account - you can');
    wp_link_pages(array('before' => '<div class="page-link">' . lang::_('Pages:'), 'after' => '</div>'));
    ?>
	</div><!-- .entry-content -->
	<?php 
}
?>

	<footer class="entry-meta">
		<?php 
ready_ecommerce_posted_on();
?>
		<?php 
if (comments_open() || '0' != get_comments_number() && !comments_open()) {
    ?>
		<span class="sep"> | </span>
		<span class="comments-link"><?php 
    comments_popup_link(lang::_('Leave a comment'), lang::_('1 Comment'), lang::_('% Comments'));
    ?>
</span>
		<?php 
}
?>
		<?php 
edit_post_link(lang::_('Edit'), '<span class="sep"> | </span><span class="edit-link">', '</span>');
?>
	</footer><!-- #entry-meta -->
</article><!-- #post-<?php 
the_ID();
?>
 -->
Beispiel #14
0
 public function _($key)
 {
     return lang::_($this->lang_dir, $key);
 }
}
// have_comments()
?>

	<?php 
// If comments are closed and there are no comments, let's leave a little note, shall we?
if (!comments_open() && '0' != get_comments_number() && post_type_supports(get_post_type(), 'comments')) {
    ?>
		<p class="nocomments"><?php 
    lang::_e('Comments are closed.');
    ?>
</p>
	<?php 
}
?>
                
        <?php 
if (get_post_type() == 'product') {
    $comments_args = array('title_reply' => '<h2>Leave a review</h2>', 'comment_notes_after' => '', 'id_submit' => 'post_review', 'label_submit' => lang::_('Post Review'), 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x('Review', 'noun') . '</label><br /><textarea id="comment" rows="10" name="comment" aria-required="true"></textarea></p>');
} else {
    $comments_args = array('id_submit' => 'post_review');
}
?>
        
                
	<?php 
//comment_form($comments_args);
?>

</div><!-- #comments -->