Hello,
I realized that in the results page of VM search there are some page element I wish to remove such as VirtueMart Category View (searched_word), name of manufacturer.
Is there a way to realize that from VM configuration or I must to edit VM template code? In the second case, what's the template page?
Thanks
by template over rides
the template is the category template .. they both use the same
Quote from: GJC Web Design on January 30, 2015, 12:17:05 PM
by template over rides
the template is the category template .. they both use the same
Which category template? VM Product Category or Joomla Category?
Can you well explain what is the path?
Thanks.
Joom cat??? how would that work?
components\com_virtuemart\views\category\tmpl\default.php
over ride it
Ok, thanks.
So, I am very surprised that VM not yet has some backend features such as VM template custimization for layour (or import/export csv, as I mentioned in another topic)
In VM 3 has anything changed?
nope - import/export is perfectly adequately handled by csvi - it has a free download
what would be the point of a clicky clicky- draggy droppy template builder? everyone has there own ideas about what they want in their shop --
that is why VM is amazingly extensible with a small amount of html and css knowledge with any design or idea feasible
You get a base fully functioning shopping cart for free
then you template it or install a 3rd party template - just like Joomla
Hi, sorry to reply in this topic as it's quite old although related to my quesion. Is it possible to use a different template for the search results page but keeping the category template as it is? I have been searching around to see if there is an if or else statement that could be used on the category/tmpl/default.php template to distinguish between a VM serch results page or normal product category page? Thanks
Joomla! 3.9.21
VirtueMart 3.8.4
will be updating the above soon ;)
I think for search result is used normal normal product category page == category/tmpl/default.php
You can specify an override for each category and let searches use the default.
something like
if(empty($this->keyword)) {
//is normal cat display
}else{
//is search result
}
Thank you all for the help above. The if and else statments worked with the category template, however I've found that i need to amend the sublayouts > products template too and '$this->keyword' doesn't seem to work in this template
You are using if/else to call an override to the category default.php? If so that page, in turn, can call sublayout overrides.
or pass $this->keyword to your sublayout
echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating,'keyword'=>$this->keyword));
and at the other end
$keyword = $viewData['keyword'];
might work