Forums / Contribution-Writing Guidelines / How to add a button for a mod?

How to add a button for a mod?

Started by nigelt74 on 7 Apr 2012, 3:24 AM · Views: 1,746

Results 1 to 3 of 3
7 Apr 2012, 3:24 AM
#1
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

How to add a button for a mod?

Ok, I have decided to turn a bit of code i use on all sites i make into a mod.

The only problem I am having is, how do i add the additional button to zencart.

is there a way to add the button definitions, as i don't see an obvious override

Normally i just use a simple image link as all the stores i have developed for are english only

basically like
<img src= "blablabl/buttons/mybutton" />

whereas if i want to be incluseive of all languages I should use something like this

zen_image_button(BUTTON_IMAGE_BLABLA, BUTTON_BLABLA_ALT)

I know it is probably patently obvious to others, but i can't figure where to define the bits, i don't want to override core files if possible

Note the mod is a catalog side mod, not admin.

Webzings Design
Semi retired from Web Design

7 Apr 2012, 4:07 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: How to add a button for a mod?

If it's language-specific, as buttons usually are, then adding a custom file to the extra_definitions folder is the simplest way to do it.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Apr 2012, 2:42 AM
#3
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: How to add a button for a mod?

Thanks for that Dr

Webzings Design
Semi retired from Web Design