VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: SnakeFFM on November 16, 2015, 11:40:56 AM

Title: Fancybox -> Add to Cart -> Hidden Moduls pop up
Post by: SnakeFFM on November 16, 2015, 11:40:56 AM
Joomla: 3.4.5
VM: VirtueMart 3.0.11.4

Hi guys,

I dont know if I made something wrong, but thats my issue:

I'd like to hide a lot of modules on my 'view=cart'. I Use seo-friendly urls.

Well, everything works perfect. However once I want to see the cart through fancybox 'show cart'. Then suddenyl all hidden moduls show up. If I do it through a menu link or through the menu link of the VM Cart Module, it works as expected.

I've noticed that the urls are different:

If I access the cart of a menu link or through the link of VM Cart, then it looks as stated: http://www.tradingcards4you.de/en/shopping-cart.html

If I go to the cart vaya the link of fancybox, the url looks like: http://www.tradingcards4you.de/index.php?option=com_virtuemart&view=cart&lang=en

Did I miss something? I tried the same with Protostar (standard layout) and had the same issue.

Thanks!

Best,
Snake
Title: Re: Fancyboy -> Add to Cart -> Hidden Moduls pop up
Post by: GJC Web Design on November 16, 2015, 13:23:47 PM
The sef link in the popup was afaik removed in 3.0.11 because it gave problems

I guess the solution is to add the cart menu Itemid to it..  &Itemid=xx

perhaps something like   $this->cart_link = $this->cart_link.'&Itemid=XX'; at the start of (over ride) components\com_virtuemart\views\cart\tmpl\padded.php ?

Fancyboy?   ;)   heard of Bottrop-Boy  but....   ;D
Title: Re: Fancybox -> Add to Cart -> Hidden Moduls pop up
Post by: SnakeFFM on November 16, 2015, 14:18:57 PM
Hey!

here is ur fancyboy  8)... it worked... the modules dont show up anymore...

Just because I am curious the url that is generated isnt seo-friendly anymore any chance to adjust the override to make it seo-friendly again?

For completness please see code below:


echo '<a class="continue_link" href="' . $this->continue_link . '" >' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
//echo '<a class="showcart floatright" href="' . $this->cart_link . '">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';
echo '<a class="showcart floatright" href="' . $this->cart_link = $this->cart_link.'&Itemid=143' . '">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';
Title: Re: Fancybox -> Add to Cart -> Hidden Moduls pop up
Post by: GJC Web Design on November 16, 2015, 14:45:16 PM
the SEF was removed for a reason....  it broke multilingual J3's I think

you can always try

JRoute::

echo '<a class="showcart floatright" href="' . JRoute::_($this->cart_link.'&Itemid=143)' . '">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';
Title: Re: Fancybox -> Add to Cart -> Hidden Moduls pop up
Post by: loppan on January 18, 2016, 18:14:47 PM
Thank you again GJC Web Design, I had the same problem and your solution works perfectly!

Joomla 3.4.8 & VM 3.0.12