Jump to content
thirty bees forum

Order History Page & Order Details


dynambee

Recommended Posts

I've been doing a lot of testing with my upcoming website over the past little while. I have half a dozen different test accounts set up along with matching PayPal sandbox accounts so I can test purchases & shipping calculations for various destinations.

The result is that I have now managed to generate quite a bit of order history on some of these accounts. Like this:

image.thumb.png.7eaeaf030532442a4d9202d3459aa3fe.png

 

This has pushed the "order details" section far enough down the page that when I click on the "Order reference" link or on the "Details" button nothing visually happens on the page. If I scroll down far enough the order information is there, but clicking on the one of the links visually seems to do....nothing (even though in fact the order details are being loaded.)

In fact I hadn't checked the Order Details recently and I actually thought one of my changes had broken something because clicking on those links didn't seem to do anything.

Looking at what those links do, they are javascript triggers for AJAX page changes, which makes sense since that is what is happening. What I would like to do is change them so they are just basic URLs that load the order details onto the current page. So instead of having the order history and order details all in one place I would like something more traditional with just basic links and no AJAX calls.

I've had a poke around but can't figure out where to make this change. I'd like to change this:

javascript:showOrder(1, 1773945082, 'https://www.mydomain.com/order-detail?id_order=1773945082');

and this:

javascript:showOrder(1, 1773945082, 'https://www.mydomain.com/order-detail');

to just be this:

https://www.mydomain.com/order-detail?id_order=1773945082

in both places.

Anyone know where to make the change?

Link to comment
Share on other sites

edit history.tpl file and replace 

<a href="javascript:showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('order-detail', true, NULL, "id_order={$order.id_order|intval}")|escape:'html':'UTF-8'}');">

with

<a href="{$link->getPageLink('order-detail', true, NULL, "id_order={$order.id_order|intval}")|escape:'html':'UTF-8'}">

 

  • Thanks 1
Link to comment
Share on other sites

And you will probably want to modify order-detail.tpl file as well to add breadcrumbs support. Add something like this to the very beginning of the file

{capture name=path}
  <a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
    {l s='My account'}
  </a>
  <span class="navigation-pipe">{$navigationPipe}</span>
  <a href="{$link->getPageLink('history', true)|escape:'html':'UTF-8'}">
    {l s='Order history'}
  </a>
  <span class="navigation_page">
      {l s='Order %s' sprintf=[$order->reference]}
  </span>
{/capture}

 

  • Thanks 1
Link to comment
Share on other sites

Thank you! I will try that tonight.

BTW, I noticed that with Firefox clicking on the javascript link actually causes the page to scroll down to the order details.

However with Chrome the page does not scroll down, and it doesn't scroll down with Safari on iOS 13, either.

Perhaps this is a bug?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...