These are chat archives for mirumee/saleor

6th
Jul 2018
Yunaz Gilang Ramadhan
@YunazGilang
Jul 06 2018 03:57
hey i was trying to view the user order details, but i got this error : Parameter "form" should contain a valid Django Form. How to fix this?
image.png
NyanKiyoshi
@NyanKiyoshi
Jul 06 2018 05:05
Make sure the view returns a context with the form, and the form returned by the view is a form. The error is from bootstrap4, start looking around {% bootstrap_form form %} or something like that
Yunaz Gilang Ramadhan
@YunazGilang
Jul 06 2018 05:06
yes, it has been fixed now. seems like i am using the old version of saleor. and in the old version the syntax to check the order status in order to pass the note_form is different. now it has been fixed. thanks anyway.
NyanKiyoshi
@NyanKiyoshi
Jul 06 2018 05:07
Okay then
Em Tower
@emidiotorre
Jul 06 2018 11:18
Hi! I just started using Saleor for the first time and i'm very happy with it, but one feature we need are Packages ( products with subproducts ), i'm starting to develop it and would like to know if there is already some feature that i could exploit, or if there is a preferred way to do it rather than adding a field with a foreignKey to the Product Class, also how can I add it to the dashboard view with a user friendly selector. Thank you!
Also how could I develpo my own features and keep the Saleor Project intact without compromising the ability to updae it in the future? is there any preferred approach?
Patryk Zawadzki
@patrys
Jul 06 2018 11:20
bundles are tricky, there’s a whole lot of questions each implementer might answer differently: are they a product? of which class? do they inherit attributes or not? what about images? can a bundle contain multiples of the same product? should bundles have their own inventory or are they simply subtracted from each item’s stock?
Em Tower
@emidiotorre
Jul 06 2018 11:26
Right now i'm considering them as a product, with their images, attributes and so on, without the need of a dedicated inventory and subtracting the subproducts from the stock
Em Tower
@emidiotorre
Jul 06 2018 11:39
i suppose i could leverage signals for subtracting items from the stock and updating the bundle count accordingly to how many items i have left
Patryk Zawadzki
@patrys
Jul 06 2018 12:39
that would work if you allow overselling
say you have five cans of Coca Cola and a dinner bundle consisting of Coca Cola and fries, what if I add to cart four cans of Coca Cola and three dinner bundles?
Em Tower
@emidiotorre
Jul 06 2018 12:48
heheh it gets tricky.. i should count the items before letting you proceed to the checkout, and show you a message that informs you to remove the exceeding cans of Coca Cola
NyanKiyoshi
@NyanKiyoshi
Jul 06 2018 12:51
I wonder why it was decided to use React for the variant picker? Feels bad to see that (unminified and unoptimized) we get a storefront.js of 3.4MB versus 621 bytes without variant picker
Patryk Zawadzki
@patrys
Jul 06 2018 12:53
@NyanKiyoshi we’re slowly moving towards 100% react, I hope your production build is not 3.4MB 😟
NyanKiyoshi
@NyanKiyoshi
Jul 06 2018 13:01
I know :(
The current production build is of 446KiB (no bootstrap) and 487KiB with bootstrap. Server is sending it 142KiB with gzip hopefully