SEF url for call to after_end.php

  • Posts: 15
  • Thank you received: 0
8 years 11 months ago #224993

-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.37

Hi,

In the paypal.php file of the Paypal plugin, the following line causes a non-SEF url to display when the after_end.php file is loaded.

$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id='.$order->order_id . $this->url_itemid;

The above causes a url similar to the following:

http://www.<mysite>.com/index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=183&Itemid=271

Is it possible to generate a SEF url instead?

Thanks in advance for your help.

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

  • Posts: 82908
  • Thank you received: 13378
  • MODERATOR
8 years 11 months ago #225034

Hi,

Sure but why would that be necessary ?
The SE in SEF is for "Search Engine" right ?
That URL will never be indexed by search engines since they can't do a checkout.
So there is not really a point in SEFing it.
And normally, if you want to redirect the customer to another URL than this one, you would simply enter the URL you want in the "return URL" setting of your payment method in the backend.

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

  • Posts: 15
  • Thank you received: 0
8 years 11 months ago #225046

Hi,

Thanks for your reply. I perfectly understand what you mean. I just want the url that the user sees to look more neat. More importantly, I would like to avoid "com_hikahop" to reflect in the url.

Thanks again for your help.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 11 months ago #225055

Hi,

So as Nicolas said, you can edit the "return URL" setting of your payment method in the backend in order to set a sef url.
That way the customers will only see a clean and sef url :)

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

  • Posts: 15
  • Thank you received: 0
8 years 11 months ago #225074

Thanks again for getting back to me. I am aware of being able to set a Return URL in the Paypal plugin with a SEF URL but my need is slightly different. I am using the after_end.php file to not only display the "Order Confirmed" message but also to dynamically generate a link to the associated invoice.

Excuse my ignorance, if any, but the need to generate this link means I need to load a PHP file from the server instead of using a static Joomla article as my "Order Confirmed" page. I don't know how to generate a SEF URL to call the after_end.php (or any other PHP file for that matter) and would appreciate your help in doing so.

Thanks again for your patience.

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

  • Posts: 2143
  • Thank you received: 747
8 years 11 months ago #225075

Hi,

And sorry for jumping in, but if nothing else works, there's always NoNumber's "Sourcerer" , allowing you to insert PHP and other code in otherwise 'static' content such as Joomla articles.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 8 years 11 months ago by lousyfool.

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

  • Posts: 15
  • Thank you received: 0
8 years 11 months ago #225077

Thanks for chipping in. Am hoping that the Hikashop team will have something to add....if not, then I guess I will have to live with the non-SEF URL or look at the NoNumber extension suggested by you.

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

  • Posts: 82908
  • Thank you received: 13378
  • MODERATOR
8 years 11 months ago #225100

I don't see the point, but if you really want to, change the line:
$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id='.$order->order_id . $this->url_itemid;
to:
$return_url = hikashop_completeLink('checkout&task=after_end&order_id='.$order->order_id . $this->url_itemid);

and that should do it.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum