Forums / All Other Contributions/Addons / Uploading mod question

Uploading mod question

Locked

Views: 1,432

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
21 Jan 2008, 3:37 PM
#1
topaz44 avatar

topaz44

New Zenner

Join Date:
Dec 2007
Posts:
73
Plugin Contributions:
0

Uploading mod question

When uploading different mods, if it says put the files in the template default, if you are using a custom template do you put them in the default or custom? I am using a custom template and tried uploading paypal verified logo and put it in default and nothing happened. Do I have to put it in both or just one? Thanks. I am also uploading image handler and would like to put it in the right spot as well.

22 Jan 2008, 1:51 AM
#2
topaz44 avatar

topaz44

New Zenner

Join Date:
Dec 2007
Posts:
73
Plugin Contributions:
0

Re: Uploading mod question

Anybody? If it was already posted, please show me the link. Sorry.:oops:

22 Jan 2008, 3:41 AM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Uploading mod question

If it can be installed using an override, you should do so.
To see if overrides are supported in a directory, look for the subdirectory "classic." As of 1.3.7/1.3.8, you'll see it in

./includes/languages/classic
./includes/languages/english/classic
./includes/languages/english/extra_definitions/classic
./includes/languages/english/html_includes/classic
./includes/languages/english/modules/order_total/classic
./includes/languages/english/modules/payment/classic
./includes/languages/english/modules/shipping/classic
./includes/modules/classic
./includes/modules/sideboxes/classic
./includes/templates/classic

this means the directory can be overridden. Where you see "classsic," create your own subdirectory with the name of your own template. For instance, in templates, if your template is named "custom," if you are overriding a file in includes/modules, you would create

./includes/modules/custom/

and create the file there. Keep with this strategy, and your upgrade will be less painful.

and put

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

22 Jan 2008, 2:39 PM
#4
topaz44 avatar

topaz44

New Zenner

Join Date:
Dec 2007
Posts:
73
Plugin Contributions:
0

Re: Uploading mod question

Thanks. I have already created the custom folders. Now I know that if any new mod is to be uploaded, put them all in custom if possible. :laugh:

22 Jan 2008, 2:43 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Uploading mod question

Even if the mod author was careless and didn't do this, you should. It will make your upgrade experience easier and smoother.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

22 Jan 2008, 3:47 PM
#6
topaz44 avatar

topaz44

New Zenner

Join Date:
Dec 2007
Posts:
73
Plugin Contributions:
0

Re: Uploading mod question

Thanks. Still struggling with image handler. All I am seeing in the support thread is problems after installation, not installation. Maybe my head is not there today. :wacko:

22 Jan 2008, 5:29 PM
#7
topaz44 avatar

topaz44

New Zenner

Join Date:
Dec 2007
Posts:
73
Plugin Contributions:
0

Re: Uploading mod question

Well, that works now. Uploaded great on the first try. :clap:

24 Jan 2008, 11:58 PM
#8
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: Uploading mod question

topaz44:

Thanks. I have already created the custom folders. Now I know that if any new mod is to be uploaded, put them all in custom if possible. :laugh:

swguy:

Even if the mod author was careless and didn't do this, you should. It will make your upgrade experience easier and smoother.

Sometimes if a mod author has placed files in template_default it is because that is where they should go rather than carelessness. For example, my Checkout Amazon style mod has two files that need to be uploaded to template_default. The reason for this is that it creates two new pages and for each page there needs to be an associated template file. If the template file was only in the custom template folder the page would break if the user switched back to the Classic template for testing. By placing the template file in template_default the page will continue to work no matter which template the user switches to. To modify the template it should be copied to the custom folder first as per the normal procedure.

Regards,
Christian.

25 Jan 2008, 2:52 AM
#9
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Uploading mod question

CJPinder, your point is well taken - I was thinking about existing files from the default installation that were being overridden, but your clarification is very helpful.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

26 Jan 2008, 3:12 AM
#10
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Uploading mod question

Thinking more about CJPinder's remarks, I'm having mixed feelings about this now ... introducing (say) a new module and placing it in

includes/modules/foo.php

rather than

includes/modules/custom/foo.php

does indeed mean it will work if you switch templates during a test. But how often does this actually happen? On the flip side, during an upgrade you can easily miss this file since it's not in a template folder - and who knows how long your site will be broken if you do. Now obviously you could put the default in includes/modules and put a second one in includes/modules/custom ... but what if someone else is making a change and carelessly doesn't bother looking in the template folder but just changes the one in includes/modules?

There are benefits to both approaches, I guess. Taking detailed notes and making good backups will help avoid (or at least minimize) problems. When I release a mod or contribution, I generally place new templatable files in template directories to reduce the number of files and to make further modifications easier - but YMMV.

Somewhere on my big fun list of things to do is "write an article explaining how to install a mod" and I guess I'll have to explain both points of view and the costs and benefits of each.

swguy

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

26 Jan 2008, 3:20 AM
#11
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Uploading mod question

There is no doubt that installing a Module into both dir. (Custom & Default) does prevent problems if currently using a Custom Template then switching to the Default one.

But the question is:
"At what point should the Site Owner be responsible for where a Module is installed?"

Is it not presumed that a Site Owner knows what Template they are using and where they want a Module installed? Would it not be that difficult to know that the Module is to be installed in their Custom directories?

Not withstanding the Thread starter's question, a simple reference in each Module's "Readme" file should remove any doubt. Much easier than expecting someone to upload a duplicate of the Module. Some of the Modules require a lot of effort / changes in order to work properly.

The learning is in the doing.

Potent Products