VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: lipes on April 04, 2012, 05:35:13 AM

Title: return to Product Category
Post by: lipes on April 04, 2012, 05:35:13 AM
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>
Title: Re: Link to Visitor can return to Product Category (in Product Detail View)
Post by: PRO on April 14, 2012, 11:03:14 AM
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]