These are chat archives for mirumee/saleor

Dec 2018
Kémo Touré Jr.
Dec 23 2018 14:38
I am a following the documentations and currently have two main questions to better understand Django-payments. (1) In section 2.1, >> result is 120 in stead of 181.38 as stated in the tutorial. Is this normal? Do I miss something? (2) My second question is how to easily implement a payment gateway from a local bank
Thank you in advance for your answer and congratulations again for the great job
Chris Prinos
Dec 23 2018 15:27
is there a recommended way to have attributes that are scalar values instead of a list of possible values ? For example, if I have a variant attribute that is an alternate SKU, it's going to be unique for every variant and it doesn't make sense to store each of these values in the product variant table (plus it shows up in sidebar filter lists with all possible values as well)
Filip Kucharczyk
Dec 23 2018 18:23

@kemotoure_twitter Unfortunately django-payments were dropped from Saleor like 2 months ago, if favor of implementing the gateways directly. If you want to implement a gateway on your own, this might be helpful:

Here's a high level overview of the current payments architecture

@cprinos I don't think we've this case covered. Quickfix for now would be adding it as a new field to the model
Emmanuel Perez
Dec 23 2018 19:11
hi guys i had a question, i searched the docs and didnt found client product reviews, have you guys though about adding them? if not how could i go about implementing them without breaking anything?
Kémo Touré Jr.
Dec 23 2018 19:27
Thank you so much @Pacu2
Jakub Wiśniowski
Dec 23 2018 22:32

Hello, I'm trying to setup the PWA storefront but have some issue with it.

  1. I have regular Saleor up and running (master branch),
  2. PWA storefront is also set up and started with npm start (also master)
  3. When I visit PWA site (localhost:3000) I can see shop page but it is stuck on the loader - three animated dots are visible forever in the page center and no products are shown (I have some products defined and these are displayed in the regular saleor)
  4. there are no errors in the console, and no errors in the network tab in dev-tools. Django receives requests and responds with no errors too.

Any ideas on what to check?

Marcin Gębala
Dec 23 2018 23:03
@EmmanuelPerezP In the simplest form you could reviews using such model:
class ProductReview(models.Model):
    content = models.TextField()
    created_at = models.DateTimeField()
    user = models.ForeignKey(User)
    product = models.ForeignKey(Product)
It assumes that only registered users can add reviews. Of course you'll have to provide a form to add a review from the storefront. Question is whether you want to moderate the reviews. If yes, then some additional boolean flag would be needed and a dashboard view to manage reviews.
Hamid Reza Hassanzadeh
Dec 23 2018 23:07
Hey Guys, may I ask why this is called storefront? You have both the backend and frontend, then home come it is called font?
Marcin Gębala
Dec 23 2018 23:08
@restless This is really strange given there are no errors in the console. I'd recommend going to the "Application" tab (if you're using Chrome) and in the "Clear storage" section clearing all the app's data.
Are you sure that GraphQL requests are made to the server and the server sends response back? That's easy to debug if you filter /graphql requests in the Network tab.
Jakub Wiśniowski
Dec 23 2018 23:10

it's a fresh install - same happens in chrome and FF. clearing cache has no effect.

graphql responses are 200 and return some data too

Marcin Gębala
Dec 23 2018 23:11
@hassanzadeh By storefront we mean the frontend app which is accessible to customers (the public part). We also have the dashboard app (which is also has the frontend part) but this is only accessible to the staff and admins.
@restless You're sure you've installed all NPM packages without problems and you're running Node 10.x ?
TBH I have no idea what might be the issue.
Jakub Wiśniowski
Dec 23 2018 23:12
actually it's one graphql request that returns:
[{"data": {"shop": {"navigation": {"main": {"id": "TWVudTox", "items": [], "__typename": "Menu"}, "__typename": "Navigation"}, "__typename": "Shop"}}}, {"data": {"shop": {"homepageCollection": null, "__typename": "Shop"}, "categories": {"edges": [{"node": {"id": "Q2F0ZWdvcnk6MQ==", "name": "Gaming", "backgroundImage": null, "__typename": "Category"}, "__typename": "CategoryCountableEdge"}, {"node": {"id": "Q2F0ZWdvcnk6Mg==", "name": "Professional", "backgroundImage": null, "__typename": "Category"}, "__typename": "CategoryCountableEdge"}], "__typename": "CategoryCountableConnection"}}}, {"data": {"shop": {"navigation": {"secondary": {"items": [], "__typename": "Menu"}, "__typename": "Navigation"}, "__typename": "Shop"}}}]
yup, no errors in the npm output
Marcin Gębala
Dec 23 2018 23:13
Looks fine, and if you go to a category page that should have some products?
What is the response then ?
Jakub Wiśniowski
Dec 23 2018 23:14
how to get there? i don't see any link to the category page
node --version
Marcin Gębala
Dec 23 2018 23:18
Could you try upgrading to Node 10.x and reinstalling all NPM dependencies with that version?
Jakub Wiśniowski
Dec 23 2018 23:19
yes, I'll. thanks for the hint
Marcin Gębala
Dec 23 2018 23:20
On the homepage you should have a menu at the top that link to categories (in this case I'm in the Accessories):
That's the default state after running python populatedb
Jakub Wiśniowski
Dec 23 2018 23:32
@maarcingebala npm 10 + populatedb and it works. Awesome, thanks man
Marcin Gębala
Dec 23 2018 23:36
You're welcome!