0
我想在產品管理中的前端magento類別標籤中爲用戶配置文件選項卡創建ajax更新標籤。我用這個代碼:在magento前端創建ajax更新標籤
<ul id="page_tabs" class="tabs">
<li>
<a id="page_tabs_account" class="tab-item-link ajax active" href="http://localhost/magento/customer/account/" name="account">Account Dashboard</a>
</li>
<li>
<a id="page_tabs_account_edit" class="tab-item-link ajax notloaded" href="http://localhost/magento/customer/account/edit/" name="account_edit">Account Information</a>
</li>
</ul>
<script>
var FORM_KEY="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>";
var varienGlobalEvents=false;
page_tabsJsTabs = new varienTabs('page_tabs', 'tabcontainer', 'page_tabs_account',[]);
</script>
另外補充js文件中page.xml這樣的:當我們點擊選項卡,然後Ajax是呼叫,但返回的數據是像頭整個頁面的數據
<action method="addJs"><script>mage/adminhtml/tabs.js</script></action>
,頁腳,左邊欄。我們只需要分配.phtml
文件數據(右側側欄)的特定標籤。
所以我們如何得到這一點。如果其他方法很容易,請讓我知道。
謝謝。