These are chat archives for mirumee/saleor

31st
Jul 2018
HAOYU CHEN
@haoyuc1_twitter
Jul 31 2018 07:27
Hi, I am a new developer to use saleor. I want to build my own store based on saleor.
I have some problems when I customize saleor.
Filip Kucharczyk
@Pacu2
Jul 31 2018 07:29
Sure, what's going on?
HAOYU CHEN
@haoyuc1_twitter
Jul 31 2018 07:30
I want to divide users to VIP user and general user. I found user_group and user_permission in database.
But I don't know how to create user_groups and set permissions
Filip Kucharczyk
@Pacu2
Jul 31 2018 07:39

Groups and Permissions are concepts fulfilled by Django https://docs.djangoproject.com/en/2.0/ref/contrib/auth/#django.contrib.auth.models.User.groups

New permissions can be created by defining them in Meta Class of desired model, then migrating the changes.
Groups can be created like any other object

We have a panel in the dashboard to manage staff's permission (staff management), but as I understood you want to use them for your customers?
Then you should create a custom panel somewhere in the dashboard for such purpose

HAOYU CHEN
@haoyuc1_twitter
Jul 31 2018 07:41
Thanks! I will take a look.
HAOYU CHEN
@haoyuc1_twitter
Jul 31 2018 07:48
I am trying to understand how to set user as "active" or "not active". But I didn't found the function to update it. Which file it is in?
Filip Kucharczyk
@Pacu2
Jul 31 2018 07:52
AFAIR you can set it from the dashboard
HAOYU CHEN
@haoyuc1_twitter
Jul 31 2018 07:55
Yes, I already saw it in dashboard.
But, the function which to set user as VIP is same as "is active" button. So, I want to know how it implemented.
I only saw customer_edit function under dashboard\customer.
But I still don't how it updated.
HAOYU CHEN
@haoyuc1_twitter
Jul 31 2018 08:01
I saw that when form is valid: form.save(). Then, success message pop-up and redirect. But how active state updated?
Filip Kucharczyk
@Pacu2
Jul 31 2018 08:02
We are using Django ModelForms, which handles the update logic, when you save the form, form's data is saved into the model
HAOYU CHEN
@haoyuc1_twitter
Jul 31 2018 08:02
Wow. Django is so interesting.
HAOYU CHEN
@haoyuc1_twitter
Jul 31 2018 08:03
Thanks so much!!
Николай Инкогнито
@mmmsvit_gitlab
Jul 31 2018 15:29
hi all, can you litle explaine, when i extend model or do any else action with models, can i use standart django admin for do quick prototype under develop stage? this possible?
Patryk Zawadzki
@patrys
Jul 31 2018 15:31
Nikolai, you will need to enable the admin (following Django documentation) as it’s not part of Saleor by default but other than that it should work
Николай Инкогнито
@mmmsvit_gitlab
Jul 31 2018 15:31
i understand this, but this will be work ?
possible?
Patryk Zawadzki
@patrys
Jul 31 2018 15:32
yes, it should work fine
Николай Инкогнито
@mmmsvit_gitlab
Jul 31 2018 15:32
great!)
and one more qs: how do virtual product type, not materiliazed? for example i sell music file, (not require shiping). And virtual products (how not materialized and not show in catalogue). Maby anybody already work on this feature, i wont help
Patryk Zawadzki
@patrys
Jul 31 2018 15:41
you can create a product type that does not require shipping however fulfilment (sending the file to the person) is up to you, Saleor does not currently have built in support for that
Николай Инкогнито
@mmmsvit_gitlab
Jul 31 2018 15:42
big th for help! Nice day!
sorry my poor english
Patryk Zawadzki
@patrys
Jul 31 2018 15:43
no worries, always happy to help
Chonlarnatt Poonchattakarn
@dongdooo
Jul 31 2018 17:04
May I ask why do we need to install nodejs for running saleor ?
Николай Инкогнито
@mmmsvit_gitlab
Jul 31 2018 17:16
nodejs used for assets build, read abiut webpack
about*
in future nodejs will be used for PWA (if i all read correct)