Jump to content

Show order detail not working properly with friendly URLs


Recommended Posts

Hello,

 

I've got a problem displaying the order detail. When I click in show detail, the Javascript function showOrder() is executed. But instead of displaying the order detail, the home page appears.

 

I've tried to trace what's happening and I've found that the URL http://www.example.com/es/index.php?controller=order-detail&id_order=19&ajax=true is redirecting to index, so the IndexControlller is executed insted of the OrderDetailController.

 

I've also seen that if I disabled friendly URLs, everything works fine and the order detail is shown correctly.

 

To solve the problem, I've created a new friendly URL through the backoffice by selecting "orderdetail" page from the select. Moreover, I've changed in history.tpl the name of the page, where the function showOrder is called:

 

Original:

showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('order-detail', true)}');

 

After my changes:

showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('orderdetail', true)}');

 

I don't know if this is a known issue or if is something cause by any of my customizations.  My solution it's just a workaround because I'll have the same problem for any other non-friendly URL.

 

The question is, shouldn't a non friendly URL work although friendly URLs are enabled? Is there any other way to solve this problem?

 

By the way, I'm using PS 1.5.5.0

 

Thanks in advance.

 

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

I don't know if it works for your version of PS but I've had the same problem. My solution:


 


Open header.php and add:


 


_THEME_JS_DIR_.'history.js',


 


$js_files = array(

    __PS_BASE_URI__.'js/jquery/thickbox-modified.js',

    __PS_BASE_URI__.'js/jquery/jquery.idTabs.modified.js',

    __PS_BASE_URI__.'js/jquery/jquery.scrollto.js',

    __PS_BASE_URI__.'js/jquery/jquery.serialScroll.js',

    _THEME_JS_DIR_.'tools.js',

    _THEME_JS_DIR_.'history.js',

    _THEME_JS_DIR_.'product.js'

);

Link to comment
Share on other sites

  • 9 months later...

Thanks, works for me (PS 1.5.2).

 

Hello,

 

I've got a problem displaying the order detail. When I click in show detail, the Javascript function showOrder() is executed. But instead of displaying the order detail, the home page appears.

 

I've tried to trace what's happening and I've found that the URL http://www.example.com/es/index.php?controller=order-detail&id_order=19&ajax=true is redirecting to index, so the IndexControlller is executed insted of the OrderDetailController.

 

I've also seen that if I disabled friendly URLs, everything works fine and the order detail is shown correctly.

 

To solve the problem, I've created a new friendly URL through the backoffice by selecting "orderdetail" page from the select. Moreover, I've changed in history.tpl the name of the page, where the function showOrder is called:

 

Original:

showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('order-detail', true)}');

 

After my changes:

showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('orderdetail', true)}');

 

I don't know if this is a known issue or if is something cause by any of my customizations.  My solution it's just a workaround because I'll have the same problem for any other non-friendly URL.

 

The question is, shouldn't a non friendly URL work although friendly URLs are enabled? Is there any other way to solve this problem?

 

By the way, I'm using PS 1.5.5.0

 

Thanks in advance.

Link to comment
Share on other sites

  • 6 months later...

I run Prestashop v1.6.1.0 with Nginx and had the same issue with friendly url on. Thank you so much for sharing this! It works.

 

Hello,

 

I've got a problem displaying the order detail. When I click in show detail, the Javascript function showOrder() is executed. But instead of displaying the order detail, the home page appears.

 

I've tried to trace what's happening and I've found that the URL http://www.example.com/es/index.php?controller=order-detail&id_order=19&ajax=true is redirecting to index, so the IndexControlller is executed insted of the OrderDetailController.

 

I've also seen that if I disabled friendly URLs, everything works fine and the order detail is shown correctly.

 

To solve the problem, I've created a new friendly URL through the backoffice by selecting "orderdetail" page from the select. Moreover, I've changed in history.tpl the name of the page, where the function showOrder is called:

 

Original:

showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('order-detail', true)}');

 

After my changes:

showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('orderdetail', true)}');

 

I don't know if this is a known issue or if is something cause by any of my customizations.  My solution it's just a workaround because I'll have the same problem for any other non-friendly URL.

 

The question is, shouldn't a non friendly URL work although friendly URLs are enabled? Is there any other way to solve this problem?

 

By the way, I'm using PS 1.5.5.0

 

Thanks in advance.

Link to comment
Share on other sites

  • 9 months later...
  • 5 months later...
  • 3 months later...
×
×
  • Create New...