Author Topic: How create a new "Sublayouts for products in category" display ?  (Read 683 times)

extonjaez

  • Jr. Member
  • **
  • Posts: 76
How create a new "Sublayouts for products in category" display ?
« on: November 04, 2022, 17:34:21 pm »
Hello,

Please how create a new "Sublayouts for products in category" display, by exemple a new version (who is a midification) of "product-horizon" ? (see screen capture)
Many thanks for your help
Arnaud

System Information
com_virtuemart.4.0.7.10731_package
PHP Built On   Linux s22095112 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
Database Type   mysql
Database Version   10.2.44-MariaDB
Database Collation   utf8mb4_general_ci
Database Connection Collation   utf8mb4_general_ci
Database Connection Encryption   None
Database Server Supports Connection Encryption   No
PHP Version   8.1.9
Web Server   Apache
WebServer to PHP Interface   fpm-fcgi
Joomla! Version   Joomla! 4.2.4 Stable [ Uaminifu ] 25-October-2022 15:20 GMT
User Agent   Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10688
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: How create a new "Sublayouts for products in category" display ?
« Reply #1 on: November 04, 2022, 17:52:18 pm »
create a new file in your template over rides

templates\YOUR_TEMPLATE\html\com_virtuemart\sublayouts\products_different.php
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

extonjaez

  • Jr. Member
  • **
  • Posts: 76
Re: How create a new "Sublayouts for products in category" display ?
« Reply #2 on: November 11, 2022, 12:33:08 pm »
Hello

Sorry i wasn’t clear in my question
In fact i would like use the actual « products_horizon » -Sublayouts for products in category- and modify it (with by exemple the name « products_horizon2 » but leaving « products_horizon » unmodified (as it is now).
Regards
Arnaud

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28456
  • Always on vacation
    • Jenkin Hill Internet
Re: How create a new "Sublayouts for products in category" display ?
« Reply #3 on: November 11, 2022, 15:40:23 pm »
That's what GJC described. You leave the original sub-layout file untouched and use an edited copy for the override.

Or are you saying you want to be able to use both layouts?  You can define a different sub-layout for each category (if you wish) on each category view settings tab.
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