VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: CZDave on December 30, 2011, 22:00:58 PM

Title: Itemid missing in some URLs
Post by: CZDave on December 30, 2011, 22:00:58 PM
Hi,

I've noticed that some URLs in VirtueMart 2.0.0 don't contain the Itemid variable, which causes problems with modules visibility and SEF URLs creation in some cases, because menu item is not recognized correctly. This happens when clicking the Add to cart button on product details page, the popup is displayed with Continue shopping and Show cart links - both miss the Itemid variable (file components/com_virtuemart/controllers/cart.php in function addJS()).
I use Joomla 1.5.25.
Title: Re: Itemid missing in some URLs
Post by: alex-corp on January 21, 2012, 20:35:42 PM
Hello!
I have this problem too.
Could you help solve it, please?
Title: Re: Itemid missing in some URLs
Post by: Zuske on March 16, 2012, 01:10:58 AM
i have the same problem, the modules dont show up, after clicking on continue shopping in the ajax popup box
Title: Re: Itemid missing in some URLs
Post by: Zuske on March 17, 2012, 14:16:39 PM
i resolved it, by adjusting my continue link like this: in controllers/cart.php line 115

$categoryLink = '&view=categories&virtuemart_category_id=0&Itemid=118&'

For your site you have to find the itemid that is correct, first.
i have to put the "&" at the end, otherwise it wont call the item id.
but i have to give id values otherwise i dont no how to call the modules. this prolly not the right way to call the item variable, but hey, i dont know better.

same goes for goes for the view cart link:
on line 124 i did put: "&Itemid=118&" behind the route, so i get this: JRoute::_("index.php?option=com_virtuemart&view=cart&Itemid=118&")
Title: Re: Itemid missing in some URLs
Post by: Zuske on June 29, 2012, 23:26:18 PM
bumb, modules not loading, due to wrong links in facebox is still an issue in .2.0.6,

did this issue get adressed in .8?
Title: Re: Itemid missing in some URLs
Post by: Zuske on July 03, 2012, 18:54:21 PM
in the new update 2.0.8

the new back to category button, on the product detail page,  doesnt load the modules on the category page, like search module, shopping cart module, language select module, etc..  same story as above other link.
Title: Re: Itemid missing in some URLs
Post by: Zuske on July 03, 2012, 19:16:25 PM
also the link from product category page to the product detail page, is causing the module to disapear.

see the difference between the links to see what i am talking about, when i click on the product details button.

http://www.mongolianlife.com/en/winkel/boots

http://www.mongolianlife.com/en/component/virtuemart/boots/boot-for-ladies-and-gentlemen-gobi-detail?Itemid=0

what do i have change do in the url for the modules to load? :o
Title: Re: Itemid missing in some URLs
Post by: alatak on July 04, 2012, 17:14:45 PM
Hello,

Yes it is true, the Itemid is missing in the links, when the SEF is not activated.
If you activate the SEF, the problem is solved.

Title: Re: Itemid missing in some URLs
Post by: Zuske on July 06, 2012, 17:53:39 PM
thx for your reply alatak,

my sef was already activated. But i fixed it. My problem turned out to be a wrong menu item. I don't know exactly know what the problem was. But i deleted the menu module.
Made a new menu and menu item, linked vm2.0 to it. After that i didnt have the problem with the modules anymore.

Title: Re: Itemid missing in some URLs
Post by: alatak on July 07, 2012, 11:35:11 AM
Hello,

We will solve the problem of the Itemid when SEF is not activated later.
Title: Re: Itemid missing in some URLs
Post by: ido_p on June 26, 2013, 00:46:21 AM
hi,
My homepage is not assigned to virtuemart but to an article page.
As a result the links that do not have an itemid assigned to them direct to the homepage instead of the itemid assigned to virtuemart.
In vm 1.5 this was managed by function getShopItemid() in administrator/components/com_virtuemart/classes/ps_session.php
In vm 2 I do not know where this is done?
Can you please help?
Thank you,
Ido
Title: Re: Itemid missing in some URLs
Post by: Milbo on June 26, 2013, 01:18:01 AM
I think you mean vm1.1, vm1.5 existed only as beta. The file is now the router.php in the FE, joomla convention. If you have enhancements, please post them in the snippet subsection
Title: Re: Itemid missing in some URLs
Post by: Zanato on July 24, 2013, 22:12:20 PM
Quote from: alatak on July 04, 2012, 17:14:45 PM
Yes it is true, the Itemid is missing in the links, when the SEF is not activated.
If you activate the SEF, the problem is solved.

:( Pity I didn't see this post two hours ago. Would have saved me a lot of head scratching.

Quote from: alatak on July 04, 2012, 17:14:45 PMWe will solve the problem of the Itemid when SEF is not activated later.

I'm on version 2.0.20b and still not solved.
Title: Re: Itemid missing in some URLs
Post by: zagloj on July 29, 2013, 10:17:14 AM
 Hi, I have activated SEF in VM 2.0.22a and it does not show itemid in the url. I will explain, it only shows correctly the link when you are viewing a VM page, if you are reading a Joomla article, or another non VM thing, the link is as this: http://mandarinacat.com/index.php?option=com_virtuemart&view=cart , which leads to blank page.

I do not have any clue about how to fix this, any help would be appreciated.

Thanks to all the VM dev team for this work.