I am using
SugarCRM Pro 6.4.4
php 5.3.0
apache 2.2.11
My problem is that clicking the Reports module would display a text-formatted response (JSON format). When clicking the Create Report would also respond the same. I was expecting the Report Wizard wherein I could choose whether my report would be in Rows and Columns, Summation or more.
Below is a part of the response sent by Sugar.
ACLAllowedModules = ["Leads","Cases","Bugs","Prospects","Project","ProjectTask","Campaigns","CampaignLog","Releases","Contacts","Accounts","Opportunities","Notes","Calls","Emails","Meetings","Tasks","Users","Currencies","Trackers","TrackerSessions","TrackerPerfs","TrackerQueries","Documents","DocumentRevisions","EmailAddresses","Teams","Quotes","Products","ProductTypes","ProductCategories","Forecasts","Contracts","KBDocuments"]; var module_defs = new Object(); default_summary_columns = ['count'];
I tested the reports module in sugarcrm pro 6.1.6 but the result is okay.
Update:
I have fixed the problem. Turns out, sugar is calling a classname that is invalid. Corrected the classname and it is now working. By the way, the classname sugar is calling is a customized/overriden classname.
I had this error occur as a result of a bad vardefs.php custom field definition in a custom module. In my specific instance, I was trying to make a custom field pull from a custom list of values with the following code.
Bad vardefs code:
'customField' => array(
...
'type' => 'enum',
'function' => array(
'name' => 'getCustomListOfValues',
'params' => array('foobar')
)
...
),
My issue was fixed by breaking out the function params:
'customField' => array(
...
'type' => 'enum',
'function' => 'getCustomListOfValues',
'function_params' => array('foobar')
...
),
Related
I'm trying to add a Product Bundle to an Order (or a Cart, add_bundle_to_cart uses the same args). The Bundle has several child products, all of which have variations. The args I need to be providing according to the documentation are:
$args = array(
81 => array(
'product_id' => 1543,
'quantity' => 3,
),
84 => array(
'product_id' => 1386,
'quantity' => 1,
'variation_id' => 3535,
'attributes' => array(
'attribute_pa_attribute-1' => 'value-1b',
'attribute_pa_attribute-2' => 'value-2b',
),
)
);
Where the second bundled product (84) is a variable product. My issue: I cannot verify whether the values I am providing for the 'attributes' array are correct.
My attribute is named 'Servings' and there are two options - '2 People' and '4 People'. I am not sure how to format the attribute name to replace 'attribute_pa_attribute-1'. I have tried 'servings', 'attribute_pa_servings', etc. If I return the variation information for the product it gives me: 'attribute_servings' as the name and '2 People' as the value. But that doesn't seem to work either.
I am not getting any errors returned in debug.log, and I cannot find any examples of someone using this in the land of Google.
If anyone has any experience with this, I would greatly appreciate a tip as to what I am doing wrong.
Many thanks.
I came to realise there are two different types of 'attributes' in Woo: global attributes (across all products), and local attributes (specific to one product). The quoted instructions from the documentation are referring to how to reference global attributes - I am using local ones. So that is why the terms weren't working.
General overview here.
Information on the syntax between the two here.
I was going through Form Creation in ZF2 and I read the following statement.
"
You can create the entire form, and input filter, using the Factory. This is particularly nice if you want to store your forms as pure configuration; you can simply pass the configuration to the factory and be done."
Can anybody tell in detail what does PURE CONFIGURATION mean?
It means that you're able to store your forms within any config file, e.g. module.config.php and then pass this configuration key into the form factory. This is similar what has been done in ZF1 often times, too.
This whole process is done through the Zend\Form\Factory and if you check out the source code you'll see that you could pass it the following array to create a Form
$someConfig = array(
'form-key-name' => array(
'fieldsets' => array(
'fieldset_1' => array(
'elements' => array(
'elem_x' => array(/** Single Form-Element Array*/)
),
'fieldsets' => array(
'fs_y' => array(/** More Sub-Fieldset Array*/)
),
)
)
)
);
Note that this example is quite incomplete (missing name => foo), hydrator configuration, inputFilter configuration, etc... but as it is this should give you a idea of what's meant by that statement.
Using the above-mentioned configuration then you can pass it to the factory
$factory = new \Zend\Form\Factory();
$form = $factory->createForm($someConfig['form-key-name']);
I'm new to the Yii framework and I'm trying to access a property of the of a widget let's say CMenu where I want to change the values of some public properties like activeCssClass, firstItemCssClass, lastItemCssClass, htmlOptions etc. so how do you change the property of a widget in Yii.
Details:
I'm using Yii version 1.1.12 (Aug 19, 2012) and I'm trying to generate a multilevel menu but I need to change the values of some public class parameters and I don't know how?
Well, normally you apply needed values when you call the widget. You set them at the appropriate array inside widget call after widget class name.
$this->widget('zii.widgets.CMenu',
array(
'items' => $items,
'id' => 'main_menu',
'htmlOptions' => array('class' => 'nav'),
'activeCssClass' => 'active',
'firstItemCssClass' => 'first_item'
)
);
BUT! If you want to apply the values after you created some widget, but have not rendered it yet (really rare case) you can do this thing:
$widget = $this->beginWidget('application.components.MyOwnWidget');
$widget->public_property = 'aaa';
$widget->renderSomething();
$this->endWidget();
Adding on the previous answer, in case you missed it, don't forget to check the short and simple official documentation on this.
Hi I just got into wordpress theme development and I have seen many developers when setting the attribute for in for a function in an array use this sintax:
'name' => __( 'Portfolio'),
'singular_name' => __('Portfolio'),
I have tryed it and I could not find it any difference then writing it like this:
'name' => 'Portfolio',
'singular_name' => 'Portfolio',
Aldo I am a total beginner in both php and wordpress so maybe that's why.
So is there a difference beetween the two ways of writing?If so witch is better?
This is the Wordpress method of returning the proper language value through the localization module. Check this link for more details:
http://codex.wordpress.org/Translating_WordPress
How can I implement AJAX calls to my custom module's one of the field. My requirement is when we change some dropdown, it should check in the database and update the result in another field in same screen.
For normal modules, i See the .tpl files where I can insert script code and call. But for custom modules I didnt see the .tpl files except the cache directory (which are generating runtime).
Is there any method to implement.
I am using Sugar Professional.
Here are the steps you need to follow
Create a .php file which will read the values with query string and process the result as echo/print.
Go to editviewdefs.php in your custom module directory (eg. /custom/modules/...)
Find your field name and call a javascript function
array (
'name' => 'days_required_c',
'label' => 'LBL_DAYS_REQUIRED',
'displayParams' =>
array (
'field' =>
array (
'onChange' => 'setRenewalDate();',
),
),
),
Here RenewalDate is your javascript function name.
Create the script function which will call AJAX functionality like below.
var connectionObject =
YAHOO.util.Connect.asyncRequest ("GET", "getnextnum.php", callback);
YAHOO.util.Event.onContentReady("EditView", function () {
ldelim
}
initEditView(document.forms.EditView);
//alert("Loaded");
//document.getElementById("keyid_c").value = initCall();
{}
);