News:

Looking for documentation? Take a look on our wiki

Main Menu

NO MORE THEME. 2+ uses VIEWS (Layout Override)

Started by PRO, September 14, 2011, 21:28:43 PM

Previous topic - Next topic

srajca

OK so what you have to do is the following. You have a template installed in your joomla. Lets call it YOURTEMPLATE. So to make an override you simply have to go to;
templates/YOURTEMPLATE/html/com_virtuemart/productdetails/default.php
this is for the default in productdetails
if you do not have file html or any of the files that follow than simply create them.
And that is all the magic. Once you will start editing inside that folder then this will be an override and it will not be affected when upgrading Virtuemart.

Here are some examples;
templates/YOURTEMPLATE/html/com_virtuemart/productdetails/default_images.php   -----> for images in product details view
templates/YOURTEMPLATE/html/com_virtuemart/category/default.php                         -----> for default category view
templates/YOURTEMPLATE/html/com_virtuemart/cart/default_pricelist.php                   -----> for price view in cart

and so on...hope I was able to help.

reddeer

#61
Thank you, Banquet Table Pro, for all the quick and valuable VirtueMart configuration tips.  :)  This theme information was especially helpful.
Sincerely,
Reddeer

simsar78

hello,
i have tested your info for changing the template ... one for category.
But i change che template in the category manager ... i no have reasons... virtuemart take the css and other by the principal theme .... why ?

In the old version... it's all ok....but in 2.0.8 no ?

thank you

baggeler

PHPhell

Would be nice to know which template you bought which is causing headaches. I like the forum because it shows the real problems we all have, all that which is not visible in the polished marketing stuff which we see when we go purchasing for components. Its important to share all these bugs or non appearant weaknesses so we can see which vendors care and help (I see there are quite a lot here taking a lot of care in solving) and which just stay quiet and leave us alone...

________________________________________
The more I know the more I know I donĀ“t know
Socrates

Site: www.orgonite-brasil.com
Tech: Joomla 3.7.3,  Virtuemart 3.2

hendrix01

Still can't figure out how to call the CSS on the index file...
can anyone help me

PRO

Quote from: hendrix01 on September 06, 2012, 11:24:04 AM
Still can't figure out how to call the CSS on the index file...
can anyone help me

in your template index.php file?


I use this

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/kaizen/css/kaizen.css" type="text/css" />

jfdutoit

This post is really helpful.

Now I ran into a problem that makes me confused.

I created an override file as described in previous posts. 

Here's what I want to achieve:

There is one category that I want a different layout for.  All the other categories should use the default.  I want to use both the default file and the override file. 

But since I created the override file, all categories now uses the override's layout. 

When I play with the configuration of the category pages in the administrator's area, I see no changes.  It doesn't matter if I choose "Copy of Default", "Default", or "No Override" under the "Category Browse Page"-options.  Every time the override's layout are used. 

Is there another place where I must make config changes.
Removes Joomla Frustrations
http://www.ezywebsites.co.za

PRO

Quote from: jfdutoit on October 09, 2012, 15:51:48 PM
This post is really helpful.

Now I ran into a problem that makes me confused.

I created an override file as described in previous posts. 

Here's what I want to achieve:

There is one category that I want a different layout for.  All the other categories should use the default.  I want to use both the default file and the override file. 

But since I created the override file, all categories now uses the override's layout. 

When I play with the configuration of the category pages in the administrator's area, I see no changes.  It doesn't matter if I choose "Copy of Default", "Default", or "No Override" under the "Category Browse Page"-options.  Every time the override's layout are used. 

Is there another place where I must make config changes.

http://forum.virtuemart.net/index.php?topic=94044.0
will that help?


are you changing the administrator main configuration?

or in the individual category that lets you choose a layout?>

jfdutoit

#68
Thanks for you reply.

Quote from: PRO on October 10, 2012, 00:27:59 AM
http://forum.virtuemart.net/index.php?topic=94044.0
will that help?

I looked a couple of times at that post, but due to my limited css knowledge and lack in confidence, I'm rather trying to find some other solution before I try it. 

Here's what I did in the two files.  Maybe that is exactly the css changes you refer to, without me realizing it. 

