VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: ewcandia on December 13, 2014, 19:25:41 PM

Title: Unable to locate in VM3 the code I changed in prev VM2 version.
Post by: ewcandia on December 13, 2014, 19:25:41 PM
I update from VM2 to VM3

Now Im trying to locate the old components/com_virtuemart/views/category/tmpl/default.php where I added some html text:

echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
echo '&nbsp;<span style="color:#CB1010;"><strong>I.V.A. Incluido</strong></span>'


when I look to the same file in VM3 code is completely different can you tell me where is located the code I added?

thanks for helping
Title: Re: Unable to locate in VM3 the code I changed in prev VM2 version.
Post by: GJC Web Design on December 14, 2014, 15:13:54 PM
It is gone.. over written with the VM3 version

This is why we have template over rides... so changes you make to your templates are not over written by up dates

You have to re-add it and make a template over ride so it isn't over written on the next update
Title: Re: Unable to locate in VM3 the code I changed in prev VM2 version.
Post by: ewcandia on December 15, 2014, 23:11:16 PM
Understood, but I still can see the code I added (attached)
If I want to remove it or change it how can I do it?
where is the code the front page is printing?

thanks
Title: Re: Unable to locate in VM3 the code I changed in prev VM2 version.
Post by: ewcandia on December 15, 2014, 23:13:49 PM
attachment I forgot to add...

[attachment cleanup by admin]
Title: Re: Unable to locate in VM3 the code I changed in prev VM2 version.
Post by: jenkinhill on December 15, 2014, 23:19:42 PM
VM3 uses a combination of "Old style" template files with the addition of sublayouts. The template files are in components/com_virtuemart/views/####/tmpl/ and sublayouts which are in components/com_virtuemart/sublayouts

Both types of file can be overriden.

If you already have overrides in [yourjoomlatemplate]/html/com_virtuemart/ then they will take priority over the new templates.

From your image it looks like the file you need there should be  components/com_virtuemart/sublayouts/prices.php