Author Topic: [VM2] how to customize VM search results page?  (Read 3583 times)

thebit

  • Beginner
  • *
  • Posts: 22
[VM2] how to customize VM search results page?
« on: January 30, 2015, 11:59:25 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10693
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: [VM2] how to customize VM search results page?
« Reply #1 on: January 30, 2015, 12:17:05 pm »
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
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

  • Beginner
  • *
  • Posts: 22
Re: [VM2] how to customize VM search results page?
« Reply #2 on: January 30, 2015, 12:48:26 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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10693
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: [VM2] how to customize VM search results page?
« Reply #3 on: January 30, 2015, 12:50:50 pm »
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
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

  • Beginner
  • *
  • Posts: 22
Re: [VM2] how to customize VM search results page?
« Reply #4 on: January 30, 2015, 14:28:07 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10693
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: [VM2] how to customize VM search results page?
« Reply #5 on: January 30, 2015, 17:59:14 pm »
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
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

  • Beginner
  • *
  • Posts: 18
  • A beginner
Re: [VM2] how to customize VM search results page?
« Reply #6 on: November 26, 2020, 18:09:08 pm »
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

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1620
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: [VM2] how to customize VM search results page?
« Reply #7 on: November 26, 2020, 20:33:46 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28464
  • Always on vacation
    • Jenkin Hill Internet
Re: [VM2] how to customize VM search results page?
« Reply #8 on: November 26, 2020, 22:08:11 pm »
You can specify an override for each category and let searches use the default.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VirtueMart 4.0.12 10777  J 3.10.11 PHP 7.4.30

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10693
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: [VM2] how to customize VM search results page?
« Reply #9 on: November 26, 2020, 22:47:38 pm »
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
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

  • Beginner
  • *
  • Posts: 18
  • A beginner
Re: [VM2] how to customize VM search results page?
« Reply #10 on: November 27, 2020, 14:10:19 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28464
  • Always on vacation
    • Jenkin Hill Internet
Re: [VM2] how to customize VM search results page?
« Reply #11 on: November 27, 2020, 15:48:15 pm »
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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VirtueMart 4.0.12 10777  J 3.10.11 PHP 7.4.30

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10693
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: [VM2] how to customize VM search results page?
« Reply #12 on: November 27, 2020, 19:29:22 pm »
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
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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