The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 04-23-2015, 09:48 PM
John R Perry's Avatar
John R Perry is offline
Webpartner
 
Join Date: Dec 2014
Posts: 79
Default

AJAX: Am I able to grab the relative URL?


$ecwid_canonical

Will get me the absolute url, is there anything that will get the relative url?
  #2  
Old 04-29-2015, 02:34 PM
river's Avatar
river river is offline
Ecwid Team
 
Join Date: Feb 2015
Posts: 452
Default

Quote:
Originally Posted by John R Perry View Post
$ecwid_canonical

Will get me the absolute url, is there anything that will get the relative url?
Hello,

If you are trying to write a php script and need to get the relative URL for any purposes, there's a way to make that happen by clipping the part after "#!" from the absolute URL.

Supposedly, you may try using this way:

Code:
 substr($string, strpos($string, '#!'))
In this case you need to change the "$string" with the absolute URL you are up to clip the hash part from.

This should get you the relative URL which would look like "/Fruit/c/12459163", for example.

Try this out and please write us back if it helps. And of course, if you have any more questions, feel free to ask.
__________________
Roman I.
Ecwid Customer Care Team

More tips and hints on Ecwid use in our Help Center

⬇ Please click Thanks if my reply helped you.
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Tags
adobe muse, ajax, indexing, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:44 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.