Hello,
VM 2 is a little bit different than VM 1.x, so please apologize all of my questions I have.
I have now two menus showing the login/logout with name and a user menu with orders and account data, How can I combine these two to one?
Thank you
[attachment cleanup by admin]
what modules do you have published?
with 2.0 joomla login is the same as virtuemart login
That's what I use. But after login there wasn't any link to orders or account info. So I created a new one with the links assigned to it.
Just how it was done with v 1.5
you should do a template override of the regular joomla module
and add the links
modules/mod_login/tmpl/default.php
<?php
/**
* @package Joomla.Site
* @subpackage mod_login
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
?>
<?php if ($type == 'logout') : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form">
<?php if ($params->get('greeting')) : ?>
<div class="login-greeting">
<?php if($params->get('name') == 0) : {
echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('name')));
} else : {
echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('username')));
} endif; ?>
</div>
<div>
<a href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&layout=edit'); ?>">
<?php echo JText::_('COM_VIRTUEMART_MY_ACCOUNT'); ?></a>
</div><div>
<a href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=orders&layout=list'); ?>">
<?php echo JText::_('COM_VIRTUEMART_MY_ORDERS'); ?></a>
</div>
<?php endif; ?>
<div class="logout-button">
<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGOUT'); ?>" />
<input type="hidden" name="option" value="com_users" />
<input type="hidden" name="task" value="user.logout" />
<input type="hidden" name="return" value="<?php echo $return; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
<?php else : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" >
<?php if ($params->get('pretext')): ?>
<div class="pretext">
<p><?php echo $params->get('pretext'); ?></p>
</div>
<?php endif; ?>
<fieldset class="userdata">
<p id="form-login-username">
<label for="modlgn-username"><?php echo JText::_('MOD_LOGIN_VALUE_USERNAME') ?></label>
<input id="modlgn-username" type="text" name="username" class="inputbox" size="18" />
</p>
<p id="form-login-password">
<label for="modlgn-passwd"><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
<input id="modlgn-passwd" type="password" name="password" class="inputbox" size="18" />
</p>
<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
<p id="form-login-remember">
<label for="modlgn-remember"><?php echo JText::_('MOD_LOGIN_REMEMBER_ME') ?></label>
<input id="modlgn-remember" type="checkbox" name="remember" class="inputbox" value="yes"/>
</p>
<?php endif; ?>
<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGIN') ?>" />
<input type="hidden" name="option" value="com_users" />
<input type="hidden" name="task" value="user.login" />
<input type="hidden" name="return" value="<?php echo $return; ?>" />
<?php echo JHtml::_('form.token'); ?>
</fieldset>
<ul>
<li>
<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a>
</li>
<li>
<a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>">
<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?></a>
</li>
<?php
$usersConfig = JComponentHelper::getParams('com_users');
if ($usersConfig->get('allowUserRegistration')) : ?>
<li>
<a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">
<?php echo JText::_('MOD_LOGIN_REGISTER'); ?></a>
</li>
<?php endif; ?>
</ul>
<?php if ($params->get('posttext')): ?>
<div class="posttext">
<p><?php echo $params->get('posttext'); ?></p>
</div>
<?php endif; ?>
</form>
<?php endif; ?>
THEN:
go to your language manager, & add the language strings as overrides
http://forum.virtuemart.net/index.php?board=129.0
Thank you. I am trying to figure out exactly how.
Quote from: MAD King on June 08, 2013, 03:18:49 AM
Thank you. I am trying to figure out exactly how.
what do you mean?
I just posted the code for it, just do an override of mod_login
http://forum.virtuemart.net/index.php?topic=90935.0
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
lol. I thought it was the code from the default mod_login page you posted.
Works Great. Thank you very much.