VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: RyanK on September 17, 2012, 21:42:50 PM

Title: SH404SEF
Post by: RyanK on September 17, 2012, 21:42:50 PM
Hello,

I was disappointed to learn VM2 was not compatible with SH404SEF. I contacted the extension author earlier this month and inquired as to why they have not updated their extension since they have always supported VM in the past.  It seems they have been waiting a month for the VM team to approve the changes. Can anyone offer an update as to the approval status?

The exact response to my inquiry with Anything-Digital, the makers of SH404SEF, is below.

Thanks for your time.
-Ryan

-------

Sep 5, 2012. For Virtuemart 2, we have created a new plugin that will ensure long-term compatibility as VM2+ grows. Simply put, we have future-proofed the sh404SEF plugin (though in doing so we have removed all the parameters that users of VM1.x might expect). It has been sent to the VM team for review 2 weeks back. We followed up a few days ago but still no word.

In short, we don't have a solution currently but we expect to have one very soon once we hear back from the VM2 team.
Title: Re: SH404SEF
Post by: alatak on September 18, 2012, 09:06:03 AM
Hello

QuoteSep 5, 2012. For Virtuemart 2, we have created a new plugin that will ensure long-term compatibility as VM2+ grows. Simply put, we have future-proofed the sh404SEF plugin (though in doing so we have removed all the parameters that users of VM1.x might expect). It has been sent to the VM team for review 2 weeks back. We followed up a few days ago but still no word.
Strange reply from the sh404Sef team...since i received an email from the Yannick, the author of sh404Sef, and did the changes he suggested.
I just send him an email, and we are going to solve the problem.
Title: Re: SH404SEF
Post by: mrtrung on September 20, 2012, 17:04:12 PM
good to reply.. Thanks a lot
Title: Re: SH404SEF
Post by: amlil71 on September 21, 2012, 18:10:15 PM
Hello,

it's a very goog news.  I have the same difficults with sef urls since i uppgrade to virtuemart 2..





PS : Merci Alatak :) , je suis coincé depuis un mois sur ce problème ( hamid71 du forum joomla. fr).
     
Title: Re: SH404SEF
Post by: Ffragrances on October 08, 2012, 22:58:40 PM
SO now that I have went ahead and bought the latest SH404SEF over the joomsef component, because I thought that they have been so solid, and always on top of things. Now I find out that my sight relaunch will be delayed because of this???? WTF.. I guess I wil have to go pay out money to the folks at Joomsef now, because I cannot stand for any further delays.. This is just crazy. I wonder if SH404SEF folks will refund my money. I already tested Joomsef and it works fine, but I decided based off of past experience that I would stay with sh404SEF.. Now I wonder if I should have just went with the folks that are now on top of things.... Geez
Title: Re: SH404SEF
Post by: sandstorm on October 18, 2012, 13:36:19 PM
I'm in the same boat as last reply.

I have upgraded a VM1.19 site to vm2.0.12b  and upgraded it to J2.5.7
I have today installed SH404 3.6.2 and switched it on.

There is very little configuration for VM2 and it doesn't like pagination or ordering products.

When you order a product, say view 5 items on a page at once, it stores this URL and then whenever a user is in another category and orders to product to display 5 only , then they are refreshed to the stored URL.

VM1 & SH404 2.5, didn't work that well together and created a lot of duplicated links, but VM2 & SH404 3.6.2 seems even worse.


Has the work that Alatak has done and appears to have sent over to Yannick, been tested/implemented?  Or any ideas on when we can expect this?
I'm looking to upgrade a few VM 1 sites to VM2&J2.5 in the next few weeks/months and didn't really want to jump ship to JoomSEF
Title: Re: SH404SEF
Post by: sandstorm on October 18, 2012, 13:43:35 PM
If we cant get this working, does anybody know of a VM2 / SH404 plugin that will work? or is tried/tested?
Title: Re: SH404SEF
Post by: jjk on October 18, 2012, 20:28:07 PM
I don't know why the new sh404sef plugin supplied by the sh404sef folks doesn't work, because I never had a look at it. Why don't you just enable Joomla 2.5.7 SEF AND VM2 SEF (VM2 SEF requires J2.5.x SEF enabled to work properly) and get rid of all the SEF trouble. It works perfectly without any third party SEF plugin, which means a lot less trouble and extra work.
If it's just because you want to redirect your old urls, note that J2.5.x has it's own redirection manager.

