VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: SenecaPharm on August 08, 2008, 17:19:06 PM

Title: Virtuemart - Sh404sef menu problem
Post by: SenecaPharm on August 08, 2008, 17:19:06 PM
With Sh404sef enabled, Most of the Virtuemart menus (like jscook and tigra tree) have an error when you click on them from a Joomla page other than the home page. For example, I click on Weblinks from the main menu which take me to www.mysite.com/weblinks I then click on the virtuemart catagory menu from there and it takes me to www.mysite.com/weblinks/catagory, So it inserts the item into URL. Trouble is, I don't know whether it's a Virtuemart problem or a Sh404sef problem. I've tried all the configurations in Sh404sef and nothing seems to work. This only happens with the Virtuemart menu. (Note, this problem doesn't occur when the link list style menu is enabled in the Virtuemart menu options.)
Title: Re: Virtuemart - Sh404sef menu problem
Post by: SenecaPharm on August 09, 2008, 01:54:54 AM
Update: Same problem when adding to cart, although not when you click 'Cart'. Only if you wait and then click show cart on the Cart module, if you haven't refreshed the page. It'll add the product URL to the non sef URL of the Cart. If you refresh the page or click somewhere else and then click on show cart from the module, it'll take you to the cart. Can somebody confirm this? I turned cache off and cleared it but no effect.
Title: Re: Virtuemart - Sh404sef menu problem
Post by: laurie_lewis on September 11, 2008, 08:30:42 AM
Hi SenecaPharm,

Yes, I am having the same problem with the JS Cook menu when I turn sh404sef on. 

Have you heard any way to fix this problem as yet.  My searches today have turned up nothing. :-\ :-\

All the best,
Title: Re: Virtuemart - Sh404sef menu problem
Post by: SenecaPharm on September 17, 2008, 16:42:00 PM
No fixes that I've heard of, the only way around it for me is my make my own menu or customize another one manually through Joomla's menu manager.
Title: Re: Virtuemart - Sh404sef menu problem
Post by: asamm on October 10, 2008, 00:17:55 AM
I am having the same problem, any help? pleas
Title: Re: Virtuemart - Sh404sef menu problem
Post by: q-styler on February 10, 2009, 19:12:38 PM
Okay guys.
Now we're going to edit the file named "vm_JSCook.php"
For that we're going to "/modules/mod_virtuemart/" folder of your joomla installation.

In that file find the line #81 (or so) with the following code:

$mymenu_content.= "\n[ '<img src=\"' + ctThemeXPBase + 'darrow.png\" alt=\"arr\" />','".$db->f("category_name",false)."','".sefRelToAbs('index.php?option=com_virtuemart&page=shop.browse&category_id='.$db->f("category_id").$itemid)."',null,'".$db->f("category_name",false)."'\n ";

And now we're going to change that line to
$mymenu_content.= "\n[ '<img src=\"' + ctThemeXPBase + 'darrow.png\" alt=\"arr\" />','".$db->f("category_name",false)."','".$sess->url(URL.'index.php?option=com_virtuemart&page=shop.browse&category_id='.$db->f("category_id").$itemid)."',null,'".$db->f("category_name",false)."'\n ";

We've just changed "sefRelToAbs" to "$sess->url".

I don't how and why but it works.

Bon Appetit.
Title: Re: Virtuemart - Sh404sef menu problem
Post by: koltz on March 09, 2009, 03:19:44 AM
Thanks for the post on this, didn't seem to work for me.  Anybody else?
Title: Re: Virtuemart - Sh404sef menu problem
Post by: PATSXM971 on April 12, 2009, 13:37:10 PM
hello,

I have a problem with arrows not showing up in the JS Cook menu since I have activated sh404SEF.

it is said that an absolute url would solve the problem and I have copied the one given above into the right file at the right place, but it was not successfull.

still no solution on the french joomla ecommerce or sh404 forums.

So, if anyone...

Thk u

Title: Re: Virtuemart - Sh404sef menu problem
Post by: RobertL on June 12, 2009, 23:00:27 PM
Hi,

I've been having the same issue for a year. Still not resolved. q-styler's fix didn't work for me either, but it gave me an idea. It's not perfect, but running with or without SEF url's can be detrminetal, so it's a compromise, passable (at least to me) till someone fixes it properly.

Original code:
Quote
$mymenu_content.= "\n[ '<img src=\"' + ctThemeXPBase + 'darrow.png\" alt=\"arr\" />','".$db->f("category_name",false)."','".sefRelToAbs('index.php?option=com_virtuemart&page=shop.browse&category_id='.$db->f("category_id").$itemid)."',null,'".$db->f("category_name",false)."'\n ";

New code:
Quote
$mymenu_content.= "\n[ '<img src=\"' + ctThemeXPBase + 'darrow.png\" alt=\">\" />','".$db->f("category_name",false)."','".sefRelToAbs('index.php?option=com_virtuemart&page=shop.browse&category_id='.$db->f("category_id").$itemid)."',null,'".$db->f("category_name",false)."'\n ";

In other words, you simply replace arr with >. It doesn't fix anything, but at least it makes JSCook menu look consistent enough.
Title: Re: Virtuemart - Sh404sef menu problem
Post by: teddyruxpin2000 on January 05, 2010, 00:02:58 AM
Here's what I had to do to make the JSCook menu work with sh404sef:

1. Edit all relative paths in vm_JScook.php to absolute paths.  There should be 3 places you will need to change the paths in the file.  I'm attaching a modified file with the necessary changes.  All you'll need to do is perform a find/replace for "http://www.yourURLhere.com" and replace this with your absolute site path, then upload the modified vm_JSCook.php to modules/mod_virtuemart and overwrite the old one (be sure to backup the original in case something goes wrong for you.)

2. Be sure you've configured sh404sef to do 301 redirects from non-sef to sef URLs in the sh404sef configuration.

With these changes, the menu is working perfectly for me.

Hope this helps,
Paul
http://www.pepwebsolutions.com

[attachment cleanup by admin]
Title: Re: Virtuemart - Sh404sef menu problem
Post by: Atti on July 04, 2010, 21:16:31 PM
hi teddy,
the solution is awesome...thnx very much :)
Title: Re: Virtuemart - Sh404sef menu problem
Post by: kts on January 12, 2011, 23:22:06 PM
Thank you so much for this... I'm very grateful.