Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 2 Hours, 50 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

VM Redirecting Problem
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: VM Redirecting Problem
#9577
VM Redirecting Problem 1 Year, 7 Months ago  
Hi Peter,

I'm using the AMM to show on VirtueMart Category List pages (menu assignment) and 'disappear' when someone clicks on a product on the list, which goes to the product details page (excluse URL 'flypage=flypage.tpl').

This works very well!

The tricky thing is when someone post a product review/rating on the product details page. Upon submission, VM route the page back to the product details page... however AMM reappears because now the URL is just plain 'index.php' without the trailing stuff i.e. 'flypage=flypage.tpl'.

Now how do I hide AMM on any site/index.php page?

Please help!
mamasboy
Posts: 29
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#9578
Re: VM Redirecting Problem 1 Year, 7 Months ago  
Then you'll have to use the PHP field to evaluate the actual flypage.
Try something like:
$flypage = JRequest::getCmd( 'flypage' );
return ( $flypage != 'flypage.tpl'' );

Or
$flypage = JRequest::getCmd( 'flypage' );
return ( $flypage == 'the flypage you do want to show it on.tpl'' );
Peter van Westen
Admin
Posts: 9091
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#9587
Re: VM Redirecting Problem 1 Year, 7 Months ago  
$flypage = JRequest::getCmd( 'flypage' );
return ( $flypage != 'flypage.tpl'' );


works very well to hide the flypage...

however the problem is... once the rating/review is submitted via the flypage... VM redirects to just plain-jane index.php without the trailing flypage... hence the 'reappearing' of AMM...

this is a tough one
mamasboy
Posts: 29
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#9588
Re: VM Redirecting Problem 1 Year, 7 Months ago  
btw does all this work when I switch to sh404
mamasboy
Posts: 29
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#9593
Re: VM Redirecting Problem 1 Year, 7 Months ago  
When your url is just index.php, it mean VM is sending the data via post instead of url.
The php method checks for the flypage value whether it is sent by post or get (url).
So maybe you should check on another value instead of flypage. I am not sure what values VM sents via post on the tating/review. You could see that if you look in the form html of the page.
Peter van Westen
Admin
Posts: 9091
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#9597
Re: VM Redirecting Problem 1 Year, 7 Months ago  
actually I just want to assign to the menu link page (which is the VM category page). Once the visitor clicks on any product to go deeper, I want the AMM to go hiding (in fact on all pages, except the assigned menu link). Is there a rock solid way to do that?
mamasboy
Posts: 29
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#9601
Re: VM Redirecting Problem 1 Year, 7 Months ago  
    <input type="hidden" name="product_id" value="<?php echo $product_id ?>" />
    <input type="hidden" name="option" value="<?php echo $option ?>" />
    <input type="hidden" name="page" value="<?php echo $page ?>" />
    <input type="hidden" name="category_id" value="<?php echo @intval($_REQUEST['category_id'])  ?>" />
    <input type="hidden" name="Itemid" value="<?php echo @$_REQUEST['Itemid']  ?>" />
    <input type="hidden" name="func" value="addReview" />


this are the post values...
mamasboy
Posts: 29
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#9602
Re: VM Redirecting Problem 1 Year, 7 Months ago  
i tried this...

$flypage = JRequest::getCmd( 'page' );
return ( $flypage != 'shop.product_details' );


Finally it worked!!!
mamasboy
Posts: 29
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#9606
Re: VM Redirecting Problem 1 Year, 7 Months ago  
That would mean it should only show up on the url the menu item has, right? Why not only assign to that url?
Peter van Westen
Admin
Posts: 9091
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#9608
Re: VM Redirecting Problem 1 Year, 7 Months ago  
I did assign to that menu item (and a few more). But I don't understand why it doesn't work... I had to put in the PHP statement to make sure AMM doesn't appear after the rating post.
mamasboy
Posts: 29
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#9619
Re: VM Redirecting Problem 1 Year, 7 Months ago  
I don't mean the 'Menu assignment', I mean the URL assignment.
Peter van Westen
Admin
Posts: 9091
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#9620
Re:VM Redirecting Problem 1 Year, 7 Months ago  
cos URL assignment won't work

the menu item is
option=com_virtuemart&Itemid=77&lang=en


the flypage url is
page=shop.product_details&flypage=flypage.tpl&product_id=23&category_id=7&option=com_virtuemart&Itemid=77&lang=en


you can see both contains the same 'option' and same 'Itemid'
mamasboy
Posts: 29
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#9622
Re:VM Redirecting Problem 1 Year, 7 Months ago  
try
index.php\?option=com_virtuemart&Itemid=77&lang=en

Peter van Westen
Admin
Posts: 9091
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#9625
Re:VM Redirecting Problem 1 Year, 7 Months ago  
I tried this...

index.php\?option=com_virtuemart&Itemid=77

cos i need the module to appear on all languages

it worked so far... haven't tried extensively yet!

hope it works for all!! thanz for the tip!!
mamasboy
Posts: 29
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: Peter van Westen
MaxCDN | Content Delivery Network | Accelerate your site to the max
Open Source Training | Online Joomla! Training and Support
hosting joomla