...just my opinion  :)
Title: Re: SH404SEF
Post by: anthony on November 22, 2012, 02:45:16 AM
Bugger! I just renewed my SH404SEF subscription, only to then discover that VM2 won't play nice with it. I should have come here first.

J2.5 SEF does a nice job of the URLs, so I probably can survive just by skipping VM in the SH404SEF component configuration.
Title: Re: SH404SEF
Post by: franzpeter on November 26, 2012, 10:58:30 AM
What kind of adavantage has that SH404SEF? Using the standard Joomla SEF with Virtuemart does work without any problem. Did take a look in the page, where SH404SEF is offered. It rewrites url (Joomla does that too), it produces 404 pages and allows url rewrite (Joomla does that too), it uses Google Analytics and displays the results in Joomla (I use Google analytics too and display the results on my google account page), so maybe a little advantage for SH404SEF.
So my opinion is: I prefer to use the Joomla default router. If Joomla receives an update, the Joomla developers take care about the router functions, while an external component can only get adapted some time after the Joomla update. That time between can be very bad for search engine results, if the external SEF component produces problems until receiving an update from the developer.
Just my opinion about external SEF components!
Title: Re: SH404SEF
Post by: StormIT on January 16, 2013, 14:44:05 PM
Is there any update on this do you know? Since the quote below was from September 5th 2012 and it's now 16th January 2013...

QuoteSep 5, 2012. For Virtuemart 2, we have created a new plugin that will ensure long-term compatibility as VM2+ grows. Simply put, we have future-proofed the sh404SEF plugin (though in doing so we have removed all the parameters that users of VM1.x might expect). It has been sent to the VM team for review 2 weeks back. We followed up a few days ago but still no word.
Title: Re: SH404SEF
Post by: anisimow on October 23, 2013, 21:18:47 PM
I've tried sh404SEF v4.1.0 with virtuemart v 2.0.22c . It's like compatible with virtuemart, but not completely. Manufacturer doesn't work at all, and product url is without category path.
Yannick Gaultier, I'm so sorry for ussing illegal it.  But I hope I can help a little. I've changed  virtuemart plugin in  components/com_sh404sef/sef_ext/com_virtuemart.php .
It  can show manufacturer and full path(with categories) to product page
I hope it helps somebody. Here my code

<?php
/**
 * sh404SEF - SEO extension for Joomla!
 *
 * @author      Yannick Gaultier
 * @copyright   (c) Yannick Gaultier 2012
 * @package     sh404sef
 * @license     http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @version     4.1.0.1559
 * @date 2013-04-25
 */

defined('_JEXEC') or die('Direct Access to this location is not allowed.');

if(!
class_exists(my_virtuemart_router)){
    class 
my_virtuemart_router{
        var 
$counter 0;
        public function 
getParentProductcategory($id){

                
$virtuemart_category_id 0;
                
$db JFactory::getDBO();
                
$query 'SELECT `product_parent_id` FROM `#__virtuemart_products`  ' .
                        
' WHERE `virtuemart_product_id` = ' . (int) $id;
                
$db->setQuery($query);
                
/* If product is child then get parent category ID*/
                
if (!$parent_id $db->loadResult()) {
                    
$parent_id $id;
                }
                        
$query 'SELECT `virtuemart_category_id` FROM `#__virtuemart_product_categories`  ' .
                                
' WHERE `virtuemart_product_id` = ' $parent_id;
                        
$db->setQuery($query);

                        
//When the child and parent id is the same, this creates a deadlock
                        //add $counter, dont allow more then 10 levels
                        
if (!$virtuemart_category_id $db->loadResult()){
                                
$this->counter++;
                                if(
$this->counter<10){
                                    
self::getParentProductcategory($parent_id) ;
                                }
                        }

                
$this->counter 0;
                return 
$virtuemart_category_id ;
        }
    }
}

