VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Greg-Baud on January 18, 2015, 14:02:09 PM

Title: Default VM3 template
Post by: Greg-Baud on January 18, 2015, 14:02:09 PM
In Joomla 2.5/VM2 I had a blank joomla template in which the VM products loaded fine. (http://www.greg-baud.nl/index.php/gb-tickets.html)
Now I upgraded to Joomla 3/VM3, have a new blank joomla3 template, and the VM products are not shown in the same nice way as in VM2 anymore. (http://www.greg-baud.nl/Test3.3/index.php/gb-tickets.html)
I am not interested in purchasing an expensive VM template, but I want to see the products in the way the default template was intented by the VM developers.

how can I enable a standard template/theme for VM3?

wim
Title: Re: Default VM3 template
Post by: jjk on January 18, 2015, 14:53:56 PM
Looks like your new Joomla 3 template overwrites a lot of the vmsite-ltr.css with it's own bootstrap.css. If your Joomla 3 template has configuation options, I think you should have a look at those first. Personally I'm using a free bootstrap 3 template from Joomspirit, which also requires some finetuning because of bootstrap, but it doesn't look as bad as yours. In general, using a bootstrap template makes it more difficult to come up with a nice layout, because you always have to figure out if you have to adjust something in vmsite-ltr.css or in the bootstrap.css.
Title: Re: Default VM3 template
Post by: GJC Web Design on January 18, 2015, 16:43:01 PM
or move your vm css into the templates/greg-baud3/css/ folder where it should be anyway so it isn't over written

http://docs.virtuemart.net/tutorials/templating-layouts/106-override-vmsite-ltr-css.html

then it should load after your core css and take precedence
Title: Re: Default VM3 template
Post by: Greg-Baud on January 24, 2015, 16:00:58 PM
thanks for the hints. copied the file to css, and the images and vmgeneral directory to my template images directory.
that did not work for me. still have the same poor layout, everything underneath each other in stead of nicely next to each other.
Title: Re: Default VM3 template
Post by: GJC Web Design on January 24, 2015, 17:21:04 PM
well just moving it isn't going to do anything except move it - now edit your css to get it like you want it....
Title: Re: Default VM3 template
Post by: jjk on January 24, 2015, 20:27:53 PM
@Greg-Baud
I would recommend to use the Firefox browser plugin 'Firebug' which often helps to find the location of the problem. But even with Firebug enabled in my browser I've been unable to spot the setting which is responsible for the strange layout in your currently used template.
Title: Re: Default VM3 template
Post by: GJC Web Design on January 24, 2015, 22:21:45 PM
the problem is a complete lack of css .. there is nothing targetting the classes

e.g. a simple

.product.vm-col.vm-col-3 {
  float: left;
  width: 32%;
}
.browse-view .row {
  margin-left: 0;
}
and your half way there

Title: Re: Default VM3 template
Post by: jjk on January 25, 2015, 11:10:14 AM
Just compared which css files are loaded in your case (not working) and in my case (working). I'm currently using a Joomla 3.4dev version with VM 3.0.3.
In your case VM loads vmsite-ltr.css (which you have copied into your template's css folder)
In my case it loads different css files, because I have copied the following css files into my template's css folder instead: vm-ltr-common.css, vm-ltr-site.css, vm-ltr-reviews.css. Plus a copy of bootstrap.css and template.css, with the orginal bootstrap.css and template.css renamed (for example bootstrap.original.css) in order to always have the originals available for comparison.
Title: Re: Default VM3 template
Post by: Greg-Baud on January 25, 2015, 11:38:25 AM
That did the trick, thank you.

just to be sure: I deleted vmsite-ltr.css from my template css directory, copied the other files you mentioned from /components/com_virtuemart/assets/css;
I renamed /media/jui/css/bootstrap.css to bootstrap_original.css and copied that file into my templace/css directory;
For /media/mod_languages/css/template.css I only did the rename, as my own template.css would have been overwritten otherwise.

wim
Title: Re: Default VM3 template
Post by: jjk on January 26, 2015, 20:52:11 PM
Concerning the bootstrap.css this depends on your template. The file at /media/jui/css/bootstrap.css is the bootstrap 2.3.2 file which comes with Joomla. If your template uses bootstrap 3.x, the relevant bootstrap file probably is in your template's css folder. Similar, I meant the template.css in the template's folder.