News:

Support the VirtueMart project and become a member

Main Menu

SEF URL Menu and Sub Category Errors

Started by peteward15, April 22, 2015, 16:44:33 PM

Previous topic - Next topic

peteward15

HI All

I'm working on a site using VM 3.0.6.2 and we have a strange error.

On the main drop down menu we can click some categories and teh flyout menu allows us to select a sub category and the URL is as it should be for example:  www.ourdomain.com/parentmenuname/categoryname/subcategoryname

We can click that and correctly view the products in the sub catgory.

However if we click on the main menu the category we arrive at the VM category page with the URL:  www.ourdomain.com/parentmenuname/categoryname

And we can see our subcategories here.  And here is the problem.  On some subcategories the sub category URL isn't as it should be it changes to: www.ourdomainname.com/component/virtuemart/?Itemid=116  (or some other random number) and naturally this doesn't send us to the correct location.

To complicate the problem it doesn't seem to happen every time you click it seems to be fairly random.

Any help or assistance anyone could shine on this would be greatly appreciated,

Cheers


Studio 42

Hi,
First : try disabling your Joomla cache and clear the joomla cache.
If you have a multilanguage shop, please verify your categoy exist in all languages.
If the module is not from virtuemart then contact the module author, perhaps he have made a mistake in the code.

Greets,

Patrick

peteward15

#2
Thanks Patrick.  I have tried the cache already.

"If the module is not from virtuemart then contact the module author, perhaps he have made a mistake in the code." - What module do you mean? 

When you click the category surely you are then viewing the virtuemart subcategory view?

Studio 42

When you get this link ? www.ourdomainname.com/component/virtuemart/?Itemid=116
this can come when the route is not set, then you have to know in wich case you get this.
On clicking in the category module,
on clicking the categories page
in the product
.... ?

peteward15

We get that link when we have clicked a top level category and reached the sub category display screen.  It is by clicking on the sub category from here which sometimes links to that link.

Studio 42

hi,
Try the default joomla template. to know if this problem is not from your template

peteward15

I today tested the site using the default Beez and Protostar templates and the exact same problem occurs!!!  How frustrating!  Do you have any other ideas?

peteward15

#7
Still struggling with this.  Just to recap I am running VM 3.0.6.2 and Joomla 3.3.6 - somebody on another forum told me that the two aren't compatible and this could be the cause of my problem.  Is this true?!?!?!

Any advice would be welcome!


Studio 42

Try to disable sef rewriting and 3party sef, if you use one.

GJC Web Design

1.
QuoteI am running VM 3.0.6.2 and Joomla 3.3.6 - somebody on another forum told me that the two aren't compatible and this could be the cause of my problem.  Is this true?!?!?!

wrong - rubbish

2.
Quotewww.ourdomainname.com/component/virtuemart/?Itemid=116

this means that somewhere in your install is a menu already set to this cat -- it has the Itemid of 116

look thru ALL your menu items (inc. trash and unpublished)  looking for this id number  (last column)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

erhabe

I also have a problem like this

VM 3.0.8 and J 3.4.1

I have set menus for category and submenus for each manufacturer .When i click on a product the manufacturer name is same .

http://test.sportmaniax.ro/ro/off-road

I created menus for subcategory ATV and submenus for each manufacturer from ATV.

http://test.sportmaniax.ro/ro/off-road/atv/arctic-cat

http://test.sportmaniax.ro/ro/off-road/atv/can-am

and so on.....

When i go on
http://test.sportmaniax.ro/ro/off-road/atv/arctic-cat

and click on a product the link is gonna be
http://test.sportmaniax.ro/ro/off-road/atv/yamaha/700-diesel-trv-3in1-eft-detail

instead

http://test.sportmaniax.ro/ro/off-road/atv/arctic-cat/700-diesel-trv-3in1-eft-detail

Studio 42

IF you are in a category or product, the menu (and menu id) is always set to the category or first parent category or to the main shop page.
The manufacturer is always the first subfolder after the menu link when you are in the category .
When you are in the product, the manufacturer is not set in the Url.
Because Max said, he don't  want change anythink for now in the router. i don't provide temp fixes. BUt simply search in front-end files the router.php for
Quotecase 'productdetails';
Youur new code is to enter here

erhabe

I looked at router.php but i dont want to eliminate the manufacturer name in product url.I just only want to take the proper manufacturer name instead on taking only one manufacturer for all products.

Studio 42

I think you have set so many overide in the menu, that the end result is bad.
I explained before how the link work. But you have added manufacturer in a menu> in a category. This case was never tested.

erhabe

#14
I unpublished the menu and let just 2 categorys....arctic cat and cf moto.

http://test.sportmaniax.ro/ro/arctic-cat
http://test.sportmaniax.ro/ro/cf-moto

The result is the same when i click on one product from arctic cat.....it takes the cf moto manufacturer name on url.
No more overrides only 2 menus with category and manufacturer set.

When i create menu i have 2 options to choose category and manufacturer.You say its bad to select both options?Only to select category or manuf?