// ------------------  standard plugin initialize function - don't change ---------------------------
$sefConfig = &Sh404sefFactory::getConfig();
$shLangName '';
$shLangIso '';
$title = array();
$shItemidString '';
$dosef shInitializePlugin($lang$shLangName$shLangIso$option);
if (
$dosef == false)
return;
// ------------------  standard plugin initialize function - don't change ---------------------------

$originalVars = empty($originalUri) ? $vars $originalUri->getQuery($asArray true);

if (
count($originalVars) == && !empty($originalVars['Itemid']) && !empty($originalVars['option']))
{
// use directly menu item
$item JFactory::getApplication()->getMenu()->getItem($originalVars['Itemid']);
if (!empty($item))
{
$query $item->query;
// // when limitstart is not set, VM2 fetches start from the session, instead
// of just assuming 0
if (!empty($query['view']) && $query['view'] == 'category')
{
if (!isset($query['limitstart']))
{
$limitstart 0;
shAddToGETVarsList('limitstart'$limitstart);
shRemoveFromGETVarsList('limitstart');
}
}
ShlSystem_Log::debug('sh404sef''Inside com_virtuemart.php, building url from menu item route');
$title = array($item->route);
}
}

if (empty(
$title))
{
ShlSystem_Log::debug('sh404sef''Loading component own router.php file from inside com_virtuemart.php');
$functionName ucfirst(str_replace('com_'''$option)) . 'BuildRoute';
if (!function_exists($functionName))
{
include(JPATH_ROOT '/components/' $option '/router.php');
}
$helper vmrouterHelper::getInstance($originalVars);        
$menuItem $helper->menuVmitems;
$shopName = empty($menuItem) ? 'vm' $menuItem[0]->alias;

// check for shop root url, else normal routing
if (!empty($originalVars['view']) && $originalVars['view'] == 'virtuemart')
{

// if VM is homepage, then that's fine
if (!shIsAnyHomepage($string))
{
// else use menu item alias as slug
$title[] = $shopName;
unset($originalVars['view']);
}

}
else
{
// various checks as VM2 seem to produce funky non-sef urls
if (!empty($originalVars['view']) && $originalVars['view'] == 'productdetails')
{
if (empty($originalVars['virtuemart_product_id']))
{
// request for product details, but product id is 0
return;
}
}

// when limitstart is not set, VM2 fetches start from the session, instead
// of just assuming 0
if (!empty($originalVars['view']) && ($originalVars['view'] == 'category' || $originalVars['view'] == 'manufacturer'))
{
if (!isset($originalVars['limitstart']))
{
$limitstart 0;
shAddToGETVarsList('limitstart'$limitstart);
shRemoveFromGETVarsList('limitstart');
// router.php expects this to be start, not limitstart
$originalVars['start'] = $limitstart;
}
else
{
$originalVars['start'] = $originalVars['limitstart'];
unset($originalVars['limitstart']);
}
}

$hasCategoryId = !empty($originalVars['view']) && $originalVars['view'] == 'category' && (!empty($originalVars['virtuemart_category_id']) || $originalVars['virtuemart_category_id'] == 0);
                
$hasManufacturerId = !empty($originalVars['view']) && $originalVars['view'] == 'manufacturer' && (!empty($originalVars['virtuemart_manufacturer_id']) || $originalVars['virtuemart_manufacturer_id'] == 0);
$hasProductPage = !empty($originalVars['view']) && $originalVars['view'] == 'productdetails' && (!empty($originalVars['virtuemart_product_id']) || $originalVars['virtuemart_product_id'] == 0);
                
$originalUrl $originalUri->get('_uri');
$nonSefItemid shGetURLVar($originalUrl'Itemid');

// have router.php build url
$title $functionName($originalVars);

// VM router set the Itemid for category links!!!!
// instead of doing the routing
if ($hasCategoryId)
{
// if no Itemid in the original non-sef url, but we have one now
if (empty($nonSefItemid) && empty($vars['Itemid']))
{
$validItemid = empty($helper->menu['virtuemart_category_id'][$vars['virtuemart_category_id']]) ? 0
$helper->menu['virtuemart_category_id'][$vars['virtuemart_category_id']];
}
else
{
$validItemid = empty($vars['Itemid']) ? $vars['Itemid'];
}

if (!empty($validItemid))
{
// we now use the calculated Itemid, either the original one
// or the one that was swapped in by Virtuemart router.php
$Itemid $validItemid;
$vars['Itemid'] = $validItemid;
$originalUri->setVar('Itemid'$validItemid);
shAddToGETVarsList('Itemid'$validItemid);

$item JFactory::getApplication()->getMenu()->getItem($validItemid);
if (!empty($item))
{
$menuRoute $item->route;
// now we have to either insert the menuRoute at the beginning of
// what was returned by Virtuemart router.php, or replace it entirely.
if (empty($title))
// router.php returned nothing, use menu item alias
$title = array($menuRoute);
}
else
// router.php returned a title[] for that non-sef
if (empty($nonSefItemid) && !empty($vars['Itemid']))
{
// there was no itemid in non-sef, but router.php or ourselves found one
// drop the title[] returned by router
$title = array($menuRoute);
}
else if (!empty($nonSefItemid) && !empty($vars['Itemid']) && $vars['Itemid'] != $nonSefItemid)
{
// there was an Itemid in non-sef, but router.php or ourselves changed it: use the new one
// and drop the title[] returned by router
$title = array($menuRoute);
}
else
{
// general use case: Itemid was not modified
array_unshift($title$menuRoute);
}
}
}
}

}
                
