JRequest::getVar('view') returns 'Frontpage' on VM pages and URL problems

(1/17) > >>

unleash.it:
Is there a reason why the Virtuemart component sometimes returns "frontpage" as the Joomla View?

Code:

JRequest::getVar('view')

I am also getting URLs that are inconsistent. SEF is turned off, but sometimes the URL parameters disappear all the way back to the base URL. For instance when I add a product to the cart (any product), I get this url:

http://localhost/tdcoffee/index.php

Also, the Joomla "View" is returned as "frontpage" even though it isn't. But when I click on "Show Cart" in the Virtuemart module, I correctly get:

http://localhost/tdcoffee/index.php?page=shop.cart&option=com_virtuemart&Itemid=78

In this case the Joomla "view" returns NULL as it does on all the VM catalog pages. Both of these situations also happen on certain pages (but not all) during the checkout process. This poses a big problem for me as I am using PHP to put certain content on the Joomla frontpage using the "view" in an IF statement.

For instance I have my banner image that only shows on the front page:
Code:

<?php $fp=JRequest::getVar('view'); ?>

         <?php if ($fp=='frontpage') : ?>
                 <h1 class="logo"><?php echo $mainframe->getCfg('sitename');?></h1>
         <?php endif; ?>

This is working fine except in those couple of pages when everything falls apart. Is this a known problem, or should I submit a bug report? Or is this just the way it's supposed to work...?

I might also like to be able to use $_get statements to test for certain VM modes like checkout...although if anyone knows of a better way that will work with SEF turned on (when that comes available), that would be great.

Once again, many thanks. I hope you guys are taking some time off for the holidays and will get back to me when you can. Cheers!



unleash.it:
Can any developers or experienced users take a minute to get back to me? This is a huge issue for the site I'm working on. To test this problem, I just did a clean Joomla 1.5 (rhuk_milkyway template) and VM installation, both latest builds. The results were the same. The url looses all parameters to become the base url at strange times:

*When you refresh or delete items from the cart (but not just by viewing cart).
*During the checkout process after the registration screen.

This situation also causes Joomla to think it is on the frontpage. Is this a temporary problem? Is there a work around?

As an alternative to JRequest::getVar('view') I've also tried:

Code:

<?php $menu = &JSite::getMenu(); ?>
<?php if ($menu->getActive() == $menu->getDefault()) { ?>
     //frontpage code...

Same thing. Both methods work fine on all other pages.

aravot:
VirtueMart 1.1 is in beta, we are handling one issue at a time.

unleash.it:
Ok, that at least  helps me to know that this is a known issue. I did check the tracker and didn't see it listed there. Do you want me to add it?

I hope I'm not asking the too many questions...or mentioning the obvious. I know the Virtuemart team is busy, not to mention that we just had the holidays (Happy New Year by the way!). Are you interested in my observations...someone with over 10 years HTML/CSS, knows Joomla, but somewhat beginning PHP skills?

I probably shouldn't have attempted a 1.1 site, but I'm too far along now. When I learned that VM stable was no longer supporting Joomla 1.5, I had already invested over six months learning Joomla 1.5 and was far along in designing a client's site. Basically I was forced to choose between going with the 1.1 beta or having to learn the fading Joomla 1.13. Since I didn't like the later idea much...I decided to take the gamble. I'm just going to hack my way through then update everything when it becomes stable. At this point it's all MOSTLY working great. Thanks everyone for your good work...Jason

aravot:
Quote from: unleash.it on January 04, 2008, 03:59:19 AM

Ok, that at least  helps me to know that this is a known issue. I did check the tracker and didn't see it listed there. Do you want me to add it?


I don't know if it is known issue or not haven't test it yet, at the moment I am testing shipping, payment, user filed and products, next on task for me is order management.

Navigation

[0] Message Index

[#] Next page