Hello again,
I have kinda painted myself into a corner here.
Up till now registration has been through the process of adding products to a cart and forcing the new user to enter name, address etc. So far so good. I now find there are certain documents I do not want to be visible to non-registered users. I do not want to register users using the default Joomla interface otherwise new users can bypass name, address, etc that Hikashop neatly requests.
To make this work I activated the plugin to redirect Joomla Registration to Hikashop registration and that works fine. However, when I click "the "registration" menu option and the user is already logged in that user is returned to the cpanel (something I had carefully avaioded using separate menu items).
I have finally found the correct syntax for the mod Xavier suggested:
<div class="hikashopcpanel" id="hikashopcpanel">
<?php
foreach($this->buttons as $oneButton){
if($oneButton['text'] == 'Subscriptions'){
$url = JURI::base().'/index.php?option=com_akeebasubs&view=subscriptions';
}else
{
$url = hikashop_level($oneButton['level']) ? 'onclick="document.location.href=\''.$oneButton['link'].'\';"' : '';
} ?>
<div <?php echo $url; ?> class="icon hikashop_cpanel_icon_div">
I even changed the path to match exactly the URL obtained through a direct menu link:
<div class="hikashopcpanel" id="hikashopcpanel">
<?php
foreach($this->buttons as $oneButton){
if($oneButton['text'] == 'Subscriptions'){
$url = JURI::base().'/my-account/my-subscriptions/subscriptions'; <<=== this line changed
}else
{
$url = hikashop_level($oneButton['level']) ? 'onclick="document.location.href=\''.$oneButton['link'].'\';"' : '';
} ?>
<div <?php echo $url; ?> class="icon hikashop_cpanel_icon_div">
Irrespective of which URL completion string is used the result in the cpanel link is always:
http://<some-domain>/index.php/component/hikashop/user/cpanel#
Is there a reason why the override is not being picked up (or rather a reason why the default is overriding the changes above?)
Or alternatively, redirect the logged-in user away from cpanel to some innocent page after choosing registration?
Thanks,
Ric