// VM router set the Itemid for category links!!!!
// instead of doing the routing
                
elseif ($hasManufacturerId) {
                    
                    
                        
// if no Itemid in the original non-sef url, but we have one now
if (empty($nonSefItemid) && empty($vars['Itemid']) )
{
$validItemid = empty($helper->menu['virtuemart_manufacturer_id'][$vars['virtuemart_manufacturer_id']]) ? 0
$helper->menu['virtuemart_manufacturer_id'][$vars['virtuemart_manufacturer_id']];
}
else
{
$validItemid = empty($vars['Itemid']) ? $vars['Itemid'];
}

if (!empty($validItemid))
{
// we now use the calculated Itemid, either the original one
// or the one that was swapped in by Virtuemart router.php
$Itemid $validItemid;
$vars['Itemid'] = $validItemid;
$originalUri->setVar('Itemid'$validItemid);
shAddToGETVarsList('Itemid'$validItemid);

$item JFactory::getApplication()->getMenu()->getItem($validItemid);
if (!empty($item))
{
$menuRoute $item->route;
// now we have to either insert the menuRoute at the beginning of
// what was returned by Virtuemart router.php, or replace it entirely.
if (empty($title))
// router.php returned nothing, use menu item alias
$title = array($menuRoute);
}
else
// router.php returned a title[] for that non-sef
if (empty($nonSefItemid) && !empty($vars['Itemid']))
{
// there was no itemid in non-sef, but router.php or ourselves found one
// drop the title[] returned by router
$title = array($menuRoute);
}
else if (!empty($nonSefItemid) && !empty($vars['Itemid']) && $vars['Itemid'] != $nonSefItemid)
{
// there was an Itemid in non-sef, but router.php or ourselves changed it: use the new one
// and drop the title[] returned by router
$title = array($menuRoute);
}
else
{
// general use case: Itemid was not modified
array_unshift($title$menuRoute);
}
}
}
}
                    
                }elseif(
$hasProductPage){
// if no Itemid in the original non-sef url, but we have one now
                        
$validItemid 0;
if (empty($nonSefItemid) && empty($vars['Itemid']))
{
$validItemid = empty($helper->menu['virtuemart_product_id'][$vars['virtuemart_product_id']]) ? 0
$helper->menu['virtuemart_product_id'][$vars['virtuemart_product_id']];
}

                        
//get item id of category
                        
if(empty($validItemid)){

                                        
$my_virtuemart_router = new my_virtuemart_router();
                                        
$virtuemart_category_id $my_virtuemart_router->getParentProductcategory($vars['virtuemart_product_id']);
                                        if(!empty(
$virtuemart_category_id))
                                            
$vars['virtuemart_category_id'] = $virtuemart_category_id;
                                        
if(!empty( $vars['virtuemart_category_id'])){
$categoryRoute $helper->getCategoryRoute($vars['virtuemart_category_id']);
//if ($categoryRoute->route) $segments[] = $categoryRoute->route;
if ($categoryRoute->itemId$vars['Itemid'] = $categoryRoute->itemId;
}
                                
                                
$validItemid = empty($vars['Itemid']) ? $vars['Itemid'];
                        }
if (!empty($validItemid))
{
// we now use the calculated Itemid, either the original one
// or the one that was swapped in by Virtuemart router.php
//$Itemid = $validItemid;
//$vars['Itemid'] = $validItemid;
//$originalUri->setVar('Itemid', $validItemid);
//shAddToGETVarsList('Itemid', $validItemid);

$item JFactory::getApplication()->getMenu()->getItem($validItemid);
if (!empty($item))
{
$menuRoute $item->route;
// now we have to either insert the menuRoute at the beginning of
// what was returned by Virtuemart router.php, or replace it entirely.
if (empty($title))
// router.php returned nothing, use menu item alias
$title = array($menuRoute);
}
else
// router.php returned a title[] for that non-sef
if (empty($nonSefItemid) && !empty($validItemid))
{
// there was no itemid in non-sef, but router.php or ourselves found one
// drop the title[] returned by router
array_unshift($title$menuRoute);
}
else if (!empty($nonSefItemid) && !empty($validItemid) && $validItemid != $nonSefItemid)
{
// there was an Itemid in non-sef, but router.php or ourselves changed it: use the new one
// and drop the title[] returned by router
$title = array($menuRoute);
}
else
{
// general use case: Itemid was not modified
array_unshift($title$menuRoute);
}
}
}
                        }
                        
                }
            

}
}

