News:

Support the VirtueMart project and become a member

Main Menu

Themes? Templates? Layout of my "Shop"

Started by ahtaylor1, October 09, 2013, 22:12:55 PM

Previous topic - Next topic

ahtaylor1

Joomla! 2.5.14 ; PHP 5.3.27

Hi Guys,

Can anyone point to a tutorial for learning the basics of the differences between templates and themes?  Are they not the same thing?

I am making great progress with my first site but don't like the layout of the products on my pages.  How do I go about playing around with the layout?

I'm still struggling with the concept of my template layout and the layout of my products on my pages - not really sure where to look to change.  I think I must have to look in the configuration within VM.  Is this right?

jenkinhill

Everything you see on a Joomla page is in a template, or several templates, styled with css. Theme is sometimes used for this same thing.

Use Firebug to look at the page code and suggest changes then apply t5hose changes as template overrides, or by appending css overrides to your Joomla template.css

http://forum.virtuemart.net/index.php?topic=116620.0
http://docs.virtuemart.net/tutorials/33-templating-layouts.html
http://www.ostraining.com/blog/joomla/overrides
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

AH

#2
Good call from Jenkin but not all design is controlled by templates that you can override. 

Some CSS styling (and content) is determined by functions that are not part of the templating construct. I do not advise you messing with them, they are core code and will get overwritten every time you upgrade VM

This information may save you hours of digging around in templates trying to find out where some of the look and feel is derived from.

A couple of examples you may come across when styling your shop

e.g.

Some of the price stucture (Named divs separating different prices and elements of price display)
administration/components/com_virtuemart/helpers/currencydisplay.php).

The layout of the shipping rates is controlled by a plugin function that inserts brackets around the cost of the rates. This is not a templating option as it sits in  administration/components/com_virtuemart/plugins/vmpsplugin.php). (Go figure!)

if ($pluginSalesPrice) {
         $costDisplay = $currency->priceDisplay ($pluginSalesPrice);
         $costDisplay = '<span class="' . $this->_type . '_cost"> (' . JText::_ ('COM_VIRTUEMART_PLUGIN_COST_DISPLAY') . $costDisplay . ")</span>";
      }

If you want a good free editor that can search mutliple files for a particular instance (how the heck do you think I can find various functions/bits of code when I have no idea where to look? - I simply search for the code snippet in the directory structure of my project using this editor!)

http://www.activestate.com/komodo-edit


In addition - get familiar with using language overrides in Joomla.  They are much better than messing around with hard coding your requirements in the direct language files and have the benefit of not being overwritten when you upgrade to a new joomla version
Regards
A

Joomla 4.4.5
php 8.1