The relevant code that I use in the default file looks like this:  (This shows the product name and images in the first div, and the short description and 'add-to-cart-bar' in the next div.  These two div's show horizontally on the page.)  (Horizontal Layout)
<div class="width30 floatleft center">
<div class="width70 floatright">

Below is the way I changed it in the override file:  (In this case, the second div shows below the first div.)  (Vertical Layout)
<div class="">
<div class="">


Quote from: PRO on October 10, 2012, 00:27:59 AM
are you changing the administrator main configuration?

or in the individual category that lets you choose a layout?>

I played around with all the possible settings.  I set the main config to one option, then I test every setting in the category.  When I'm done with all the settings in the category page, I move on to the next setting in the main config.  Then I test every single option again.
Even though I did this, I saw no change.
Removes Joomla Frustrations
http://www.ezywebsites.co.za

PRO

Quote from: jfdutoit on October 10, 2012, 09:49:31 AM
Thanks for you reply.

Quote from: PRO on October 10, 2012, 00:27:59 AM
http://forum.virtuemart.net/index.php?topic=94044.0
will that help?

I looked a couple of times at that post, but due to my limited css knowledge and lack in confidence, I'm rather trying to find some other solution before I try it. 

Here's what I did in the two files.  Maybe that is exactly the css changes you refer to, without me realizing it. 

The relevant code that I use in the default file looks like this:  (This shows the product name and images in the first div, and the short description and 'add-to-cart-bar' in the next div.  These two div's show horizontally on the page.)  (Horizontal Layout)
<div class="width30 floatleft center">
<div class="width70 floatright">

Below is the way I changed it in the override file:  (In this case, the second div shows below the first div.)  (Vertical Layout)
<div class="">
<div class="">


Quote from: PRO on October 10, 2012, 00:27:59 AM
are you changing the administrator main configuration?

or in the individual category that lets you choose a layout?>

I played around with all the possible settings.  I set the main config to one option, then I test every setting in the category.  When I'm done with all the settings in the category page, I move on to the next setting in the main config.  Then I test every single option again.
Even though I did this, I saw no change.


so in the category you want different, you changed this?

Category Browse Page



ALSO:
When you have a setting in the administrator config. Then, create a new category. Its automatically assigned that category.
So, when you go back and change the "main config", its NOT going to change all the categories. You would have to do that manually in each 1.

So, you leave the main config to be the "normal" one,

and then in the categories you want different, or special. Assign them in the individual category

Scott799

ok, not a "pro" here, but "Banquet Tables Pro" seems to be... hopefully someone can help translate a bit for the non-technical guy like me?

I have a site almost ready to go live, my final stages are now and I'm trying to get the payment functioning correctly.

J 1.7 and VM 2.0
site: www.golfsgreatheritage.com

question 1 - When I go to my checkout after selecting a product, there are no "steps indicated at the top of the page", somewhat confusing, but moving ahead...
ISSUE 1 - When I enter in the bill and ship to info as a customer would, then check agree to terms, and click "continue to check out", the only thing that happens is I loop back to this page. 

I've read so much in the forum, makes me question the use of the term "stable" with a VM cart situation given all the posts, and now after several days of trial and error on suggestions (which are really are all over the map) from the backend admin side I have not resolved this.  I noticed the code from Banquet Pro to setup a custom checkout, but this is not clear to me as I'm only understand a smidge of code related stuff.  I looked at the suggested php file to edit, but there is a lot more code there then what is offered on this post.  Do you simple add Banquet Pro's code at the end?

"Stable" is such a mis-used description, given recoding is needed just to make VM 2 version checkout to work without looping?  I have seen, but now don't anymore that there is a "confirm" button, why does this not show up for me?  Reminds me of the cache issue I resolved, but in this case the problem persists even if I don't enable the joomla core cache.

I was able to get a sandbox test to go all the way through a week ago, but now without sandbox activated, a normal guest checkout or registered checkout is just a silly loop.  Not much sales activity in this mode.  PLEASE HELP!

Thanks,
Scott

PRO

Quote from: Scott799 on October 13, 2012, 03:39:49 AM
ok, not a "pro" here, but "Banquet Tables Pro" seems to be... hopefully someone can help translate a bit for the non-technical guy like me?

I have a site almost ready to go live, my final stages are now and I'm trying to get the payment functioning correctly.

J 1.7 and VM 2.0
site: www.golfsgreatheritage.com

question 1 - When I go to my checkout after selecting a product, there are no "steps indicated at the top of the page", somewhat confusing, but moving ahead...
ISSUE 1 - When I enter in the bill and ship to info as a customer would, then check agree to terms, and click "continue to check out", the only thing that happens is I loop back to this page. 

I've read so much in the forum, makes me question the use of the term "stable" with a VM cart situation given all the posts, and now after several days of trial and error on suggestions (which are really are all over the map) from the backend admin side I have not resolved this.  I noticed the code from Banquet Pro to setup a custom checkout, but this is not clear to me as I'm only understand a smidge of code related stuff.  I looked at the suggested php file to edit, but there is a lot more code there then what is offered on this post.  Do you simple add Banquet Pro's code at the end?

"Stable" is such a mis-used description, given recoding is needed just to make VM 2 version checkout to work without looping?  I have seen, but now don't anymore that there is a "confirm" button, why does this not show up for me?  Reminds me of the cache issue I resolved, but in this case the problem persists even if I don't enable the joomla core cache.

I was able to get a sandbox test to go all the way through a week ago, but now without sandbox activated, a normal guest checkout or registered checkout is just a silly loop.  Not much sales activity in this mode.  PLEASE HELP!

Thanks,
Scott

RE: question 1.
Is it giving an error at the top?

I have attached steps.txt     to use it, you have to change the .txt to .php


You can just place it in the same /cart    folder

Then, call it with this code
<?php include("steps.php"); ?>

Place that code wherever you want

in cart/tmpl/default.php   right after this should be good
<div class="cart-view">




[attachment cleanup by admin]

neo314

Quote from: alvini on April 03, 2012, 10:24:15 AM
Regarding the CSS overwrite the steps you mention are not good.

THE CSS overwrite should be done automatically like for example is on K2.

If i put my VM CSS files the html folder it should load them automatically. I dont get why VM team has not done this.

If i put my VM css files on the template.css file that will make them load everytime and not only on the VM pages as it should.

Please consider to make the CSS overwrite to work smoth like it should on the new releases.

I agree. I understand the Joomla! override system, but the CSS is a problem because you have to change so much to make it happen or risk breaking something. It may get better when there is some documentation.

If I turn off VM's CSS, how much of com_virtuemart/assets needs to be copied to my template? All of css? All of css and images? That makes it harder to track changes I think.

I have kept VM CSS and JS on in the configuration, then attached a VM specific css file to my template CSS and worked out overriding the specific elements as needed. It is manageable, but time consuming since my template does not wrap the buttons in span tags and the css is a bit complex. Extensive use of !important helps.

PRO

Quote from: neo314 on November 20, 2012, 20:53:54 PM
Quote from: alvini on April 03, 2012, 10:24:15 AM
Regarding the CSS overwrite the steps you mention are not good.

THE CSS overwrite should be done automatically like for example is on K2.

If i put my VM CSS files the html folder it should load them automatically. I dont get why VM team has not done this.

If i put my VM css files on the template.css file that will make them load everytime and not only on the VM pages as it should.

Please consider to make the CSS overwrite to work smoth like it should on the new releases.

I agree. I understand the Joomla! override system, but the CSS is a problem because you have to change so much to make it happen or risk breaking something. It may get better when there is some documentation.

If I turn off VM's CSS, how much of com_virtuemart/assets needs to be copied to my template? All of css? All of css and images? That makes it harder to track changes I think.

I have kept VM CSS and JS on in the configuration, then attached a VM specific css file to my template CSS and worked out overriding the specific elements as needed. It is manageable, but time consuming since my template does not wrap the buttons in span tags and the css is a bit complex. Extensive use of !important helps.

when doing my site.

I took out vmart css.

THEN:

looked for things that needed classes.

Combined classes with my template ones.
Alot more manageable,


neo314

Quote from: PRO on November 20, 2012, 23:21:59 PM
Quote from: neo314 on November 20, 2012, 20:53:54 PM
...
I have kept VM CSS and JS on in the configuration, then attached a VM specific css file to my template CSS and worked out overriding the specific elements as needed. It is manageable, but time consuming since my template does not wrap the buttons in span tags and the css is a bit complex. Extensive use of !important helps.

when doing my site.

I took out vmart css.

THEN:

looked for things that needed classes.

Combined classes with my template ones.
Alot more manageable,

I'll have to look at that. It makes sense. I found too much of my template did not get applied, and that much of the css was fine and helpful (general layout) except for the "look" of some elements. Also, because I use some tools to help generate my template and have more than one template that might be used, this method would probably be less manageable for me. I can apply the same overrides to more than one template the way that I am doing it.

I think the css override should work though and be a part of VM. I would modify my comment however. There were too many !importants used which can cause a performance hit at the browser. The problem, which I am not sure why it is done this way, is that the VM layout and css uses extra elements like span.addtocart-button input.addtocart-button. That makes the VM css more specific than the template. To reduce the use of !important in the override css, I had to make my css equally specific because most of the template code only styles the button.

I'm not against the use of the span tag for the VM layout, but styling the button more specifically in theVM css seemed unnecessary, so some of the overriding css had to look like this:

form[name="enterCouponCode"] input.coupon {
width:200px;
}
form.inline input[name="quantity"] {
width:30px;
}