Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : Assign Custom fields to Specific Scripts WHMCS Auto Install



Threaded Mode | Print  

 Assign Custom fields to Specific Scripts WHMCS Auto Install, A way to select fields for specific scripts (6 Replies, Read 644 times)
sitedartweb
Group: NOC
Post Group: Newbie
Posts: 11
Status:
Hello,

I plan to have multiple scripts for wordpress installs with specific plugins. Each script will need a custom field just for that script. Is that possible?

Example:
Script 1: Wordpress with Woocommerce will require a field for business name.
Script 2: Wordpress with Invoicing will have its own custom field for owner name.

So, I assume I need to make adjustments in install.xml first? Is it possible to create a new variable within install.xml, or will adjustments need to be made in install.php as well?

Thank you
IP: --   

Assign Custom fields to Specific Scripts WHMCS Auto Install
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 4316
Status:
Hi,

I would not suggest to make changes in install.xml directly as that file will be overwritten when a new version of that scripts is available. You can refer to the following guide on how to add plugins to WordPress :
https://softaculous.com/docs/Adding_Plugins

You will have to add the fields in XML file but that will just display the field on install form, if you would like to use the value posted by users in that field you will need to make changes in __post_mod_install() function in mods.php

Once this is done you will need to make changes in your WHMCS to ask the fields as per the product chosen.

I assume you will create separate products for each script i.e. separate product for WordPress with WooCommerce, another product for WordPress with Invoicing. So while configuring these products you can make changes to "Custom Fields" and create the fields as per your requirement.

-----------------------
SitePad Website Builder
Follow us on Twitter
IP: --   

Assign Custom fields to Specific Scripts WHMCS Auto Install
sitedartweb
Group: NOC
Post Group: Newbie
Posts: 11
Status:
OK...I see where you were going. We are planning to have these items pre-installed as a single package. But, this could be the alternative...

I will review this...

But, is there a list of all the SQL variables we can use? For example things like [[site_name]], [[admin_email]], etc?

Thank you

IP: --   

Assign Custom fields to Specific Scripts WHMCS Auto Install
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 4316
Status:
Hi,

You can use all the fields that exist in install.xml of a script in [[]], e.g. [[admin_username]], [[admin_email]]

Also there are few other keys that can be used, basically any keys that exist in $__settings array can be used. You can use the post_install filter to log the $__settings array in a log file and check all the keys :
https://www.softaculous.com/docs/developers/filters/#post_install

-----------------------
SitePad Website Builder
Follow us on Twitter
IP: --   

Assign Custom fields to Specific Scripts WHMCS Auto Install
sitedartweb
Group: NOC
Post Group: Newbie
Posts: 11
Status:
Ok....well, I have further issues with the WHMCS auto installer.

I have worked on setting up my custom fields, but recently the auto installer is not installing anything unless I force it in _extra.php

I have a few images, so they will be uploaded across multiple post (as it seems I can only add 3 images here).

Here is an explanation of what I am doing...

1. I have a script called SMB
2. I want to change the global field name "Script" to "Design Name"
3. I Edit the _extra.php file and add this line
$GLOBALS['softaculous_conf']['fields']['Script'] = 'Design Name';
4. Added new script in _extra
GLOBALS['add_softaculous_scripts'] = array(
            10001 => array('name' => 'SMB',
5. Edited WHMCS custom fields and replaced Script field with Design Name

Debug says "Empty" for the Design Name field

Hard to explain, so why I am including images to show exactly what I have done...

NOTE: At this point, the only way I can get anything to install...specifically SMB... is by adding the line...

$GLOBALS['softaculous_conf']['custom_fields']['Script'] = 'SMB';

And of course, that limits me to the one script.

Anyways...images explain it better what I am doing...

Why is auto installation not working?
IP: --   

Assign Custom fields to Specific Scripts WHMCS Auto Install
sitedartweb
Group: NOC
Post Group: Newbie
Posts: 11
Status:
Continued...

As noted, the script only works if I force it in _extra.php. Debug only states "Softaculous : Script name was not posted"...Which as you can see, it is.
IP: --   

Assign Custom fields to Specific Scripts WHMCS Auto Install
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 4316
Status:
Hi,

Can you please open a support ticket with access to your WHMCS installation so that we can check this for you :
https://softaculous.deskuss.com/

-----------------------
SitePad Website Builder
Follow us on Twitter
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is September 18, 2019, 5:52 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.260