News:

Looking for documentation? Take a look on our wiki

Main Menu

Template Oveeride Question

Started by john-doe, October 15, 2015, 15:51:56 PM

Previous topic - Next topic

john-doe

Greetings. I need to so some customizin into the products list bu i can't find the correct template override that is called by this string of code.

<?php
if (!empty(
$this->products)) {
$products = array();
$products[0] = $this->products;
echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));

?>


In which filder can i find the exact override because i saw the majority of the folders and i can't find it
Thanks in advance

kittmaster

I have found the best way to find what is what........is to do this:

Download the full package Virtuemart revision you are using and unzip all the files into a into a folder (file structure will show you where its located server side).

Use notepad++ for editing.

Open the folder for either admin area or component/user area and then search for *.php* (Will reduce number of .php files loaded into notepad++)

Select all > Right click and open all in notepad++

Then search for part of the code your looking for by using "Search in all open documents".

From there, it will point to where that code is being used and then you can do your template overrides accordingly.

john-doe

Well i did the other way that is i downloaded the folder com_virtuemart since the overrides options seems limited.
Looks like that the options needed are in the sublayouts folder  on the file products.php which IS NOT in the available folders to override, so if i do a change on the file on the next update is lost.

I guess i need to find another way to customize it

kittmaster

Yeah I've seen that too, I have a sublayout I had to modify, its on a list of notes to review whenever an update happens. Not sure why its being done that way.....sublayouts that can't be over wrote just seems like a disaster IMO.

Spiros Petrakis

All sublayouts can have template overrides, you probably dont create them in the right place.
If you like to override the products.php sublayout you first create a folder "sublayouts" in the html\com_vitruemart\ folder of your template and then you put your override in there.
Joomla templates and extensions development
https://www.yourgeek.gr

GJC Web Design

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

john-doe

Quote from: GJC Web Design on October 15, 2015, 22:26:38 PM
Exactly as Spyros says... have you read the provided info?

http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html
OK since this is almost new for me i'll try to see what happens and i'll let you know