分离WooCommerce我的帐户页面

时间:2014-11-17 16:19:02

标签: php wordpress woocommerce

我有一个使用WooCommerce的网站,该网站目前使用短代码在各个标签中显示用户帐户信息。我想将这些选项卡分隔到wordpress中的不同页面,但是,当我尝试分离代码时,它永远不会正确显示。如果我想放置" MKTG工具"在它自己的页面下面,我该怎么做?

我很感激有人花时间看这个!

      <?php
     /**
      * My Account page
       *
       * @author        WooThemes
       * @package   WooCommerce/Templates
       * @version     2.0.0
       */

        if ( ! defined( 'ABSPATH' ) ) {
        exit;
         }

         wc_print_notices();

                            /*
                            1.  Overview (Addresses and Edit info)
                            2.  Points Earned
                            3.  EyePromise Ordered
                            4.  Mktg Tools Ordered
                            5.  Downloads
                            6.  My Courses
                            7.  E-Tools
                            */

                            // LIVE URL: https://order.eyepromise.com
                            // TEST URL: http://eprtest.printavenue.com
                            $eyeorder_url = get_user_meta(get_current_user_id(), 'eyeorder_url',                 true);
                            if($eyeorder_url){
                                $iframe = '
                                <iframe src="http://eprtest.printavenue.com/login/'.$eyeorder_url.'&d=account_noskin.aspx&esp=1" bgcolor="#FFFFFF" vspace="0" hspace="0" marginwidth="0" marginheight="0" height="1000" width="100%" display="block" frameBorder="0"></iframe>';
                            } else {
                                $iframe = '
                                <iframe src="http://eprtest.printavenue.com/account_noskin.aspx?esp=1" bgcolor="#FFFFFF" vspace="0" hspace="0" marginwidth="0" marginheight="0" height="1000" width="100%" display="block" frameBorder="0"></iframe>';
                            }

                            echo '
                            <div class="content-tabs">
                                <div class="content-tabs-top">
                                    <div class="content-tab-name" id="overview">
                                        Overview
                                    </div>
                                    <div class="content-tab-name" id="pointsearned">
                                        Points Earned
                                    </div>
                                    <div class="content-tab-name" id="eyepromiseordered">
                                        EyePromise Ordered
                                    </div>
                                    <div class="content-tab-name" id="mktgtoolsordered">
                                        Mktg Tools Ordered
                                    </div>
                                    <div class="content-tab-name" id="downloads">
                                        Downloads
                                    </div>
                                    <div class="content-tab-name" id="mycourses">
                                        My Courses
                                    </div>
                                    <div class="content-tab-name" id="etools">
                                        E-Tools
                                    </div>
                                </div>
                                <div class="content-tabs-group">
                                    <div class="content-tab" id="ct-overview">
                                        <div class="full">
                                            Hello '.$current_user->display_name.'.<br />
                                            From your account dashboard you can view your recent orders,
                                            manage your shipping and billing addresses and
                                            <a href="'.wc_customer_edit_account_url().'">edit your password and account details</a>.';
                                            wc_get_template( 'myaccount/my-address.php' );
                                            //do_action( 'woocommerce_after_my_account' );
                                            echo '
                                        </div>
                                    </div>
                                    <div class="content-tab" id="ct-pointsearned">
                                        <div class="full">
                                            <h2>Points Earned History</h2>
                                            '.customer_point_history().'
                                        </div>
                                    </div>
                                    <div class="content-tab" id="ct-eyepromiseordered">
                                        <div class="full">
                                            <h2>EyePromise Product Order History</h2>
                                            '.$iframe.'
                                        </div>
                                    </div>
                                    <div class="content-tab" id="ct-mktgtoolsordered">
                                        <div class="full">';
                                            wc_get_template( 'myaccount/my-orders.php', array( 'order_count' => $order_count ) );
                                            echo '
                                        </div>
                                    </div>
                                    <div class="content-tab" id="ct-downloads">
                                        <div class="full">';
                                            wc_get_template( 'myaccount/my-downloads.php' );
                                            echo '
                                        </div>
                                    </div>
                                    <div class="content-tab" id="ct-mycourses">
                                        <div class="full">
                                            '.do_shortcode('[usercourses]').'
                                        </div>
                                    </div>
                                    <div class="content-tab" id="ct-etools">
                                        <div class="full">
                                            <h2>Referral Link</h2>';
                                            do_action( 'woocommerce_before_my_account' );
                                            echo '
                                            <h2>Practice E-Tools</h2>
                                            Zlink code and convenienceship code coming soon!
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <br /><br />';

0 个答案:

没有答案