These are chat archives for mirumee/saleor

Aug 2018
Aug 21 2018 12:34 UTC
Hey guys thought I'd ask again: I've added a new field to the product form but cannot get the entry in the ajax response data. Where should I be looking (presumably within the javascript) to change this?
Filip Kucharczyk
Aug 21 2018 12:41 UTC
I'd guess it would be cart.js component
Aug 21 2018 12:42 UTC
I tried adding my form ID at:
Aug 21 2018 12:43 UTC
    let quantity = $('#id_quantity').val();
    let variant = $('#id_variant').val();
    let custom = $('#id_custom').val();
      url: $('.product-form').attr('action'),
      type: 'POST',
      data: {
        variant: variant,
        quantity: quantity,
        custom: custom

but never get a custom return value
ok well sounds like i'm at the right place at least
Filip Kucharczyk
Aug 21 2018 12:44 UTC
This message was deleted
Aug 21 2018 12:45 UTC
when I look at the product_add_to_cart request.POST I only see variant and quantity
that I believe is next function that gets called
Filip Kucharczyk
Aug 21 2018 12:46 UTC
Have you recompiled your js files after updating them?
Aug 21 2018 12:46 UTC
I have ensured that my custom field is part of the same form group as the others
now that I haven't done
sorry my js experience is limited - I'll give that a try and see if that works
Filip Kucharczyk
Aug 21 2018 12:52 UTC
We are converting all storefront-related js chunks into storefront.js file with webpack, please run npm run build-assets (or npm run watch to make it continous) to make sure your storefront.js file is refreshed, also you could insert a debugger to your js code to make sure everything is in place
Aug 21 2018 12:57 UTC
Thanks I will try it
Aug 21 2018 13:45 UTC
@Pacu2 Thanks it all works.
thanks for the help
Aug 21 2018 14:53 UTC
and it seems (you may already be aware) it is not straightforward to add new custom form inputs when show_variant_picker is True in the product_details func - this is because the form is put together (dynamically?) within the js assets. Maybe it is straightforward to others who know more javascript than I do! Fortunately I can just set show_variant_picker to False and control the form construction in the html template - I'm OK with this solution for my needs.
Aug 21 2018 18:02 UTC
Hi, guys.. Is there video or tutorail on installing Saleor in a Windows 10 for offline installation.?
Stephen Moloney
Aug 21 2018 18:53 UTC
the easiest way i can think of would be to install docker onto windows...
then just use docker-compose
i don't know of a video.
Николай Инкогнито
Aug 21 2018 19:39 UTC

Are possible use: Django Redis Session ( ? I try, just add:

if not CACHES['default']['BACKEND'].endswith('LocMemCache'):
    SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'

SESSION_ENGINE = 'redis_sessions.session'
    'host': 'localhost',
    'port': 6379,
    'db': 7,
    'password': '',
    'prefix': 'session',
    'socket_timeout': 1

all work fine

Aug 21 2018 23:28 UTC
Is there an existing api for saleor to use, similar to django-oscar-api?