if (!empty(
$title))
{
// add shop menu item, if asked to
if ($sefConfig->shVmInsertShopName)
{
array_unshift($title$shopName);
}

// add user defined prefix
$prefix shGetComponentPrefix($option);
if (!empty($prefix))
{
array_unshift($title$prefix);
}
        
$title = empty($title) ? $title $pageInfo->router->encodeSegments($title);
        if (!empty(
$sefConfig->suffix)) {
            
$title[count($title)-1] .= $sefConfig->suffix;
}
}

// manage GET var lists ourselves, as Joomla router.php does not do it
if (!empty($vars))
{
// there are some unused GET vars, we must transfer them to our mechanism, so
// that they are eventually appended to the sef url
foreach ($vars as $k => $v)
{
switch ($k)
{
case 'option':
case 'Itemid':
case 'lang':
shRemoveFromGETVarsList($k);
break;
default:
// if variable has not been used in sef url, add it to list of variables to be
// appended to the url as query string elements
if (array_key_exists($k$originalVars))
{
shAddToGETVarsList($k$v);
}
else
{
shRemoveFromGETVarsList($k);
}
break;
}
}
}

// ------------------  standard plugin finalize function - don't change ---------------------------
if ($dosef)
{
$string shFinalizePlugin($string$title$shAppendString$shItemidString, (isset($limit) ? $limit null),
(isset($limitstart) ? $limitstart null), (isset($shLangName) ? $shLangName null), (isset($showall) ? $showall null),
$suppressPagination true);
}
// ------------------  standard plugin finalize function - don't change ---------------------------


