Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / template overrides not always working?

template overrides not always working?

Views: 1,501

Results 1 to 4 of 4
18 Jan 2014, 10:00 AM
#1
kevinman4404 avatar

kevinman4404

New Zenner

Join Date:
Jul 2013
Posts:
8
Plugin Contributions:
0

template overrides not always working?

I have a website with a subdomain (mobile), and a template for both the main domain and subdomain.

The problem I am having is that sometimes putting a template folder in a directory is not overriding the default file. A good example is- I use different sized images for my two templates. I am trying to change the paypal/credit card image. I need to make a template override of languages/english/modules/payment/paypal.php, but it does nothing and I have to edit the core file. This is not good as I need two image sizes.

Am I doing something wrong or is using templates sometimes impossible?
If so are there any other suggestions on how to achieve this?

thanks,
Kevin

18 Jan 2014, 2:47 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: template overrides not always working?

kevinman4404:

I have a website with a subdomain (mobile), and a template for both the main domain and subdomain.

The problem I am having is that sometimes putting a template folder in a directory is not overriding the default file. A good example is- I use different sized images for my two templates. I am trying to change the paypal/credit card image. I need to make a template override of languages/english/modules/payment/paypal.php, but it does nothing and I have to edit the core file. This is not good as I need two image sizes.

Am I doing something wrong or is using templates sometimes impossible?
If so are there any other suggestions on how to achieve this?

thanks,
Kevin

So, I don't have my handi-dandi reference tool with me at the moment, but you could take a look at a plugin called Zen Cart overrides. (I think that's what it is called.) It is a small downloadable html/java or activex document that shows what can be overridden and where the file(s) need to be stored. If, however, you find that a specific file can not be overriden, but there is an attribute (perhaps template related) that can and should be overriden, then you may need to custom code it to include the template override call for the desired "attribute" (yes that would be a core file/related mod) obviously would suggest providing comments in the file(s) so when updating will make sense.

Or....

Could use a responsive template and maybe an image handler to reduce file sizes. Your choice of course.

18 Jan 2014, 10:48 PM
#3
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: template overrides not always working?

kevinman4404:

I have a website with a subdomain (mobile), and a template for both the main domain and subdomain.How are you sharing the template for both of these?
Where are you storing the required extra images?

18 Jan 2014, 11:22 PM
#4
kevinman4404 avatar

kevinman4404

New Zenner

Join Date:
Jul 2013
Posts:
8
Plugin Contributions:
0

Re: template overrides not always working?

So, I don't have my handi-dandi reference tool with me at the moment, but you could take a look at a plugin called Zen Cart overrides. (I think that's what it is called.) It is a small downloadable html/java or activex document that shows what can be overridden and where the file(s) need to be stored. If, however, you find that a specific file can not be overriden, but there is an attribute (perhaps template related) that can and should be overriden, then you may need to custom code it to include the template override call for the desired "attribute" (yes that would be a core file/related mod) obviously would suggest providing comments in the file(s) so when updating will make sense.

Or....

Could use a responsive template and maybe an image handler to reduce file sizes. Your choice of course.

Thanks, I will try this and let everyone know how it goes

gilby:

How are you sharing the template for both of these?
Where are you storing the required extra images?

I meant to say a template each for both domain and subdomain. Using multi-site module.