How to change display name of admin side menu of nopcommerce - asp.net-core

Screenshot of the issue:
I want to change the display name.
What I did so far:
Added this line to sidemap.config
<siteMapNode SystemName="Customer reports" nopResource="Admin.Reports.Customers" PermissionNames="ManageCustomers" controller="Report" action="Customers" IconClass="fa-dot-circle-o" />
and
Added this line to defaultResources.nopres.xml
<LocaleResource Name="Admin.Reports.Rewords">
<Value>Reword Reports</Value>
</LocaleResource>
I was reading this blog : http://lateshtclick.com/blogpost/adding-a-new-menu-item-in-admin-panel
But it does not work! :(
I'm use NopCommerce 4.1

Default resources are added to the database on nopCommerce installation, thus if you're trying to add any entry programmatically, you would need to add that record to the DB too. To check if required resource is available or not:
Goto admin > configuration > Languages > English(default) > Edit > String resources tab
And try to search with Resource name Admin.Reports.Rewords, you would be found that record is not present, now add it manually by Add new button, and check it admin menu.
Hope this helps!

Related

Wrong "ReflectedWorkItemIDFieldName" while migrating Azure DevOps Work Items

I am testing the azure-devops-migration-tools and have create a project using https://azuredevopsdemogenerator.azurewebsites.net/ (Parts Unlimited). I have generated the configuration.json and changed the Source and Target so I can test a migration, but I'm getting errors while migrating Work Items.
[15:14:41 ERR] Error running query
Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «ReflectedWorkItemId».
I've tried different options on the "ReflectedWorkItemIDFieldName" field, Scrum, Basic, Agile, Custom, empty but am still unable to migrate the work items.
How can I get the value to put on this field for the specific project?
Thanks,
Bruno
Quick Solution: Most ADO instances use the prefix 'custom' for new fields. Try "Custom.ReflectedWorkItemId" in your configuration.json to see if that resolves the problem.
More details: It's hard to tell without an actual configuration.JSON file to review. One possible problem is that you need to use the actual and full internal 'Name' of the ReflectedWorkItemID field. This doesn't show in ADO, or the Process Template when created. The recommendation is that you create a query referencing your custom field, and export the WIQL file (query file). Once you export the WIQL file, you can then open the file and see the full syntax of the custom field.
Exporting Queries: If you don't know how to do this, it can be done with VisualStudio. If you don't know how to do that, you can install this extension. It's a handy WIQL import/Export and editor. Install, and your ADO Queries with have an Edit in WIQL Editor option. Create a query that exposes your 'ReflectedWorkItemID' as a column, then edit that query in the WIQL editor and see the full names of the Reflected Work Items ID Feild. https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor
SELECT
[System.Id],
[System.WorkItemType],
[System.Title],
[System.AssignedTo],
[System.ChangedBy],
[Custom.ReflectedWorkItemId]
FROM workitems
WHERE ...
I found a possible solution. I have created a custom process, change the process from the projects to this new one and add a new field. This is the field I'm using on the configuration.json and now I'm able to migrate work items
To make the migration in the "ReflectedWorkItemIDFieldName" you must do:
"Organization Settings" -> Process -> Select the process where you project are (Basic, Scrum, Agil, or CMMI).
then click on the 3 dots and create a new Inherited process.
Then with the inherited process, you are able to create a new field for each work item type. The name that you type (could be "IronMan") that name will be in your configuration file.

How can I change invoice sequence in Odoo 10?

I want to change this format generated by default in odoo , with a custom format from this:
to this :
ING-ENR-YEAR-MONTH
How I can do it?
activate the developer mode
Go to Settings > Technical > External Identifiers > Sequences
Search for the Customer Invoices and open the record
Change the prefix to ING-ENR-%(year)s-%(month)s (see image)
hope this helps!

prestashop mail customisation, and module translation

i have two question
1 - i installed referral program module , and i would like to customise the referralprogram-invitation.html mail template
so i putted the new template under : prestashop_root/themes/my_theme/modules/referralprogram/mails/referralprogram-invitation.html
but i doesn't work !
2 - i would like to add some extra text to the program page of referral program module
so i copied the file already included with the module under
prestashop_root/themes/my_theme/modules/referralprogram/translations/fr.php and I added the new text translation in this form
$_MODULE['<{referralprogram}prestashop>program_MD5'] = 'new text';
and it does not work?!!
You only forgot the language folder. Your mail templates must not be in :
prestashop_root/themes/my_theme/modules/referralprogram/mails/referralprogram-invitation.html
but in
prestashop_root/themes/my_theme/modules/referralprogram/mails/fr/referralprogram-invitation.html
If you want to add text to the program page, you must:
First, make a copy of the file : prestashop_root/modules/referralprogram/views/templates/front/program.tpl to prestashop_root/themes/my_theme/modules/referralprogram/views/templates/front/program.tpl
Then, you need to modify this file and add the text you want, where you want. To be translatable, your text must be added like this {l s='new text' mod='referralprogram'}.
Finally, you need to translate this text via the Localization > Traductions page of your BO and not directly in the fr.php file.
Do not hesitate if you need more information,
Paul.

Adding quick link on admin home page (Prestashop 1.5.4)

Good day! Tell me, how can I add a quick link on the home page of the administrator to configure my module?
Follow the following steps:
1) In admin section to go Administration at top menu and then click on Quick Access.
2) IN next page click on Add new and you will see a form
3) Now open admin panel in another tab and to the module page or section, of which you want to place a link in quick access.
4) Copy that complete link in note pad and remove the token section of the link. It is required to remove the token section according to Prestashop.
5) Now come back to the add new form for quick access, give your link a name and then copy that modified link to the Url field.
6) Save it and you will have that link in quick access.
The above is method is used to add it at admin. Now if you want to add it pro-grammatically you can follow the following steps.
1) In your module in the install function, user a code like below
Db::getInstance()->insert('quick_access', array('new_window' => 0, 'link' => 'link_to_your_module_page'));
//an entry is made in quick_access table, get the quick_access id to insert lang data
$id = Db::getInstance()->Insert_ID(); //this will give you last inserted ID from quick_access table which is your current quick_access id.
//now make insertions in quick_access_lang table for multi language data.
//get all your site languages, and place a foreach loop and in that loop insert
//data into the quick_access_lang table using below code
Db::getInstance()->insert('quick_access_lang', array('id_quick_access' => $id, 'id_lang' => 'lang_id', 'name' => 'name of your link'));
//Now for uninstalling module, you want to delete the link, so you need to store the quick access link id in configuration table so you can use it later.
Configuration::updateValue('MY_QUICK_ACCESS_LINK_ID', $id);
2) Now in your uninstall function in your module class, place the below code
$id = Configuration::get('MY_QUICK_ACCESS_LINK_ID'); //get id of your quick access link
Db::getInstance()->delete('quick_access', 'where id_quick_access = '.$id);
Db::getInstance()->delete('quick_access_lang', 'where id_quick_access = '.$id);
//now delete the id from config table
Configuration::deleteByName('MY_QUICK_ACCESS_LINK_ID');
Note : The above code is not tested, it may / may not need some adjustments.
Thank you
There is a hook in Prestashop DisplayAdminHomeQuickLinks it will help you to add quick link on prestashop admin panel. I have use this in my theme. http://goo.gl/0S3mn And it will help you to solve the quick link.
In Prestashop 1.6.1 (maybe earlier too) in Admin view, at the top of the page, Quick Access has the option to "Add current page to QuickAccess". So just navigate to the Configuration page you need and use it.

How to localize the display name of an app for the Windows Store?

I registered a German and an English name for my Windows 8 app in the Windows Store Dashboard.
Afterwards I created two files in my solution:
Strings/de/Resources.resw with name "AppName" and value "German Title"
Strings/en/Resources.resw with name "AppName" and value "English Title"
Then I clicked on Edit App Manifest. In the display name field I entered "ms-resource:/AppName" but when I want to build my app I get an error which says that "NamedResource" cannot be found.
What am I doing wrong?
The documentation only writes: "Display Name: Specifies the friendly name for the app that is displayed to users. This string is localizable". But I have only one field (called Display name) in my app manifest to indicate my app name.
Ok. I've found it! For the "Display name" in "Package.appxmanifest" I have to enter "ms-resource:AppName". One should also enter "ms-resource:AppName" for the "Package display name" field (in tab Packaging).
I'd like to add an addendum to Benny Neugebauer's answer. If your .resw file happens to be stored in another assembly (as mine was), you might have to give it the fully qualified path to your resource name.
For example, if your AppName string was in a project named OtherProject, and a file named AppResources, and had a key of AppName, you would use the following syntax:
ms-resource:OtherProject/AppResources/AppName