https://solidus.io logo
Join Slack
Powered by
# support
  • j

    Justin Mac Carthy

    01/17/2022, 10:39 AM
    What is the current state of caching in the API. Its seems like its way behind spree in this area?
    k
    • 2
    • 2
  • r

    Ricky

    01/18/2022, 1:51 AM
    I want to use a js library(cocoon) for the Soliodus admin panel, but I get an error when I try the following
    Copy code
    ## try
    1. yarn add github:nathanvda/cocoon#c24ba53
    2. require("cocoon") added at vendor/assets/javascripts/spree/backend/all.js
    3. get error `Uncaught ReferenceError: require is not defined`
    
    ## environment
    rails	6.1.4.1
    solidus	3.1.2
    ruby	2.7.1
    node	14.15.0
    yarn	1.22.10
    What would be the best way to do it?
    j
    • 2
    • 5
  • a

    Andrew

    01/18/2022, 1:48 PM
    has any one gotten
    solidus_searchkick
    to work solidus 3.x?
  • x

    Xan

    01/18/2022, 8:24 PM
    Trying to customize Solidus to show/use different pricing options based on the users role.. keep trying things like adding a new column to Prices but trying to figure out where to go to get it to actually use it on the store
  • j

    Jared Norman

    01/18/2022, 8:25 PM
    you'll need to use a custom pricing options class and modify the price selector.
  • x

    Xan

    01/18/2022, 8:26 PM
    was looking over the docs trying to find anything about it
  • j

    Jared Norman

    01/18/2022, 8:27 PM
    The pricing options class acts as the parameters to the price selector, if that helps.
  • j

    Jared Norman

    01/18/2022, 8:28 PM
    They get constructed in different ways depending on the context, but always passed to the selector when a price needs to be selected.
  • x

    Xan

    01/18/2022, 8:29 PM
    should I just start digging into the solidus_core gem probably?
    e
    • 2
    • 5
  • j

    Jared Norman

    01/18/2022, 8:29 PM
    yeah, looking at those two classes and how they are used is probably a good way to go
  • x

    Xan

    01/18/2022, 8:39 PM
    I know there’s some naming convention thing.. but for this it sounds like one of the files I’d need to extend would be app/models/spree/variant/price_selector.rb
  • x

    Xan

    01/18/2022, 8:39 PM
    would that just go in like.. lib/companyname/models/spree/variant
  • x

    Xan

    01/18/2022, 8:43 PM
    Have been out for almost a year with everything going on and trying to remember how to actually extend something like this
  • j

    Jared Norman

    01/18/2022, 8:47 PM
    That's actually a configurable class (there's a config option in solidus for what class you want to use), so rather than trying to extend the existing class, you can create your own and configure solidus to use it.
  • j

    Jared Norman

    01/18/2022, 8:47 PM
    This is true of both the price selector and pricing options.
  • x

    Xan

    01/18/2022, 8:49 PM
    and you could just access the current users role inside that class?
  • j

    Jared Norman

    01/18/2022, 8:50 PM
    you'd want to create new pricing options that include the user's role (and any other things you parameterize your pricing by) and then access that value in the selector to actually make the decision based on it.
  • r

    Ricky

    01/20/2022, 8:59 AM
    Is it possible to add a new controller instead of overriding it? e.g. model called
    Spree::Ads
    that is connected to
    Spree::Product
    by has_one, ,and I want to CURD
    Spree::Ads
    resource.
    m
    • 2
    • 1
  • y

    Yonas T

    01/20/2022, 5:34 PM
    Hello, does solidus have multi vendor capability out of the box?
    j
    k
    • 3
    • 7
  • a

    Andre Schweighofer

    01/24/2022, 4:07 PM
    Hi all, I have a question regarding the default shipping flow. From my understanding the flow after an
    order
    looks like this: 1. The store admin manually supplies the shipment information to a 3rd party shipment provider 2. The store admin then has to add the tracking information and click “ship” in the admin panel Now I’d like to integrate a 3rd party instant delivery provider. For that I’d need to automatically push the
    shipment
    information to our shipment provider and mark the
    shipment
    as `shipped`: 1. Make an API call to our shipping provider 2. Update the shipping state and add the tracking information What is the cleanest/intended way to achieve this? Here are my ideas: - Add a step after
    :complete
    to the order state machine that makes the API calls and updates the shipment or - Add an
    after_create
    callback to the shipment through a decorator that makes the API calls - Make the API call from the checkout_controller when the order is completed and update the
    shipment
    from there Or is there an option which is simpler that I’m not seeing?
  • e

    Edwin Cruz

    01/24/2022, 4:14 PM
    you can use Solidus events to know when an order gets finalized https://guides.solidus.io/developers/events/overview.html then you can enqueue an async job to do the API call and evertyhing
  • t

    Tom Wilson

    01/24/2022, 4:15 PM
    +1 to this - that's exactly what we do in our store.
  • a

    Andre Schweighofer

    01/24/2022, 4:45 PM
    Thanks for the replies. For that matter it’d be the same to just enqueue an active_job in the checkouts_controller in
    finalize_order
    right? I just found it odd that the
    shipment_method
    is so “dumb” by default 🙂
    t
    • 2
    • 4
  • e

    Edwin Cruz

    01/24/2022, 4:55 PM
    you can write your own shipment state machine with the events you need and let Solidus to use it via
    Spree::Config.state_machines.shipment
  • d

    Daniel

    01/25/2022, 3:34 PM
    Is there a preferred way to restrict the backend to one language (e.g.
    en
    ) and allow other languages (e.g.
    de, fr, it
    ) in the frontend? It seems both are dependent on
    I18n.available_locales
    .
    j
    • 2
    • 2
  • d

    Daniel

    01/25/2022, 4:24 PM
    Other question regarding i18n. If I'm not mistaken, the backend uses the current user locale to send/resend emails. Is there a plugin to use the customers locale from the frontend or would I have to implement that logic myself?
    j
    • 2
    • 3
  • j

    Jay Bensal

    01/26/2022, 11:08 PM
    I’m running the solidus demo in docker via Rails/Puma and am having trouble changing the default port away from 3000 to 4000. Is this a known issue still? I can find a few issues referencing this from few years ago. I’ve tried •
    puma.rb: port ENV.fetch("PORT") { 4000 }
    • my command to start is
    bundle exec rails s -p 4000 -b '0.0.0.0'
    • Dockerfile exposes port 4000
    j
    c
    • 3
    • 6
  • x

    Xan

    01/27/2022, 2:50 PM
    Is there an easy way to trim down the
    available_countries
    that are getting pulled for the shipping/billing form? Trying to remove all but 2 of them
    e
    • 2
    • 4
  • a

    Ahmad Ridwan Fauzi

    01/28/2022, 12:12 PM
    Hello, got a question for the
    solidus_paypal_commerce_platform
    extension here. Anyone here has encountered this issue when checking out with PayPal on live mode?
    {"ack":"permission_denied","message":"Insufficient privileges"}
    Here are what I have done to troubleshoot the issue: 1. Create the credentials using the wizard mode, still not working 2. Use the static credentials I setup on my PayPal developer dashboard 3. Change my PayPal account to Business type
    r
    • 2
    • 2
  • a

    Ahmad Ridwan Fauzi

    01/28/2022, 12:18 PM
    It also returns this error:
    err: 'Error: Api: /smart/api/order/1BT78617AR157972Y ret…nts=buttons&currency=USD&intent=authorize:2:90802'
1...101112...39Latest