Author Topic: Virtuemart - Sh404sef menu problem  (Read 19239 times)

SenecaPharm

  • Beginner
  • *
  • Posts: 27
    • Golf Training Aids
Virtuemart - Sh404sef menu problem
« 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.)

SenecaPharm

  • Beginner
  • *
  • Posts: 27
    • Golf Training Aids
Re: Virtuemart - Sh404sef menu problem
« Reply #1 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.

laurie_lewis

  • Jr. Member
  • **
  • Posts: 211
Re: Virtuemart - Sh404sef menu problem
« Reply #2 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,

SenecaPharm

  • Beginner
  • *
  • Posts: 27
    • Golf Training Aids
Re: Virtuemart - Sh404sef menu problem
« Reply #3 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.

asamm

  • Beginner
  • *
  • Posts: 7
Re: Virtuemart - Sh404sef menu problem
« Reply #4 on: October 10, 2008, 00:17:55 am »
I am having the same problem, any help? pleas

q-styler

  • Beginner
  • *
  • Posts: 22
Re: Virtuemart - Sh404sef menu problem
« Reply #5 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:

Code: [Select]
$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
Code: [Select]
$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

  • Jr. Member
  • **
  • Posts: 301
Re: Virtuemart - Sh404sef menu problem
« Reply #6 on: March 09, 2009, 03:19:44 am »
Thanks for the post on this, didn't seem to work for me.  Anybody else?

PATSXM971

  • Beginner
  • *
  • Posts: 20
    • Web Ti Market
Re: Virtuemart - Sh404sef menu problem
« Reply #7 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


RobertL

  • Beginner
  • *
  • Posts: 44
Re: Virtuemart - Sh404sef menu problem
« Reply #8 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.

teddyruxpin2000

  • Beginner
  • *
  • Posts: 3
Re: Virtuemart - Sh404sef menu problem
« Reply #9 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]

Atti

  • Beginner
  • *
  • Posts: 43
Re: Virtuemart - Sh404sef menu problem
« Reply #10 on: July 04, 2010, 21:16:31 pm »
hi teddy,
the solution is awesome...thnx very much :)

kts

  • Beginner
  • *
  • Posts: 13
Re: Virtuemart - Sh404sef menu problem
« Reply #11 on: January 12, 2011, 23:22:06 pm »
Thank you so much for this... I'm very grateful.