Hi,
is there a way to detect in a PHP page if I'm in a product virtuemart page? Can anyone help me?
Joomla version: 3.7.1
Virtuemart version: 3.0.6.2
Quote from: Nicola1008 on May 19, 2017, 11:28:25 AM
Joomla version: 3.7.1
Virtuemart version: 3.0.6.2
http://virtuemart.net/news/latest-news/480-security-release-of-joomla-3-7-be-prepared
VM3.0.6.2 is more than two years old now, and is known to be insecure. As in the news item above, VM versions before 3.2.2 do not work correctly with J3.7.x
Be sure to test the update on a backup copy of your site as there are templating changes in versions since then, and many more configuration options. Once you have current templates somebody may be able to advise on your page detect issue.
Quote from: jenkinhill on May 19, 2017, 13:15:24 PM
Quote from: Nicola1008 on May 19, 2017, 11:28:25 AM
Joomla version: 3.7.1
Virtuemart version: 3.0.6.2
http://virtuemart.net/news/latest-news/480-security-release-of-joomla-3-7-be-prepared
VM3.0.6.2 is more than two years old now, and is known to be insecure. As in the news item above, VM versions before 3.2.2 do not work correctly with J3.7.x
Be sure to test the update on a backup copy of your site as there are templating changes in versions since then, and many more configuration options. Once you have current templates somebody may be able to advise on your page detect issue.
All works correctly in my site. I only want to check with PHP if the user is in a virtuemart page or not
<?php
$app = JFactory::getApplication();
$input = $app->input;
if($input->getCmd('option') == 'com_virtuemart' && $input->getCmd('view') == 'productdetails')
{
// You are in VirtueMart's Product Details page
// Do whatever you want
}
?>
Quote from: Jumbo! on May 19, 2017, 14:35:24 PM
<?php
$app = JFactory::getApplication();
$input = $app->input;
if($input->getCmd('option') == 'com_virtuemart' && $input->getCmd('view') == 'productdetails')
{
// You are in VirtueMart's Product Details page
// Do whatever you want
}
?>
THANK YOU SO MUCH!!!!!!!!!!!!!! ;) ;) ;) ;)
Quote from: Jumbo! on May 19, 2017, 14:35:24 PM
<?php
$app = JFactory::getApplication();
$input = $app->input;
if($input->getCmd('option') == 'com_virtuemart' && $input->getCmd('view') == 'productdetails')
{
// You are in VirtueMart's Product Details page
// Do whatever you want
}
?>
Hi all,
Knowing that we are within a product details page, is there any way to pick certain values from the product? I need to inject code within this productdetails page from outside, the point is to retreive product name and product price in order to make this inject posible. Is this posible?
Once we know we are in this product details page, how can I get product data?
Thanks.
QuoteI need to inject code within this productdetails page from outside
Which code?