Author Topic: [solved] template override troubles: picking the right Default or override it  (Read 10366 times)

k0nan

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 69
i'm using joomla ja_purity as default template.
i've assigned to every virtuemart view the ja_purity template.

i'm trying to override the "virtuemart" view - aka frontpage - so i put in my folder
Code: [Select]
templates\ja_purity\html\com_virtuemart\virtuemart the files here contained
Code: [Select]
components\com_virtuemart\views\virtuemart\tmpl as we usually do to use template override.

when i modify default.php, no changes take effect in the page display.


can you confirm this ?

The Official VirtueMart 1.1 User Manual  is out, get a copy now!

Stai cercando aiuto per VirtueMart in Italiano ? Visita VM Italia

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10374
  • VirtueMart Version: 3+
Re: template override troubles
« Reply #1 on: November 17, 2010, 16:01:07 pm »
konan, I am not aware you can overide vmart templates with template overides.

BUT: what you can do it copy the theme folder, and rename it. THEN, vmart has its own templates you can change.

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9969
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: template override troubles
« Reply #2 on: November 17, 2010, 16:26:18 pm »
BanquetTables, you are talking about vm1.1.x series. In vm1.5 has no theme directory any longer.

VM1.5 can do that exactly, but k0nan seems to went a different way than I expected.
i'm using joomla ja_purity as default template.
i've assigned to every virtuemart view the ja_purity template.
I fear there is the problem. You assigned every view with joomla to use the ja_purity template. But this wont help people, because they want different templates/layouts by category id or product id.

To be sure, you use it the intended way do the following. Remove all configuration within joomla for the templates. Just choose a standard for your joomla page. Now you should see the page and joomla in the choosen standard template.

When you enter now the virtuemart configuration, you can set a standard template for all com_virtuemart things. Not per view, just for the whole component. To extend this, you can then choose a different standard template for categories and products.
When you save now, then you should be able to see the extra layouts in the selector, of course you need an extra file placed like you described.  When you do not see the extra layouts, something is wrong.
The selector shows the default layouts of the view and adds the extra layouts saved in the template.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

k0nan

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 69
Re: template override troubles
« Reply #3 on: November 17, 2010, 22:23:34 pm »
let me say that this can be confusing at first place: i mean, if we use override, why i can't override the default ? :P :D
in fact, joomla usually allows to override everything including the default of course, so i try to apply the same concept to vm1.5

so, in order to recap

overrides works
but
in a different way than standard joomla
as the default template for the specific view can't be edited
but other templates for that specific view can be added
so it is pointless to have a default.php file in template directory

right?
The Official VirtueMart 1.1 User Manual  is out, get a copy now!

Stai cercando aiuto per VirtueMart in Italiano ? Visita VM Italia

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9969
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: template override troubles
« Reply #4 on: November 18, 2010, 00:00:19 am »
it is not pointless. The default.php of the choosen template is used not the one in the FE/view/tpl directory.

I think it is important to consider what the most people need first.

I think they are happy that they can just choose a joomla template and it works.

Next level is that the people have their own template for their shop and maybe different from the normal joomla page and want to change the layout (flypage).

Next level is that the people want to have different templates for different categories.

They dont want to have japurity for categories and beez for productdetails. This makes not really sense. They want a winter theme for winter category and a spring theme for spring category and the products should have the same themeof course.

So I think it is right to ignore the template used for the views and to override it so as a shop needs it.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

k0nan

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 69
Re: template override troubles
« Reply #5 on: November 18, 2010, 00:46:06 am »
it is not pointless. The default.php of the choosen template is used not the one in the FE/view/tpl directory.


well, i've put the default.php in the choosen template folder and i've edited it, but no change is shown in the frontend!
that's what i reported in the first post
i resaved the configuration, sure, like you suggested before

could anyone please confirm this behaviour ?
The Official VirtueMart 1.1 User Manual  is out, get a copy now!

Stai cercando aiuto per VirtueMart in Italiano ? Visita VM Italia

k0nan

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 69
Re: template override troubles
« Reply #6 on: November 18, 2010, 00:57:17 am »
ok

it's working

i find out that simply there are two "Default" item listed in the dropdown menu, so it's difficult to say which is the one from the component folder and which is the one from the template folder at first sight :)

may we have to insert something to make it more clear ?
 
The Official VirtueMart 1.1 User Manual  is out, get a copy now!

Stai cercando aiuto per VirtueMart in Italiano ? Visita VM Italia

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9969
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
good idea, maybe the template name behind it
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9969
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
i find out that simply there are two "Default" item listed in the dropdown menu,

I removed that it is listed twice. The joomla mechanism automatically tries to get the choosen layout from the template and if none is there it takes it from the component folder.

I changed now the function so that it is only shown one time.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/