Iam working in a nopcommerce2.2 project which is in mvc framework.I wanted to get current customer id in aspx page. can i get current customer info in nopcommerce2.2?
use new WebWorkContext().CurrentCustomer
Add a dependency for IWebHelper to your constructor and use the CurrentCustomer property.
Related
I am using Alfresco Community 5.0.d and I'm getting below error.
ReferenceError: people is not defined
For following code in people-finder.js file:
var currentUser = people.getPerson(person);
I want to use the people methods for further process. Is there anyway to achieve this?
Also my target is to get all groups for the current user and the search result too.
One way I know is making ajax call to /alfresco/service/api/people/{people}?groups=true but this is an expensive way to achieve this.
Is there an alternative to achieve this?
Thanks
The "people" root object as well as any other that depends on repository tier services can not be accessed directly from a web script running in Alfresco Share.
if you wanted to get all the current user details in share webscript then you can get it using user Object
example:
Currently i have logged in with admin user
my webscript files
test.get.js
model.user=user;
test.get.html.ftl
${user}
Output ::
{lastName=, userStatus=null, alfUserLoaded=1489745903574,
userStatusTime=null,
alfUserGroups=GROUP_ALFRESCO_ADMINISTRATORS,GROUP_ALFRESCO_MODEL_ADMINISTRATORS,GROUP_ALFRESCO_SEARCH_ADMINISTRATORS,GROUP_EMAIL_CONTRIBUTORS,GROUP_SITE_ADMINISTRATORS,
firstName=Administrator,
userHome=workspace://SpacesStore/7338666a-7a02-4ab6-aa3b-5a46d06074ee,
id=admin, email=admin#alfresco.com}
list of groups in output::
GROUP_ALFRESCO_ADMINISTRATORS,GROUP_ALFRESCO_MODEL_ADMINISTRATORS,GROUP_ALFRESCO_SEARCH_ADMINISTRATORS,GROUP_EMAIL_CONTRIBUTORS,GROUP_SITE_ADMINISTRATORS
By repo webscript
if you wanted to get all the current user details in repo webscript then you can get it by using
example:
Currently i have logged in with admin user
my repo webscript files
test1.get.js
var users = people.getPerson(person.properties.userName);
var groups=people.getContainerGroups(users);
model["groups"] = groups;
test1.get.html.ftl file
<#list groups as g>
${g.name}
</#list>
output::
GROUP_ALFRESCO_ADMINISTRATORS GROUP_ALFRESCO_MODEL_ADMINISTRATORS
GROUP_ALFRESCO_SEARCH_ADMINISTRATORS GROUP_EMAIL_CONTRIBUTORS
GROUP_SITE_ADMINISTRATORS
I am new to Hybris.
Can anyone please let me know the function to get the order details in Hybris.
I need to pass the order details to SAP via we-service.
Thanks.
Biju
You can use orderFacade to get order details based on order code. For example
final OrderData orderDetails = orderFacade.getOrderDetailsForCode(orderCode);
orderFacade is using CustomerAccountService to get OrderModel and then populate it to orderData.
Or if you want to get Order History, you can use this function -
final SearchPageData<OrderHistoryData> searchPageData = orderFacade.getPagedOrderHistoryForStatuses(pageableData);
Hybris exposes most of the data available in hybris as a RESTful web service
. These files are named as
*Resource.Java.
you should find something to get order in one of the OrderResource.Java files.
I have a Webform on Drupal 7 and I am using it to email the administrator whenever an end user submits an entry on this form.
In the email template, I have defined a custom template and I am sending the data using
%email_values token.
However, I also want to send the value of a particular field on this form but not its label.
So I tried using %email[key] where key is the key of that field.
But this sends the label of the field as well as its value.
How can I avoid sending the label data in the email?
With Webform 3.x, it did not work at all on my website.
BUT, i've updated to webform 4.x, and it now works with the code :
Dear [submission:values:first_name],
It shows:
Dear Jean-Charles,
Thank you to user3641116, it helped!
Webform previously used its own custom token system to provide common tokens such as %title, %username, or %value[key]. In Webform 4.x, we use the token system provided by Drupal 7 core, which uses a format such as [node:title], [current-user:name], or [submission:values:key].
For all values: [submission:values]
D6 >> D7
%email[$key] [submission:values:$key]
%value[$key] [submission:values:$key:nolabel]
Example: [submission:values:your_details:first_name:nolabel]
See this for more examples: https://drupal.org/node/1609324
Well, this link solves the problem:
Drupal - Tokens for Webform Component Values
https://drupal.org/node/1010648
I used %values[key] to get submitted values.
I'm need to develop a .NET 3.5 application that imports data from Quickbooks, and I decided to use DNOA to OAuthorize with them. I downloaded the latest available version (4.1.something), took a look around, then create a QuickBooksConsumer following the example of GoogleConsumer. However, there is a problem I cannot seem to solve.
The url of the QuickBooks REST services looks like this:
https://services.intuit.com/sb/{0}/v2/{1}
where:
{0} is the name of the object to get the records of (like, "invoice", or "payment");
{1} is the realmId, i.e. the id of the Company the data is required for
The problem is that I don't see how to do PrepareAuthorizedRequest with such variable urls. The function is not virtual, so I cannot override it in my QuickBooksConsumer.cs. I'm stuck.
Can you please show me the way how to do that?
Thanks in advance!
Authorizing requests to dynamically created URLs should be no problem at all. Just wrap any URL in a MessageReceivingEndpoint and send it through ConsumerBase.PrepareAuthorizedRequest and you're good to go.
Does anyone have some sample code or can direct me to which class I can modify to add more information to the alert messages in Dynamics AX (DAX). I want to for instance add a vendor number and userid when a name of a vendor has been changed.
EDIT: I have been told by someone that HTML code must be entered in the description panel when setting up the alert. If this is true and anyone has more info on this it would be great if you could share this info.
Thanks in advance.
There's an article on Technet that shows the merge-data elements you can use in an e-mail template.
To add a new merge-data element, you will need to modify the class EventActionEmail. The method createEmailParameterMap returns a map containing the elements and the data to replace them with. The execute method passes that map to SysEmailTable::sendMail to actually format and send the email.