by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Angel Angelov
    @FlushBG
    Has an endpoint for all available languages
    Not for the current one tho
    And the langs in the response don't seem to have a property stating that they're default
    Timo Helmke
    @t2oh4e
    I've been looking for a way to get or set the current language and currency as well. Haven't found it yet.
    Angel Angelov
    @FlushBG
    @t2oh4e hey mate I figured it out
    if you call their /sales-channel-api/v1/context endpoint, which isn't listed in the docs for some reason (found it in the source code), it returns a "salesChannel" object that has the languageId and currencyId as properties inside of it
    Timo Helmke
    @t2oh4e
    good to know :D @FlushBG
    Joshua Behrens
    @JoshuaBehrens
    Isnt the serving context giving information about the current language?
    WebProfiler says: sw-domain-id "e2a2b3f9ad5a4b69935d66e7f04eb573" as request attribute. I bet the request attribute resolver is reading the language from the domain id
    Checkout Shopware\Core\Framework\Routing\SalesChannelRequestContextResolver I think that is your place to look out
    and Shopware\Storefront\Framework\Routing\RequestTransformer sets the language
    Angel Angelov
    @FlushBG
    Yes, I manage to set the language properly, but I wanted to have the current one. Now I have it :D
    Angel Angelov
    @FlushBG
    Guys, change language isn't working for me. I call the context endpoint with a PATCH method, and the desired lang id, and the context token returned is the exact same as the one I sent. Can anyone assist on this?
    Timo Helmke
    @t2oh4e
    will changing the language change the token? :thought_balloon: did you check wether the same context token now returns the changed context?
    Angel Angelov
    @FlushBG
    Yes. I called the context endpoint with the returned token, and the language wasn't changed
    There is always the chance that I'm not looking at the correct property but
    it's the only one that makes sense
    Joshua Behrens
    @JoshuaBehrens
    Is shopware 6 not able to change languages yet? I though so. Maybe this will show you how to change languages
    Angel Angelov
    @FlushBG
    Well they claim to be able to
    but it ain't working :D
    Joshua Behrens
    @JoshuaBehrens
    snapple :D yes they claim a lot
    but they also can a lot
    Angel Angelov
    @FlushBG
    i kind of wanna see how the Storefront changes langs, cause it seems to be working there
    but not within api calls
    Joshua Behrens
    @JoshuaBehrens
    Can VueStorefront already change languages?
    Angel Angelov
    @FlushBG
    I suppose
    I'm not using them tho
    They have this project, 'shopware-pwa', which is too wooden right now for me
    so I used their shopware-6 client in my own custom nuxt project
    Joshua Behrens
    @JoshuaBehrens
    I am out of options :( sorry
    Uwe Kleinmann
    @kleinmann
    \Shopware\Storefront\Controller\ContextController::switchLanguage indicates that a storefront language switch simply is a URL switch.
    Angel Angelov
    @FlushBG
    But that doesn't help out api calls much , does it :(
    image.png
    besides, check this
    I believe any other urls would have a record in here
    with the respective language
    Almare
    @almare
    Are their any known problems in context of products with this.$super.('onSave') ? I only receive javascript errors..
    i dont know that the problems are
    just send a languageId to that endpoint and its switched
    Hüseyin Demirci
    @HDReady_gitlab
    Did someone know why iam not able to execute javascript at the offcanvas-cart.html.twig? a simple console.log will not work!
    Angel Angelov
    @FlushBG
    @shyim yeah dude great idea didnt think of that :D but no srsly, try doing it and share the results with me. I'd love to see u get a different language in the response
    Shyim
    @shyim
    that you should work
    its intented so
    Angel Angelov
    @FlushBG
    well it should, but it doesn't
    I will repeat -- I call the context endpoint with GET, then call it with PATCH and a languageId as a parameter, and the returned context token is the same. After that, I call it with GET again, and the languageId property of salesChannel object in the response hasn't changed either
    Angel Angelov
    @FlushBG
    @shyim got any insights mate?
    nikunjw3nuts
    @nikunjw3nuts

    Hello All,

    I have create custom element but display in backend and frontend

    nikunjw3nuts
    @nikunjw3nuts

    i try to using this ref. link :https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-element?category=shopware-platform-dev-en/how-to

    and create custom element same as given example in ref. link

    abin2hats
    @abin2hats

    Hi

    When i am trying to execute these query in mysql

    SELECT
    order_line_item.product_id,
    order_line_item.label,
    SUM(order_line_item.quantity) AS totalQuantity
    FROM
    order_line_item
    GROUP BY
    order_line_item.product_id
    ORDER BY
    totalQuantity
    DESC

    I got the following error

    Error in query (1055): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'shopware6_demo.order_line_item.label' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

    Can you please help me?

    Its just a simple query. why this happens