Rainforest

Sankuru

Implementing, customizing, extending, and troubleshooting Joomla/Virtuemart

Views: 656
SocialTwist Tell-a-Friend

Machine translation

English Arabic Chinese (Simplified) German Japanese Russian Spanish
We write extension source code in well-documented joomla 1.5 guideline-compliant MVC style.

Re-use open source

What you need, often exists already, and covers your requirements for 80%. We will add the remaining 20% for you.

Solve the problem today!

Need experts to work on your site?

Free quote

Request a free quote today.

Warranty

3 months free

Sankuru Native VM Sef Router PDF Print E-mail
User Rating: / 0
PoorBest 

Installation notes

 

Experiment with fiddling, and correctly setting the options, on a staging server first, before doing this on a heavily visited live site.

 

Step 1: Installing the zip

Install the zip file using the Joomla back end installer, via the top menu: Extensions->Install/Uninstall.

Remarks:

  • The installation zip is a standard Joomla component installation zip that will copy the embedded SEF router to the front end Virtuemart component directory.

 

Step 2: Switching on Apache's url rewriting

In the root of your joomla installation, rename the file htaccess.txt to .htaccess.

Remarks:

  • You will probably need to use an ftp client, or similar, to do that.
  • Ascertain that Apache's mod_rewrite module is active.
  • You can either check your server configuration for this (httpd.conf) or else check it with a workaround.

 

Step 3: Activating the SEF urls

Go to the top menu: Site->Global Configuration->SEO Settings->Search Engine Friendly URLs and choose 'Yes' in order to activate the SEF urls.

Remarks:

  • You will see the effect of this extension only by the URLs that Joomla generates for Virtuemart.
  • There is no other user interface, nor in the front end, neither in the back end. The extension only produces SEF urls.


Possible Issues during installation

  • Some users reported issues when they forgot to rename the htaccess.txt file to .htaccess. We are still investigating this issue.
  • If Apache's mod_rewrite module is not active, the .htaccess configuration will not take effect.

 

Modification to core Virtuemart

Some virtuemart links are not written to support sef and some doesn't work without .htaccess. So it leaves me no choice but to modify the core file.
We have added the following code to line 600 of virtuemart core file classes/ps_session.php
function  url($text, $createAbsoluteURI=false, $encodeAmpersands=true, $ignoreSEF=false ) {
....

if(SECUREURL==URL or substr($url,0,strlen(URL))==URL)
{

$url=str_replace(URL,'',$url);

if(strpos($url,'?')!==false)
{

$url=str_replace('//','/','index.php'. substr($url,strpos($url,'?')));

$url=str_replace(':/','://',$url);

}
....

//after line - $url = sefRelToAbs($url);
if(SECUREURL==URL AND $createAbsoluteURI==true)
{

if(substr($url,0,strlen(URL))!=URL)
{

$url =substr(URL,0,strpos(URL,'/',10)) .$url;
$url=str_replace('//','/',$url);
$url=str_replace(':/','://',$url);

}

}

...

}

Download ps_session.php file

  • Download ps_session.zip and unzip it. You will get ps_session.php
  • install by copying this modified ps_session file over your existing administrator/components/com_virtuemart/classes/ps_session.php file
  • Tested for vm113 and vm114.

VM Sef Joomfish ContentElement plugin

VM Sef router.php was developed to support joomfish translation vm sef language itself such as create an account, view all products in shop, feed, view your cart contents, and ...

Click here to download

 

VM Sef will render sef url as the following

 
 
Joomla 1.5 Templates by Joomlashack