How to Reset the Order ID in magento 2 Multi store view - magento2

I have multiview in Magento 2 website, I want to reset the order id and I have to change the starting number of the order id. (ex: 100000100)
Please help to resolve the issue
Thanks in advance.

Open your PHP Admin database
Find & click on the table called: sequence_order_1 (it is located in the database itself, not in the information_schema )
Click on the "Operations" tab & under the "AUTO_INCREMENT" edit to the desired order number.

Related

Using same id (not active one)

I've got an issue with a button.
I've got clients, and these all have a number ( Clients:: ClientID). Now I want to make a button in another form and send the active clientID to another application which will use this clientID to display information in that application about that client.
Now I've made a button with the open URL which contains following code snippet:
"http://localhost:12345/showClientFile?clientid=" & Clients::ClientID
When I click the button in viewlayout, the application always (no matter which record I'm in) the same clientID and not the clientID from the record that I'm in. When I check the URL in the browser, it is also that same id constantly. Am I missing something?
If you're on a layout that isn't linked to the Clients table occurrence, then there must be a relationship from whichever TO your layout is linked to to the Clients table. Otherwise you wouldn't see any value for Clients::ClientID.
You say you want to send the "active clientID". How do you, or the system, know what the active clientID is? Is it stored in a global variable, as in $$_ACTIVE_CLIENT_ID, or perhaps a global field, Clients::g_active_client_id? When you can say to yourself, "When I want to know what the active client ID is, I look here," then you know what will need to be done to edit the URL calculation.
"http://localhost:12345/showClientFile?clientid=" & $$_ACTIVE_CLIENT_ID

Sitecore - WFFM : Link contact facet with user profile field

I'm working on a Sitecore 8 Update 2 site.
I'm also using the web forms for marketers.
I've set up a login and register form using WFFM. I was able to link fields on the form with the fields of the user profile ( the one used in User Management )
However when i want to make a "Update Contact Details" i can't link the fields on the form with the profile fields as before. Now i have to select a "contact facet". I added one of these and WFFM picked up on this, so now i can link the field on the form with a facet.
The last link i'm missing is linking this facet ( stored in Analytics - MongoDB ) to the profile field.
Does anyone know how to achieve this ?
Bonus: This started off as a slighty different question, you can read more about this issue here:
How to update sitecore user with webforms for marketers ( Update Contact Details )
First you need to add the Create User Save Action and setup the email address as the username.
Then you need to add the User login Save Action straight after that. This is because the Update Contact Details Save action only applies to logged in users.
Then you can use the Update Contact Details Save Action. This action will create data in MongoDB under the logged in user name - so if you go to the Identifiers collection MongoDB a new entry will be created (See screen shot below).
So in short the aspnet_membership data and the MongoDB data is linked via the username in WFFM. In aspnet_users - UserName and in MongoDB by way of an identifier. You can't mix the MongoDB and aspnet_profile data they belong in two separate places.
So once you have created this user in WFFM you could call up their details using the analytics API using the identifier:
Tracker.Current.Session.Identify(username);
var personalInfo = Tracker.Current.Contact.GetFacet<IContactPersonalInfo>("Personal");
Hope that makes sense :)

How can i get Last login user date time and update in user form in online CRM 2011

Hello i have created on field in user(systemuser) Form.so i need to show Last Login Date time in that field.so i have to write PlugIn/script or anything.so basically my question is i get the information from Audit View.but how can i write Plugin and on which entity.because i cant find the Entity Audit in Plugin Registration tool.if so then may be i can write the plugin on Create Audit and update it on User Form.
I have just tried in one sample like below but i cant find date field.but my question is where can i write plugin and update user form.
var query = from a in orgContext.CreateQuery("audit")
where (int)a["operation"] == 4 &&
a["objectid"] == "E39383B6-AFBB-45DD-9F4A-C140A03F1871"
select a;
how can i get that field from audit.
In short i want last login date and time for Login User..
Is there any way?
CRM 2011 doesn't support tracking when users login / logout. If you're running locally you'd have to hack together some sort of system that read IIS logs and then updates a custom field on the User entity itself...

SocialEngine 4 signup process

Im working in socialEngine 4 and i would really like to know if anybody have an idea of how to remove the following blocks for the signup process:
*Create account
*Create Profile
*Add photo.
*Invite friends...
For now i just want to register an email and the user for a landing page but when the users input the username and the email and click "Send" the create profile and change photo windows are shown (as the normal signup process) and i want that when the user put the username and email and click send, the success page is shown
I did search in the internet for something like this and i found
=">How to remove profile info step during signup process in socialengine4 php framework?
the query that is presented solves the problem i have? or for the profile information?
Thanks in advice!
The sign up process is defined in the database. Take a look at the engine4_user_signup table and you will see the following;
signup_id class order enable
1 User_Plugin_Signup_Account 1 1
2 User_Plugin_Signup_Fields 2 1
3 User_Plugin_Signup_Photo 3 1
4 User_Plugin_Signup_Invite 4 0
What you can do is just edit the row 'user_plugin_signup_photo' and set 'enable' to 0. You can also change the order of the sign up process.
The other option is to do the following;
1. Sign into your website as an administrator
2. Click 'admin' (top right navigation bar)
3. Under the 'Settings' tab click on 'Sign Up Process'
4. Then select if you want to 'give the users the option upon sign up'
Hope this helps
sign into your website as an administrator

vBulletin database

Whats up.
I'm looking for some information about linking a vBulletin user database with my actual website's database. I do already have a users table, users have their main website profiles and all, but I would also like them to be able to use the same account on the forum (forum not up yet)
So is it fairly simple to do that? I'm simply asking because I have no clue, and don't know where to start!
Any help would be really appreciated!
unless you want to do some serious editing to the vbulletin code i suggest using vbulletin's user table for everything. if you did the main site yourself it should be alot easier for you to edit it then to edit vb.
just connect to the database like normal. then use mysql to check their username/password like so:
SELECT * FROM `usertable` WHERE `username` = '$username' AND `password` = MD5(CONCAT(MD5('$password'),salt)) LIMIT 1
if you need to include extra data for your main site be careful just adding rows to the user table as vbulletin doesnt like that. few ways around it
make a vb plugin to the "userdata_start" hook with this code:
$this->validfields['custom_usertable_row'] = array(TYPE_INT, REQ_YES);
change TYPE_INT if your not saving an integer. and REQ_YES if the row can be null.
add custom user profile fields. from the admincp User Profile Fields>Add User Profile Field
it will add the field to a different table called userfield which you can get by joining the tables in a query
SELECT user.username, userfield.field1 FROM user LEFT JOIN userfield ON user.userid=userfield.userid
make your own table and join like above.