Wrong url - cart - missing Item ID

GK User
Wed May 01, 2013 11:48 am
Hello,

my Template is NOT working with this cart ... shows just the standard Cart ...Whats wrong?

HM... if i klick on the Cart Symbol (in Cart Position) i have the right one. But not after buying items in the shop ..

This is the link after klicking on the cart symbol: https://kanoon-music.com/index.php?opti ... 03&lang=de

and this after adding a item to the cart: https://kanoon-music.com/index.php?opti ... rt&lang=de

so the item ID is missing ...

How to fix this???
User avatar
Expert Boarder

teitbite
Thu May 02, 2013 1:14 pm
Hi

Please tell me the url to the product I can put in cart and check it. I've been in Your panel and everything looks ok there. Send me also an ftp so I'll add ItemID manually if there will be no other option.
User avatar
Moderator

GK User
Thu May 02, 2013 4:09 pm
i sent you an eMail ..
User avatar
Expert Boarder

teitbite
Fri May 03, 2013 3:00 pm
Hi

What I meant is an url to product I can add to cart, I need to see where is a link, which You need to click to be redirected to wrong page. I've tried once again and could not find a product with Add To Cart at all. Can You show me such page ?

The other thing we have discussed by mail is finished.
User avatar
Moderator

teitbite
Fri May 03, 2013 5:57 pm
Hi

There is no itemid mentioned in code when creating this link, but it's using joomla's JRoute which should locate a correct page. I had to add this attribute manually in /components/com_virtuemart/controllers/cart.php line 118:

Code: Select all
$this->json->msg .= '<a class="showcart floatright" href="' . JRoute::_("index.php?option=com_virtuemart&view=cart") . '">' . JText::_('COM_VIRTUEMART_CART_SHOW_MODAL') . '</a>';


and replaced it to:

Code: Select all
$this->json->msg .= '<a class="showcart floatright" href="' . JRoute::_("index.php?option=com_virtuemart&view=cart&Itemid=803") . '">' . JText::_('COM_VIRTUEMART_CART_SHOW_MODAL') . '</a>';


Unfortunately this is a short term solution, because this file will be overwritten during VM update.
User avatar
Moderator

GK User
Sat May 04, 2013 7:47 am
He yes this works, but ... after updating/deleting items in the cart ill be redirected to the wrong template ..
User avatar
Expert Boarder

teitbite
Sat May 04, 2013 11:44 am
Hi

I have just checked different websites with VM I've done and Itemid is not being attached in none of them when entering cart, so I believe it's a VM fault for now thinking about the case that someone may use a different template for VM only. Try changing VM template to default and than the second template attach to rest of pages.
User avatar
Moderator

GK User
Fri May 10, 2013 11:54 am
HI,

all the problems with the ITEM ID are depending on SEF "off" Settings. The VM Team gave me this TIP :-) Thanks Max! Good Tip!

PS: Can you contact me reg, the Template customizing ..

Cheers Jörg
User avatar
Expert Boarder

teitbite
Fri May 10, 2013 5:19 pm
Hi

I've seen in cart.php code that it's being dependable on function JRoute, so it's joomla which should looks for proper Itemid. But I cannot imagine how disabling SEF can help with this problem.

Sorry I got caught but some old client whose site was hacked and messed up my whole schedule. Will answer Your mail asap.
User avatar
Moderator

GK User
Fri May 10, 2013 5:37 pm
not DISABLING SEF - we´ve ENABLED it ...

Look foreward to your eMail
User avatar
Expert Boarder

teitbite
Sat May 11, 2013 5:21 pm
Hi

I've just finished making the category layout style as requested and send You a mail. I think we can continue disscussion by mail. Just writing here to be sure You got it.
User avatar
Moderator


cron