Author Topic: sh404SEF + Virtuemart : "Show cart" => White page  (Read 2555 times)

Mister Paul

  • Jr. Member
  • **
  • Posts: 211
  • Joomla! 3.9.6 - VirtueMart 3.4.2
sh404SEF + Virtuemart : "Show cart" => White page
« on: July 13, 2011, 09:21:22 am »
Hi,

I use sh404SEF and I get a white page the first time I click on "Show cart"
http://localhost/category_in_virtuemart/name_of_product/index.php?page=shop.cart&option=com_virtuemart&Itemid=104
After reload, the link is valid :
http://localhost/View-your-cart-content.html

I have read somewhere else that it could be because the "index.php?page=shop.cart&option=com_virtuemart&Itemid=104" link is not an absolute link and it need to be rendered using the Jroute::_(''); function. or at last it need to get a " / " in front of it to make it absolute link.

I couldn't make it OK with Jroute::_(''); function or with a " / "  but I changed the link code in :
/administrator/components/com_virtuemart/html/shop.basket_short.php

I commented line 144 and took inspiration from the following line with $href2.
It seems to work OK but as I don't know exactly what means that code, I am not sure that there is not any colateral damage...  :o
Code: [Select]
// $href = $sess->url($mm_action_url."index.php?page=shop.cart");
$href = $sess->url($mm_action_url."index.php?page=shop.cart", true);
$text = $VM_LANG->_('PHPSHOP_CART_SHOW');
$href2 = $sess->url($mm_action_url."index2.php?page=shop.cart", true);

Any Guru to help me ?
 ::)

Thanks
PAul

Mister Paul

  • Jr. Member
  • **
  • Posts: 211
  • Joomla! 3.9.6 - VirtueMart 3.4.2
Re: sh404SEF + Virtuemart : "Show cart" => White page
« Reply #1 on: July 14, 2011, 17:32:00 pm »
That seems OK :
I see in ps_session.php
   function url($text, $createAbsoluteURI=false, $encodeAmpersands=true, $ignoreSEF=false ) {

So the "true" I added here :
   $href = $sess->url($mm_action_url."index.php?page=shop.cart", true);
means :
   $createAbsoluteURI=true

::)