These are chat archives for mirumee/saleor

31st
Oct 2018
M Abdullah Abid
@wulaaf
Oct 31 2018 08:06
@Pacu2 Did you guys move def can_mark_as_paid() from order.models?
Filip Kucharczyk
@Pacu2
Oct 31 2018 08:08
Check the code as I don't remember
We've just dropped django-payments in favour of adding the payment methods directly to Saleor
M Abdullah Abid
@wulaaf
Oct 31 2018 08:08
Yup, I believe it was moved from models. views as can_mark_as_paid = not order.payments.exists()
models to views*
Filip Kucharczyk
@Pacu2
Oct 31 2018 08:10
It's on the Order's model
M Abdullah Abid
@wulaaf
Oct 31 2018 08:11
Hmm. Weird.
M Abdullah Abid
@wulaaf
Oct 31 2018 08:37
Aw shiz. I gotta refactor everything I did. -__-. Are you guys going to stick with saleor.payments, is that for certain?
Filip Kucharczyk
@Pacu2
Oct 31 2018 09:03
Yup
It's staying there for good
M Abdullah Abid
@wulaaf
Oct 31 2018 09:10
Alright
Pete Dermott
@petedermott
Oct 31 2018 09:15
Hey everyone, I've just been looking at the demo store and comparing it to my clean install. As far as I can tell the filters for products in categories on the front end (i.e https://demo.getsaleor.com/en/products/category/apparel-1/?collar=v-neck&sortBy=name) work differently on the demo shop to the way they work in the current code base (it looks like the storefront is using React on the demo shop?) Am I correct in this assumption?
If so is there any way to view the code that is used on the current demo shop? From what I can tell its not in any of the branches the GitHub repo?
Filip Kucharczyk
@Pacu2
Oct 31 2018 09:18
Demo store has some customizations, as it does not allow POST methods, category/collection page is rendered in React
You can check out the latest release tag demo/v2018.09
But new one, demo/v2018.10 should be released just today
AJ
@ajostergaard
Oct 31 2018 09:26
@Pacu2 given you are dropping django-payments (which I knew but didn't realise it was so imminent) what are your plans for supporting pluggable payment providers, if any plans exist? AFAIK you guys cannot support a myriad of payment providers yourselves so what is the suggested model for integrating un-supported providers. Forking Saleor is obviously an option but doesn't enable the community to contribute new providers.
Filip Kucharczyk
@Pacu2
Oct 31 2018 09:28
New providers should be added directly to Saleor project, at least for now.
In the future, when payments module will be more stable (we still have couple of functionalities to do), they can be extracted into separate modules.
mirumee/saleor#3203 adds a last bit of the docs on how-to add a new payment method
AJ
@ajostergaard
Oct 31 2018 10:29
@Pacu2 So you'll accept a PR adding my provider of choice?
manish211215
@manish211215
Oct 31 2018 10:29
sir i came here from github
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 10:30
@ajostergaard that's right
manish211215
@manish211215
Oct 31 2018 10:30
so please give me the solution
and further when i run all commands and finally run 'python manage.py runserver' and open in my browser than i got this error as below -
for entry in os.listdir(path):
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'F:\myprojects\saleor\saleor\static\assets'
AJ
@ajostergaard
Oct 31 2018 10:31
@NyanKiyoshi thanks but no offence - I'd like to hear it from the horses mouth. ;) (No offence Filip - English expression.)
PS: Horses are awesome majestic creatures. :-D
Filip Kucharczyk
@Pacu2
Oct 31 2018 10:32
Nyan is right, I've already talked with him about it
AJ
@ajostergaard
Oct 31 2018 10:32
Thank you! :)
Look out for my PR on Monday morning... ;)
manish211215
@manish211215
Oct 31 2018 10:33
sir please help
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 10:34
@manish211215 did you run npm run build-assets ?
AJ
@ajostergaard
Oct 31 2018 10:34
@manish211215 did you run the node commands before trying runserver? (also - calm down - everybody is busy - nobody here is payed to help you!)
@NyanKiyoshi LOL :-D
manish211215
@manish211215
Oct 31 2018 10:35
sir but it not worked properly
M Abdullah Abid
@wulaaf
Oct 31 2018 10:35
With the new saleor.payments addition, where does it make a call for the successurl on creation of transaction?
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 10:35
@manish211215 Output?
M Abdullah Abid
@wulaaf
Oct 31 2018 10:35
Can’t seem to find it
manish211215
@manish211215
Oct 31 2018 10:37
when i run npm run build-assets than i got as below

