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

    Jared Norman

    09/13/2021, 2:52 PM
    They just add a "Digital" shipping method that's available everywhere.
  • t

    Tom Wilson

    09/13/2021, 2:52 PM
    Right - we're just thinking about the UX flow. We have a part of our site that is a dedicated UX for digital-only items, and has a slightly special looking checkout flow.
  • d

    Daniel

    09/14/2021, 2:27 PM
    I'm struggling with customizing the transition of order states. I removed the checkout
    delivery
    state and now have the issue, that no shipments are getting created during checkout now. What I would like to do is somehow move the delivery state steps to the cart or address steps without having to duplicate the entire
    Spree::Core::StateMachines::Order
    module to avoid future update fiascos. I haven't found an answer by browsing through the guides / code. Is there an easy way to do this?
    k
    e
    • 3
    • 16
  • t

    Tom Wilson

    09/14/2021, 5:23 PM
    We've been looking to actually get set up using payments via Stripe, and it looks like the current
    solidus_stripe
    gem doesn't support Solidus 3. https://github.com/solidusio/solidus_stripe Is this something that's on the roadmap, or is there a better path to take to integrate Stripe?
    ✅ 1
    j
    e
    • 3
    • 4
  • l

    Locon

    09/14/2021, 6:47 PM
    I'm haviing an issue adding a constant to a model though a decorator, just testes in the Rails console and seems is not loading it:
    Copy code
    2.6.6 (console)[3] » Spree::Product::SEARCHER_STRING_LIMIT
    NameError: uninitialized constant Spree::Product::SEARCHER_STRING_LIMIT
    am I missing something else? Thanks.
    j
    • 2
    • 6
  • v

    victor

    09/14/2021, 9:53 PM
    Is there any documentation on creating an order programatically? I am integrating our POS and instead of using
    Spree::StockMovement
    I wanted to go through the entire order flow. This way the order also shows up when the user logs in or an admin needs to track something. Been looking at the specs, api and frontend controllers but I am having little success
    e
    • 2
    • 13
  • t

    Tyler Kocheff

    09/15/2021, 6:09 PM
    Anyone have any experience with the
    solidus_handling_fees
    gem? I'm attempting to add a handling fee to specific items during checkout, but upon installing this gem and setting the shipping calculator per the readme, checkout errors out after entering the address with
    You cannot call create unless the parent is saved
    I think this is the code it's complaining about in
    order_decorator.rb
    of the gem:
    Copy code
    shipment.adjustments.create!({
                source: shipment.stock_location,
                adjustable: shipment,
                amount: amount,
                order: shipment.order,
                label: "Handling"
              })
    k
    • 2
    • 2
  • t

    Tom Wilson

    09/17/2021, 3:02 PM
    I've been playing around with understanding the Order checkout state machine, and I can't quite wrap my head around something. From what I've seen, if an order is in the "confirm" state, there's a strange bit of seeming inconsistency. If I update the user's address while in this state, it will send the cart back into the "delivery" state, which is kind of what I'd expect. But if I update the contents of the cart, ie add new line items, it leaves the cart in confirm.
  • t

    Tom Wilson

    09/17/2021, 3:03 PM
    That seems slightly odd to me, because if the cart stays in
    confirm
    , the cart can be completed and end up in the "balance owed" state. It seems like it should invalidate the payments and kind of start again. Am I missing something here?
  • k

    kennyadsl

    09/17/2021, 3:09 PM
    Your logic seems correct, but I would be surprised if that's the case in core. Are you sure it's not something that only happens in your application for some code that you changed? Otherwise I'd consider this a bug.
  • t

    Tom Wilson

    09/17/2021, 3:28 PM
    Got it. I'm definitely not positive this isn't related to something I've changed. I'm manipulating the order via the admin UI here to test this case.
  • t

    Tom Wilson

    09/17/2021, 3:29 PM
    Do you happen to know where you would expect the logic that enforces this to live? That might give me a starting point to try and dig in and see if this is related to a customization on my end.
  • k

    kennyadsl

    09/17/2021, 3:52 PM
    I would start investigating from the order controller, populate action. Not sure about the admin though
    t
    • 2
    • 1
  • t

    Tom Wilson

    09/17/2021, 6:04 PM
    So after digging a little - I think I understand how this is working. The admin UI does in fact restart the flow - but it then calls
    advance
    , which immediately moves the order from
    cart
    back to
    confirm
    . So it seems like the transition from
    payment
    into
    confirm
    doesn't actually require that the current payments on the order will cover the total.
  • t

    Tom Wilson

    09/17/2021, 6:09 PM
    I guess I found that surprising - I can probably add this as a rule in my store, but it seems like this would be something that others might have run into as well? If I've understood this correctly, it means that you can't just blindly rely on the fact that the order is in
    confirm
    to mean that you can successfully check it out.
    v
    • 2
    • 1
  • v

    victor

    09/19/2021, 7:59 PM
    Question: I build an integration for our POS. Instead of creating/syncing the orders as it seemed a bit too much work for now, I resolved to StockMovements. However, if it pushes the stock to less than zero I get an exception. It makes sense in a way because it has no backorder tied to it. How would I work around this?
    • 1
    • 1
  • n

    Neil Johari

    09/20/2021, 7:06 AM
    Hey team! Playing with Solidus to migrate my father’s site away from Magento, since it’s too overkill for his needs (and my familiarity with RoR > PHP). I tried this about 2 years ago at Rails 5.2.3 & Solidus 2.8.3 and got pretty far, but then got busy and put it aside. A few high-level questions here: 1. I managed to upgrade this to Rails 6 & Solidus 3.1, and it appears to work fine but I’m wondering: since I used a custom frontend with BS4, is there anything I should be seriously concerned about in terms of breaking changes that make frontends incompatible? 2. I was also trying to see what the new starter frontend looks like. Is it meant to be the same as what’s on demo.solidus.io? It looks similar but slightly worse when deployed locally. It doesn’t look like rails is injecting default assets that are interfering afaik, so what’s to blame for the different? I attached a picture below
    d
    k
    • 3
    • 8
  • g

    Guillermo Quezada

    09/20/2021, 5:01 PM
    Hello! Asking for opinions.. Topic: Line items DELETE in batch What would you think is better approach? 1. Add
    remove_line_items
    endpoint and
    order.contents.remove_line_items
    method then iterate to remove each one
    remove_line_item
    Copy code
    DELETE /api/orders/:id/remove_line_items(.:format) 
    
        def remove_line_items_attributes
          items = order.line_items
          {
            order: { line_items_attributes: [{id: items[1][:id]}, {id: items[2][:id]}]},
            order_token: order.guest_token
          }
        end
    
        context 'with authorization' do
          stub_authorization!
    
          it 'should remove line_items in batch' do
            delete "/api/orders/#{order.number}/remove_line_items.json?token=#{user.spree_api_key}", params: remove_line_items_attributes
            json_response = JSON.parse(response.body)
    
            expect(json_response['line_items'].count).to eq(1)
          end
         end
    OR 2. Add support in current Line items DELETE endpoint using rails REST API as a comma separated values
    Copy code
    DELETE /api/orders/:order_id/line_items/:id
    
    DELETE /api/orders/:order_id/line_items/:id1,id2,id3
  • e

    Edwin Cruz

    09/20/2021, 5:18 PM
    did you try setting quantity to 0 ? I remember line items get deleted if you specify 0, something like:
    Copy code
    order_contents = {
       order: { number: order.number,
          line_items_attributes: [{id: 1, quantity: 0}, {id: 2, quantity: 0}]
        }
    post :orders_update_cart(token: user.spree_api_token). params: order_contents
    👍 2
    👍🏼 1
    g
    • 2
    • 1
  • f

    Felipe Fiebig

    09/21/2021, 9:33 PM
    Hello ! I'm trying to create an Order using the API passing payments_attributes and complete it automatically, but it keeps saying resource not found. If I create the order and then add the same payment information using the update order endpoint it works. I think it's because the importer is trying to find the PaymentMethod using its name instead of the
    payment_method_id
    as seen here. Is this expected behaviour ?
    Untitled.js
    👀 1
  • n

    Neil Johari

    09/22/2021, 4:58 AM
    Hi team, working on making my solidus site B2B only. Two requirements are: admin approval for user sign up, and hide prices unless signed in. Any tips on accomplishing these? Hiding prices is easy from frontend POV, but is there a way to ensure that data doesn’t get leaked in some side channel (solidus apis, etc)? Admin approval sounds like some devise customizations might be needed, but wondering if anyone is aware of an extension or gem that could help speed up dev time
    • 1
    • 1
  • r

    Rafael Monroy

    09/23/2021, 12:19 AM
    hey everyone! having some trouble setting up apple pay on spree, how is the apple pay flow different here than spree? Is there at least better docs ? thanks
  • d

    Daniel

    09/23/2021, 10:33 AM
    Currently implementing a custom payment method and I'm looking for reassurance that I'm on the right track. Using a payment processor, that similar to stripe, requires me to create a transaction which returns an ID that I need to store so I can authorize / capture the payment. The concept of my payment flow with the PSP currently looks like this: 1. Create transaction object through javascript API on checkout payment view 2. Initialize credit card fields with returned transaction id 3. Submit credit card fields to PSP 4. Get success response with transaction hash 5. Update order with transaction hash on a custom controller with which the payment method later authorizes / captures the reserved amount (similar to https://github.com/solidusio/solidus_stripe/blob/a57ff9d21647880f72bcf32b4ad48c09274b3cdd/app/controllers/solidus_stripe/intents_controller.rb) 6. Transition from payment to confirm I guess what I'm unsure about is if I can skip step 5 and somehow submit and store the transaction response hash when transitioning to the confirm checkout step without the custom controller?
    k
    • 2
    • 52
  • h

    Hussain

    09/23/2021, 11:53 AM
    Hi, I am trying to Install Solidus on Ruby on Rails on my Windows System. I have added all the necessary gems and bundled them. Upon running the command
    rails g solidus:install
    I get the following error: /lib/ruby/gems/3.0.0/gems/mimemagic-0.3.10/lib/mimemagic/tables.rb69in `initialize': Is a directory @ rb_sysopen - /Ruby_ruby_on_rails/shared-mime-info-2.0/shared-mime-info-2.0/shared-mime-info-2.0/data (Errno::EISDIR) Upon searching on the internet it says 'data' should be a file and not a directory. I tried deleting/renaming 'data' it but it leads to more errors. So I guess this is required. How do I resolve this?
    👀 1
    k
    • 2
    • 4
  • v

    Valentín Sanjuan

    09/23/2021, 3:17 PM
    Hi everyone, has something changed about how initializers works between v2.10 and v2.11.10? I have upgraded and my i18n.rb initializer with transliteration rules seems like it is getting overwritten in the new version. Couldnt find out why yet. Thanks!
    j
    • 2
    • 1
  • a

    afdev82

    09/24/2021, 2:57 PM
    Has anyone already tried the new
    rails g solidus:update
    generator? If I run it on Solidus v3.1.1 I get the following:
    Copy code
    $ bin/rails g solidus:update
    Running via Spring preloader in process 12705
    Could not find generator 'solidus:update'. Maybe you meant "solidus:install"?
    Run `rails generate --help` for more options.
    I thought it was supposed to be there in the new version.
    k
    • 2
    • 3
  • j

    jakemumu

    09/24/2021, 4:43 PM
    @alessandro are you guys still using this solidus_klaviyo extension? -- seems the klaviyo team pulled the 1.0.0 version of their gem this morning...
  • m

    mattdala

    09/24/2021, 8:41 PM
    Do any of you guys have a store calculating shipping rates through external API hits? I'd like to have a store such as that.
    g
    j
    • 3
    • 7
  • a

    Alistair Norman

    09/24/2021, 9:27 PM
    Has anyone updated to 3.1 with Rails < 6.1? I'm still going through the history but I think we used a method that was only added in that Rails version. Specifically
    Rails::Paths::Path#paths
    seems to not exist until then. Update: Yeah looking at the history I think 3.1 now requires Rails 6.1. I'll just make an issue
    😅 1
    • 1
    • 1
  • k

    K

    09/25/2021, 5:15 AM
    Hi all. I’m developing a local extension, and I have to update the extension version number and do 
    bundle install
     to update the extension content. Is it possible to update extension content during run time? The way I add my local extension
    Copy code
    gem "solidus_extension_name", path: "path/to/extension"
    Thanks!
    w
    • 2
    • 2
1...567...39Latest