Common Templates and Addons

Hello Guys,



I am working on updating an addon and had a question that I am hoping that one of my fellow developers has some experience to draw on for the answer.



I am working with the following template:



basic/admin/common_templates/settings_fields.tpl



Which as you can imagine controls the form fields that are output in the Addons Settings.



I am working with the text input fields specifically






What I need to know is how to change this code with an {if} statement when I am updating a specific addon.



My goal is change the class for the text input if I am updating a specific addon which we'll call “xxxx” but if it is any other addon it will display the default input text field.



I basically have it set up like this right now:



{if $addons.xxxx}


{else}

{/if}


Nevermind. I found it.



In case you ever need it:



{if $_addon == 'xxxx'}

{/if}

If you are truly working on an addon, you should not be modifying anything outside the skins/basic/admin/addons/ directory. Use hooks to add input fields to the Add-ons tab of various controllers (products, categories, orders, profiles, etc.). Most are named similar to profiles:general_content or something similar.



Otherwise you haven't created an addon, you have done a MOD to distributed source code even if you are adding the file.

While I generally agree with you, there is no way accomplish what I am looking to do without adding a single line Mod to accomplish the greater good of the Addon. If there were was a hook available to accomplish this, I would use it.



The hook base tool isn't as useful as CS-Cart would like developers to believe it is.

[quote]

The hook base tool isn't as useful as CS-Cart would like developers to believe it is.

[/quote]

I don't know about that. I've been using them for several years now creating many addon products. The only adjustment I've needed to make is to come up with a way to insert new hooks until the standard releases accommodate them. I.e. adding both PHP and template hooks dynamically when the addon is installed. I then request cs-cart to add the hook. Sometimes they do and sometimes they don't. But my addons check before they add so it all works out.