News:

Support the VirtueMart project and become a member

Main Menu

[VM2] how to customize VM search results page?

Started by thebit, January 30, 2015, 11:59:25 AM

Previous topic - Next topic

thebit

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

GJC Web Design

by template over rides

the template is the category template .. they both use the same
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

thebit

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.

GJC Web Design

Joom cat??? how would that work?
components\com_virtuemart\views\category\tmpl\default.php

over ride it
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

thebit

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?

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jamesl-kemet

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 ;)

pinochico

I think for search result is used normal normal product category page == category/tmpl/default.php
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

jenkinhill

You can specify an override for each category and let searches use the default.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

something like

if(empty($this->keyword)) {
   //is normal cat display
}else{
   //is search result
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jamesl-kemet

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

jenkinhill

You are using if/else to call an override to the category default.php? If so that page, in turn, can call sublayout overrides.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation