News:

Support the VirtueMart project and become a member

Main Menu

Virtuemart - Sh404sef menu problem

Started by SenecaPharm, August 08, 2008, 17:19:06 PM

Previous topic - Next topic

SenecaPharm

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.)

SenecaPharm

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.

laurie_lewis

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,

SenecaPharm

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.

asamm

#4
I am having the same problem, any help? pleas

q-styler

#5
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.

koltz

Thanks for the post on this, didn't seem to work for me.  Anybody else?

PATSXM971

#7
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


RobertL

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.

teddyruxpin2000

#9
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]

Atti

hi teddy,
the solution is awesome...thnx very much :)

kts

Thank you so much for this... I'm very grateful.