(myprojects) PS F:\myprojects\saleor> npm run build-assets

saleor@0.0.0 build-assets F:\myprojects\saleor
webpack -p

(node:22192) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
i 「atl」: Using typescript@3.0.1 from typescript
i 「atl」: Using tsconfig.json from F:/myprojects/saleor/tsconfig.json
i 「atl」: Checking started in a separate process...
i 「atl」: Time: 5693ms
Hash: b81528946d48f086368e
Version: webpack 4.16.5
Time: 102993ms
Built at: 10/31/2018 4:10:36 PM
19 assets
[298] ./saleor/static/dashboard-next/index.tsx 6.68 KiB {1} [built]
[650] ./node_modules/apollo-client/index.js + 25 modules 143 KiB {1} [built]
| 26 modules
[661] ./saleor/static/dashboard/js/dashboard.js 151 bytes {0} [built]
[665] ./saleor/static/dashboard/scss/dashboard.scss 2.58 KiB {0} [built] [failed] [1 error]
[878] ./saleor/static/dashboard-next/auth/AuthProvider.tsx 3.92 KiB {1} [built]
[1300] ./saleor/static/dashboard-next/collections/index.tsx 1.53 KiB {1} [built]
[1325] ./saleor/static/dashboard-next/home/index.tsx 275 bytes {1} [built]
[1386] ./saleor/static/dashboard/js/document.js 48 bytes {2} [built]
[1387] ./saleor/static/dashboard/scss/document.scss 2.58 KiB {2} [built] [failed] [1 error]
[1388] ./saleor/static/js/storefront.js 523 bytes {3} [built]
[1390] ./saleor/static/scss/storefront.scss 2.58 KiB {3} [built] [failed] [1 error]
[1412] ./node_modules/apollo-cache-inmemory/lib/index.js + 50 modules 157 KiB {1} [built]
| 51 modules
[1414] ./node_modules/apollo-link-error/lib/index.js + 5 modules 10.4 KiB {1} [built]
| 6 modules
[1415] ./node_modules/apollo-link-context/lib/index.js + 5 modules 9.26 KiB {1} [built]
| 6 modules
[1416] ./node_modules/apollo-upload-client/lib/module/index.js + 2 modules 9.64 KiB {1} [built]
| 3 modules

+ 1402 hidden modules

