Skip to main content

[SOLVED]cancel button and redirect to another page

More
14 years 8 months ago - 14 years 8 months ago #36906 by alain.roger
Hi,

i would like to user a particular article as control panel for users. it's not that i'm not satisfied with your control panel, it's just i have several components and plug-ins which i would like to centralize on 1 single page...something like Amazon does for user account.

therefore i would like to know if it's possible to redirect user when he clicked on cancel button (for example in addresses or order lists) to another page ?

thank a lot,

A.

What does not kill you, makes you stronger.
Last edit: 14 years 8 months ago by alain.roger.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #37040 by alain.roger
Hi Nicolas,

could you tell me if it's possible or not to do what i request previously ?

thx.

What does not kill you, makes you stronger.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #37043 by Jerome
Hi,

All HikaShop view could be override.
In the backend, go into "Display => Views" and use the filter "user".
You will find "user / cpanel".

You can override it as you wish and if you want to use another page, you can redirect the user to another one.

Hope it would help you.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago - 14 years 8 months ago #37053 by alain.roger
Thx Jerome for info, but what is the best way to load it as the content i must load into yourcpanel.hp is in fact an article content ?

would a simple JRoute will be enough ?
i tried something like:
Code:
JRoute::_('index.php?option=com_content&view=article&id=18&Itemid=324');

and got blank page :-(

What does not kill you, makes you stronger.
Last edit: 14 years 8 months ago by alain.roger.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #37066 by Jerome
JRoute give you the url but you have to use $app->redirect() for redirection.

Something like:
Code:
$app =& JFactory::getApplication(); $url = JRoute::_('index.php?option=com_content&view=article&id=18&Itemid=324', false); $app->redirect( $url );

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #37086 by alain.roger
Thx Jerome,

i discovered that doing this when user clicked on cancel button, the response time is longer than normal.
Is there a better way to do that ?

i was thinking to speed up things to directly into cpanel.php to write the code which is in article but as my website should soon be translated into several languages i don't know how i will translate the content of cpanel.php.

What does not kill you, makes you stronger.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #37181 by nicolas
The redirect is your best bet I would say if you want to handle multiple languages. It sure takes a bit more time to display the page but not that much.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #37184 by alain.roger
thank for your feedback.
i did it like that.

What does not kill you, makes you stronger.

Please Log in or Create an account to join the conversation.

Time to create page: 0.217 seconds
Powered by Kunena Forum