[SOLVED]cancel button and redirect to another page

  • Posts: 192
  • Thank you received: 1
12 years 3 months ago #36906

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: 12 years 3 months ago by alain.roger.

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

  • Posts: 192
  • Thank you received: 1
12 years 3 months ago #37040

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.

  • Posts: 26032
  • Thank you received: 4006
  • MODERATOR
12 years 3 months ago #37043

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 192
  • Thank you received: 1
12 years 3 months ago #37053

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:

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: 12 years 3 months ago by alain.roger.

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

  • Posts: 26032
  • Thank you received: 4006
  • MODERATOR
12 years 3 months ago #37066

JRoute give you the url but you have to use $app->redirect() for redirection.

Something like:

$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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 192
  • Thank you received: 1
12 years 3 months ago #37086

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.

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 3 months ago #37181

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.

  • Posts: 192
  • Thank you received: 1
12 years 3 months ago #37184

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.069 seconds
Powered by Kunena Forum