Create new API fields for CS-Cart Users - cs-cart

Is there a way i can create custom fields for Users in CS-Cart where i can store a particular value unique to each user using the CS-Cart API?
I want to add two unique fields

Users API is cs-cart built-in Entity. You can find Users entity (php code) from this folder /app/Tygh/Api/Entities/Users.php
you can edit the Users.php for your desired purpose.

Related

Access to Auth or Request in Laravel Model

I have a shop-store project. This project starts with basic functionality and grow up on each software life-cycle. Recently tendency to deploy some customization for user and analytics grow. I wanted to add favorite capability to project. The project has guest mode which unauthenticated user can see products.
Each user may choose to add a product to his/her favorites(after Auth). so far so good. I decide to append favorite attribute to products.
Trouble comes when i try to return products from controller as response. If i use Auth middleware unauthenticated users redirected to login. If i use custom code, every API with product should be changed accordingly. If i try to append filed in product model, i don't have access to Auth class nor requestin product model.
What's the way to handle such a situation? I appreciate your help.
UPDATE:
There are many models in my project. Order, OrderProduct, Product, User, Payment, Category, Delivery, ....
I want to have a new table named Bookmark which has two column: user_id and product_id.
Product == One Many == Bookmark
User == One Many == Bookmark
You can use the blade #auth directive to check for user authentication.
Then for templating
{{auth()-> user -> bookmark -> all()}}
This should work if you have established a one to may relationship between user and bookmark in your model.

I need a help on how to create a table for each users as a user's contact list

Hi I am working on Django rest frame work. I need a help on how to create a table for each users as a user's contact list. This table needs to be created after user got registered himself.
You don't need to create a table for each user. What you need is a many to many relationship between each user and the contact table.
You can read more about many-to-many relationships in the docs
In My Openion , You Should have Django Triggers,Signals and manyToMany Fields . Watch Django Official documentation You Could achieve Yourself.

Updating Okta User profile

I am using Okta C# sdk for development. I have created some custom user profile attributes in the Okta. I am able to create user and save values in custom attributes.
But as I saw that when you update profile data you have to provide all the details again. If you provide specific attributes value then sets null for other attributes. So how can I update only one or two attributes so that other should not change.
Dinesh.
You can use a POST /users/:id if you want to make a partial update. Make sure not to use a PUT for this operation else you will wipe out the remaining values that are not in the Request

how do I expose the user groups in a public registration-form in joomla?

When creating a new account from the front-end I'd like the user to be able to choose a user group in which to register (joomla 2.9). How do I expose the groups I created in the back-end into a registration form, for the users to choose one when registering? Thanks.
Well, you can just add the field to your form but the problem is that you would not want to show all of the groups since then people could select super admin or admin.
So what you need to do instead is make a custom field that is more selective.

What is the best way to implement Users & Roles Authorization and Authentication in MVC 3

I am looking to see what is the best way to implement asp.net membership in an MVC 3 project. One thing to note is that I have a separate users table and would like to still use this. So can I link my users table to the asp.net memberships table?
Cheers,
Noel.
You can create an additional field (unique identified type) on your custom table and link it to the membership users table.
create new user, if succeed then get id for the newly created user and insert it to your custom table.
MembershipUser mUser= Membership.GetUser(username);
Guid myId = (Guid)mUser.ProviderUserKey;
...Insert my/id to your custom table.
Description
You can implement your own MembershipProvider. Then you have full control about
how authentification works and wich database / tables are relevant.
I think you dont need the default asp.net membership database.
More Information
Create a Custom Membership Provider?

Resources