Title: Re: SH404SEF
Post by: mhuebler on November 16, 2013, 00:03:26 AM
hello anisimow,

is there now options of the sh404sef virtuemart plugin to customize the vm urls.
i want exactly the same urls like my vm1.x and sh404sef 2.x
Title: Re: SH404SEF
Post by: anisimow on November 20, 2013, 14:20:01 PM
Quote from: mhuebler on November 16, 2013, 00:03:26 AM
is there now options of the sh404sef virtuemart plugin to customize the vm urls.
i want exactly the same urls like my vm1.x and sh404sef 2.x
There'is no options. In common, plugin use standart virtuemart router with a little changes.
But you can program it there like you need.
Title: Re: SH404SEF
Post by: mhuebler on March 18, 2014, 00:29:18 AM
after a lot of years i used sh404sef for j1.5 vm1 .. now i use artio joomsef for j2.5 vm2 .. it gives you all the options to configure your own virtuemart urls ;-)
Title: Re: SH404SEF
Post by: jux on June 20, 2014, 11:12:03 AM
it is very sad to see that SH404sef team does not want to work on a VM plugin , most users are going to leave their extension for other one like artio joomsef that is now compatible with VM 2
Title: Re: SH404SEF
Post by: GJC Web Design on June 20, 2014, 12:04:31 PM
Why are you even wanting a SEF component? - total bloatware -
have seen so many sites with broken carts, 404's, massive load times - all because of 3rd party sef components

they are totally un-nesscesary - a monster from the 90's  - both Joomla and VM have full sef native capibility

do yourself a favour and loose all sef components -
Title: Re: SH404SEF
Post by: jux on June 23, 2014, 18:45:31 PM
Since I have desactivated Sh404sef 4 months ago all my ranking have been downgrade in google

So i dont think you are right about what you are saying , the Default SEO of Virtuemart 2 does not look so good

Even when im posting a product first all my competitor are in the first page and me on the 4th page is that normal?

with Sh404sef i never had this issue
Title: Re: SH404SEF
Post by: jjk on June 23, 2014, 19:11:21 PM
Quote from: juliengrano on June 23, 2014, 18:45:31 PM
the Default SEO of Virtuemart 2 does not look so good

What is the difference if you compare the generated source code of a product details page from your old shop with sh404sef and your current one without it? Different urls? Different meta tags? In case your new urls are different from the old ones, did you let Google know that the old ones are permanently moved (301 redirect)?
Title: Re: SH404SEF
Post by: AH on June 23, 2014, 19:38:39 PM
301 redirect!!

The url structure should not imapct from page 1 to 4
Title: Re: SH404SEF
Post by: ITechnoDev on July 14, 2014, 18:08:52 PM
Here is the last update from their forums  (http://anything-digital.com/forum/extension/sh404sef/10031-virtuemart-and-sh404sef-one-day-is-going-to-be-compatible.html?p=1#p60369):

QuoteWe have made a concerted effort to encourage extension developers to build sh404SEF support  into their extensions. JCal Pro, RedShop, K2 and EasyBlog are notable examples.

While we do maintain some plugins internally, Kunena and Virtuemart have designed routing methods that allows full speed url constructions, something a separate extension cannot do as it will have to make more use of database to build the url. So instead of doing things that slower way, we have decided to enter a partnership with Kunena and Virtuemart by which we'll directly use their router. For now, they don't allow tailoring the urls, but that will come in the future, at least for Virtuermart, and we'll integrate that in due time.

This approach also has the added benefit to be "future-proof", as any change in url design by those extension will be automatically taken into account by sh404SEF without the need for an upgrade, meaning that Kunena/VM upgrades will never break sh404SEF or vice versa.

The downside is that we had to remove the ability to customize the URLs in a manner similar to previous versions, but again, this will come to VM and probably Kunena, just like RedShop or K2 have dedicated sh404SEF url customization right now.

We hope you understand the reasons for this change apologize for any inconvenience.

Rgds