ERROR in ./saleor/static/dashboard/scss/dashboard.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: ENOENT: no such file or directory, scandir 'F:\myprojects\saleor\node_modules\node-sass\vendor'
at Object.readdirSync (fs.js:750:3)
at Object.getInstalledBinaries (F:\myprojects\saleor\node_modules\node-sass\lib\extensions.js:129:13)
at foundBinariesList (F:\myprojects\saleor\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (F:\myprojects\saleor\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (F:\myprojects\saleor\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (F:\myprojects\saleor\node_modules\node-sass\lib\binding.js:15:30)
at Object.<anonymous> (F:\myprojects\saleor\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (F:\myProjects\saleor\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (F:\myProjects\saleor\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object.sassLoader (F:\myprojects\saleor\node_modules\sass-loader\lib\loader.js:46:72)
at runLoaders (F:\myProjects\saleor\node_modules\webpack\lib\NormalModule.js:286:20)
at F:\myProjects\saleor\node_modules\loader-runner\lib\LoaderRunner.js:364:11
at F:\myProjects\saleor\node_modules\loader-runner\lib\LoaderRunner.js:230:18
at runSyncOrAsync (F:\myProjects\saleor\node_modules\loader-runner\lib\LoaderRunner.js:143:3)
at iterateNormalLoaders (F:\myProjects\saleor\node_modules\loader-runner\lib\LoaderRunner.js:229:2)
at Array.<anonymous> (F:\myProjects\saleor\node_modules\loader-runner\lib\LoaderRunner.js:202:4)
at Storage.finished (F:\myProjects\saleor\node_modules\webpack\node_modules\enhanced-resolve\lib\CachedInputF

NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 10:42
Did you run npm i?
manish211215
@manish211215
Oct 31 2018 10:43
yes i run npm install before npm run build - assets
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 10:43
Output?
manish211215
@manish211215
Oct 31 2018 10:44
wait a minute

but when i run command in powershell ' npm install ' then it stuck here as below i , so my question is is npm installed or not , please give me reply asap . thanks
ownloading Chromium r555668 - 123.3 Mb [========= ] 47%Downloading Chromium r555668 - 123.3 Mb [====================] 100% 0.0s
Chromium downloaded to F:\myprojects\saleor\node_modules\puppeteer.local-chromium\win64-555668
npm WARN babel-loader@7.1.4 requires a peer of babel-core@6 but none is installed. You must install peer dependencies yourself.
npm WARN awesome-typescript-loader@5.2.0 requires a peer of typescript@^2.7 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.1.2 requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 22 packages from 14 contributors and audited 73183 packages in 2216.636s
found 2 low severity vulnerabilities
run npm audit fix to fix them, or npm audit for details

what should i do now ?
Filip Kucharczyk
@Pacu2
Oct 31 2018 10:48
Have you tried googling for this error?
What are the npm and nodejs versions you are using?
manish211215
@manish211215
Oct 31 2018 10:48
not yet
i have one question should i upgrade my node js version from 10.8 to 10.13 or not
right now i have
(myprojects) PS F:\myprojects\saleor> node -v
v10.8.0
(myprojects) PS F:\myprojects\saleor> npm -v
6.2.0
Filip Kucharczyk
@Pacu2
Oct 31 2018 10:51
Could you try installing the peer dependencies manually?
I'm really busy today so have not really time to debug it, you might want to try googling first
manish211215
@manish211215
Oct 31 2018 10:51
how do i do that ?
should i upgrade my node js version first or not ?
from 10.8 to 10.13
M Abdullah Abid
@wulaaf
Oct 31 2018 10:53
@wulaaf https://github.com/NyanKiyoshi/saleor/blob/ef38d4395/saleor/order/views.py#L146
def process_payment(self):
    # COD provider requires no real token
    fake_token = self.gateway.get_client_token(**self.gateway_params)
    self.payment.authorize(fake_token)
    return HOW DO I CALL THE payment_success HERE?
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 10:54
You don't have to, Saleor automatically does it, it's no longer part of the payment provider to do it
M Abdullah Abid
@wulaaf
Oct 31 2018 10:54
Hmm
manish211215
@manish211215
Oct 31 2018 10:56
@Pacu2 should i upgrade my node js version first or not ?
from 10.8 to 10.13
please reply
one more time
AJ
@ajostergaard
Oct 31 2018 10:57
@manish211215 why not just upgrade it? In general you should be runnning latest versions of stuff (not always but in general).
manish211215
@manish211215
Oct 31 2018 10:57
ok
M Abdullah Abid
@wulaaf
Oct 31 2018 10:57
@NyanKiyoshi, self.payment.capture() runs successfully but it does not redirect to checkout-success. That’s what I’m trying to figure out.
M Abdullah Abid
@wulaaf
Oct 31 2018 11:10
Successful capture returns me to the detail view
M Abdullah Abid
@wulaaf
Oct 31 2018 12:03
Lol. I was going nuts here. Thought I'd missed something. I guess I can write my own view inside payments for the time being?
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 12:05
Noooo
Why bother yourself
Index: saleor/order/views.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- saleor/order/views.py    (revision 617518b8165f1866be41efc66538f06ad2239be7)
+++ saleor/order/views.py    (date 1540987466000)
@@ -119,7 +119,7 @@
             except PaymentError as exc:
                 form.add_error(None, exc.message)
             else:
-                return redirect(order.get_absolute_url())
+                return payment_success(request, order.token)
     template = PAYMENT_TEMPLATE % gateway
     ctx = {
         'form': form, 'payment': payment,
M Abdullah Abid
@wulaaf
Oct 31 2018 12:05
Ah i see what you mean
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 12:06
Just fix the redirect with the above patch :wink:
M Abdullah Abid
@wulaaf
Oct 31 2018 12:42
Thanks
manish211215
@manish211215
Oct 31 2018 13:02
anyone could help me why i am getting this error as below , when i run the command python manage.py runserver and open the local host in the browser
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'F:\myprojects\saleor\saleor\static\assets
please help i am stuck with that about 2 days
manish211215
@manish211215
Oct 31 2018 13:22
and what should i do now??
manish211215
@manish211215
Oct 31 2018 13:38
and one more question is that the command - npm run build-assets should i run in root directory saleor or in saleor/saleor
M Abdullah Abid
@wulaaf
Oct 31 2018 13:44
Root
manish211215
@manish211215
Oct 31 2018 14:16
but when i run the command python manage.py runserver and open the browser its showing the error as below -
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'F:\myprojects\saleor\saleor\static\assets
what should i do now please help
M Abdullah Abid
@wulaaf
Oct 31 2018 14:17
Did you follow the steps for Windows?
One by one
manish211215
@manish211215
Oct 31 2018 14:17
yes i follows all the steps
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 16:25
That new README is... sexy wow!! Good job everyone!!!
M Abdullah Abid
@wulaaf
Oct 31 2018 16:25
Haha yeah I agree
Filip Kucharczyk
@Pacu2
Oct 31 2018 16:31
wait for the rest
it should be ready.. ehm... 3 hours ago :D We have a slight delay but getting there
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 16:32
Oh! Don't worry, I'm waiting!! :santa:
Hang in there :tada:
Stephen Moloney
@stephenmoloney
Oct 31 2018 16:34
totally cool
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 18:31
#3214 those new pictures! Love it!
Filip Kucharczyk
@Pacu2
Oct 31 2018 18:34
There will be more of them coming
Aiming for 3-4 product list x 20 products x 2-4 photos per product
M Abdullah Abid
@wulaaf
Oct 31 2018 18:35
Naauice
Filip Kucharczyk
@Pacu2
Oct 31 2018 18:35
that's just an intro
M Abdullah Abid
@wulaaf
Oct 31 2018 18:35
Has anyone here been to a WebSummit before?
M Abdullah Abid
@wulaaf
Oct 31 2018 18:42
Holy shit. I just saw the cover for README!!!
Nextlevel
Kind of reminds me of an inverted digitized wagtail
Michał Ociepka
@mociepka
Oct 31 2018 18:53
I will just leave this here:
https://github.com/mirumee/saleor-storefront
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 19:01
image.png
Love the new design :wink:
Michał Ociepka
@mociepka
Oct 31 2018 19:03
:D demo is deploing right now
M Abdullah Abid
@wulaaf
Oct 31 2018 19:03
woot woot
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 19:04
Anyway, wow, just awesome
:clap:
M Abdullah Abid
@wulaaf
Oct 31 2018 19:04
Dayyuumm
Filip Kucharczyk
@Pacu2
Oct 31 2018 19:18
No spoilers before the official release!
At least not from figma :trollface:
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 19:19
:eyes:
Filip Kucharczyk
@Pacu2
Oct 31 2018 19:19
site is live already btw
we just need to swap the products' content
M Abdullah Abid
@wulaaf
Oct 31 2018 19:22
Btw, whoever did the logo, what did you use?
Like what tools or apps?
Filip Kucharczyk
@Pacu2
Oct 31 2018 19:25
"Adobe illustrator with lots of prototypes on the paper sheets"
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 19:26
Quoting a coworker?
M Abdullah Abid
@wulaaf
Oct 31 2018 19:26
Neat
Filip Kucharczyk
@Pacu2
Oct 31 2018 19:26
yup
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 19:26
He must be crazy (jk) that's really impressive to come up with something like that
M Abdullah Abid
@wulaaf
Oct 31 2018 19:26
Man, I know a little bit of Vue.js. I guess I’ll have to start digging into React.
So many things… so little time
Patryk Zawadzki
@patrys
Oct 31 2018 19:34
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 19:34
1.0 released :tada:
Filip Kucharczyk
@Pacu2
Oct 31 2018 19:35
0.1*
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 19:36
I read 1.0 on my notifications, my bad, I will relearn reading!
M Abdullah Abid
@wulaaf
Oct 31 2018 20:00
WONDERFUL!!
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 20:02
:tada:
Patryk Zawadzki
@patrys
Oct 31 2018 20:02
beta software showcase so terms and conditions apply ;)
AJ
@ajostergaard
Oct 31 2018 20:03
Can I just say:
YOU GUYS ROCK!!!
THANK YOU!!! :-D
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 20:08
managed to break the front store client side :grin:
Patryk Zawadzki
@patrys
Oct 31 2018 20:08
good! file issues :D
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 20:09
Gotta find how I managed to make that happen first haha
I think it's because I tried to order first, and seems like it didn't fully complete then, tried again, and crashed.
M Abdullah Abid
@wulaaf
Oct 31 2018 20:13
if not DEBUG:
GATEWAY_PATH = '%(module)s/init.py'
for gateway, data in PAYMENT_GATEWAYS.items():
if gateway not in CHECKOUT_PAYMENT_GATEWAYS:
continue
if 'module' not in data or 'connection_params' not in data:
raise ImproperlyConfigured('Payment gateway misconfigured.')
module_path = {'module': data['module'].replace('.', '/')}
payment_gateway_file_exists = os.path.isfile(
GATEWAY_PATH % {'module': module_path})
if not payment_gateway_file_exists:
raise ImproperlyConfigured(
'No configuration files for %s payment gateway.' % gateway)
django.core.exceptions.ImproperlyConfigured: No configuration files for cod payment gateway.

GATEWAY_PATH = '%(module)s/init.py'

Is there a mistake in there?
Patryk Zawadzki
@patrys
Oct 31 2018 20:16
sorry, we need to go home after 11 hours at the office, please open an issue on GitHub if no one else is able to help you
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 20:16
Rest well, it's deserved
M Abdullah Abid
@wulaaf
Oct 31 2018 20:16
That’s alright. Will do! You guys should go celebrate!!
Filip Kucharczyk
@Pacu2
Oct 31 2018 20:42
@wulaaf this code is out already
please download the latest master as I've squeezed another ~300 lines into payments today
no breaking changes tho, just cleanups
M Abdullah Abid
@wulaaf
Oct 31 2018 20:43
I did already
{'module': 'saleor/payment/gateways/cod'}
{'module': 'saleor/payment/gateways/cod'}/init.py
This is what it gets rendered as, module_path
NyanKiyoshi
@NyanKiyoshi
Oct 31 2018 20:44
Are you sure you pulled the latest changes from master? This code is no longer present in master
M Abdullah Abid
@wulaaf
Oct 31 2018 20:45
Hmm. I rebased onto the latest master
Filip Kucharczyk
@Pacu2
Oct 31 2018 20:45
Please try again, as we've merged those changes few hours ago
M Abdullah Abid
@wulaaf
Oct 31 2018 20:45
Alright
Igor
@IFLead
Oct 31 2018 21:59
how to add voucher to order with help of graphql?
Filip Kucharczyk
@Pacu2
Oct 31 2018 22:01
Not sure if thats possible atm
I think we've missed this mutation, do you mind opening an github issue?
It's only doable for the draft orders atm
Igor
@IFLead
Oct 31 2018 22:06
yes, i can :) thank you so much for the saleor!