News:

Support the VirtueMart project and become a member

Main Menu

return to Product Category

Started by lipes, April 04, 2012, 05:35:13 AM

Previous topic - Next topic

lipes

Discover one secret :P i dont understand that he have to put the:
$catturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.JRequest::getInt('virtuemart_category_id',0));
inside JHTML::_('behavior.modal');

i put this code before <a href="<?php echo $catturl ?>"><?php echo $this->category->category_name ?></a> so nothing works ... thats a point..

CONCLUSION: what i did in product details above the <div class="productdetails-view">:
<div style="float:right; margin-right:-190px"> <a href="<?php echo $catturl ?>"><?php echo "<img src=\"images/return.gif\" width=\"190\" height=\"25\" />"?></a></div>
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

Quote from: lipes on April 14, 2012, 03:51:51 AM
i'm not understand this explanation of BanquetTables.pro:

Create a link to the product's main category from the product page.
$caturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.JRequest::getInt('virtuemart_category_id',0));

<a href="<?php echo $caturl ?>"><?php echo $this->category->category_name ?></a>




I want to apply that in 1 banner image in a Joomla Custom Html Module:
<a title="Voltar"  href=""><img src="images/voltar.gif" alt="Voltar" width="190" height="25" /></a>

what should i do? That Custom Module read php? or i'll have to edit any php file? :|~
I tryed to add that php but doesnt work :(

lipes, also the code was wrong BECAUSE

$caturl    is already used by child category I believe

Create a link to the product's main category from the product page.
$catturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.JRequest::getInt('virtuemart_category_id',0));

<a href="<?php echo $catturl ?>"><?php echo $this->category->category_name ?></a>


U can do a banner with a custom field, see image below. I do that with custom field.

That code will ONLY work inside the component,.

THE only other way to make it work outside of the component, would be to BUILD the url with JRequest

THAT would take you creating a module.



[attachment cleanup by admin]