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

    Tom Wilson

    05/08/2023, 3:19 PM
    Awesome - thanks, @elia! I'm trying to figure out what we would need here to migrate - it seems like with our integration, we have
    Spree::CreditCard
    objects which I believe are created from the
    Spree::PaymentMethod::StripeCreditCard
    class. Those objects do have a reference to the Stripe PaymentMethod in the
    gateway_payment_profile_id
    field. (For us, those all happen to be
    card_XXX
    because we are currently configured to pass
    v3_intents=false
    in our payment method creation)
    🧵 2
    k
    e
    • 3
    • 18
  • b

    Brandon White

    05/08/2023, 11:15 PM
    I'm attempting to use solidus_stripe with the solidus_starter_frontend. When I get to the payment step it just says "loading..." under payment information. I can click save and continue and place order but it ends with the error: `NoMethodError (undefined method
    type' for nil:NilClass payment_method_types: [payment.source.stripe_payment_method.type]
    Which I assume is because I wasn't able to enter payment info.
    Copy code
    solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:117:in `block in create_stripe_intent'
    stripe (8.3.0) lib/stripe/stripe_client.rb:206:in `request'
    solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/gateway.rb:194:in `request'
    solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:109:in `create_stripe_intent'
    solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:20:in `block in create_for_payment'
    <internal:kernel>:90:in `tap'
    solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:20:in `create_for_payment'
    solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/payment_intent.rb:10:in `prepare_for_payment'
    solidus_stripe (5.0.0.rc.2) app/models/solidus_stripe/gateway.rb:111:in `purchase'
    solidus_core (3.3.1) app/models/spree/payment_method.rb:41:in `purchase'
    solidus_core (3.3.1) app/models/spree/payment/processing.rb:59:in `block in purchase!'
    solidus_core (3.3.1) app/models/spree/payment/processing.rb:213:in `protect_from_connection_error'
    solidus_core (3.3.1) app/models/spree/payment/processing.rb:58:in `purchase!'
    solidus_core (3.3.1) app/models/spree/payment/processing.rb:29:in `process!'
    solidus_core (3.3.1) app/models/spree/order/payments.rb:47:in `public_send'
    solidus_core (3.3.1) app/models/spree/order/payments.rb:47:in `block in process_payments_with'
    solidus_core (3.3.1) app/models/spree/order/payments.rb:44:in `each'
    solidus_core (3.3.1) app/models/spree/order/payments.rb:44:in `process_payments_with'
    solidus_core (3.3.1) app/models/spree/order/payments.rb:23:in `process_payments!'
    solidus_core (3.3.1) app/models/spree/order.rb:743:in `process_payments_before_complete'
    I'm having difficulty tracking down the problem since there is no console errors...
    l
    k
    • 3
    • 24
  • m

    Marie Lamoureux

    05/09/2023, 7:54 AM
    Hello! After updating my version of Solidus to 4.0.0 I'm getting this error :
    Copy code
    [WARNING Spree] Missing migrations.
    [WARNING Spree] - add_unique_index_to_option_values_variants
    [WARNING Spree] - change_column_null_option_values_option_type_id
    [WARNING Spree] - drop_deprecated_address_id_from_shipments
    [WARNING Spree] - drop_unused_promo_action_line_items
    [WARNING Spree] - remove_match_policy_from_spree_promotion
    [WARNING Spree] - remove_taxon_position
    [WARNING Spree] - remove_unused_columns_from_promotion_rules
    [WARNING Spree]
    [WARNING Spree] Run `bin/rails railties:install:migrations` to get them.
    [WARNING Spree] You can silence this warning by setting the `SOLIDUS_SKIP_MIGRATIONS_CHECK` environment variable.
    rails aborted!
    LoadError: cannot load such file -- spree/testing_support
    /Users/marielamoureux/code/lamoureuxmarie/infini-store/config/application.rb:13:in `block in <class:Application>'
    /Users/marielamoureux/code/lamoureuxmarie/infini-store/config/environment.rb:5:in `<main>'
    Tasks: TOP => db:load_config => environment
    I get the same message after running ``bin/rails railtiesinstallmigrations`` or
    rails db:drop db:create db:migrate
    Any idea about how to fix this?
    k
    w
    • 3
    • 8
  • a

    Alistair Norman

    05/09/2023, 10:06 PM
    I'm getting
    Could not find gem 'solidus (~> 4.0.0)' in rubygems repository <https://rubygems.org/> or installed locally.
    when I try to upgrade. Does anyone know why it wouldn't be able to find it?
    j
    w
    • 3
    • 15
  • w

    Will

    05/10/2023, 9:00 PM
    Hello! Brand new to Solidus- just got it up and running on Ubuntu... rails will start but hitting the homepage gives me an Action Controller error because libvips.so.42 is not present. I see there's a defect from february about this, but I was not able to figure out how to work around it.
    j
    • 2
    • 10
  • m

    Marie Lamoureux

    05/11/2023, 7:09 AM
    Hello, I have some doubts about how to customize the backend with Deface. 1. What is the right way to do it? In the documentation, I can see that I need to create overrides views like this one
    add_remove_from_rejected.html.erb.deface
    and add my code to it. But if I take inspiration from
    solidus_subscription_gem
    , for example, I can see something like that
    Copy code
    Deface::Override.new(
      virtual_path: "spree/admin/products/_form",
      name: "solidus_subscriptions_product_subscribable_checkbox",
      insert_after: "[data-hook='admin_product_form_promotionable']",
      partial: "spree/admin/products/subscribable_checkbox"
    )
    I'm guessing it does the same thing but I'd like to understand. 2. How do I deploy my changes to production? Both ways seems to work locally but I super confused about how to deploy changes I make in the backend to production. This is probably a stupid question but I cannot wrap my head around it šŸ˜… If I create my overrides views in my main app, it's not working because it cannot find the override partial
    Missing partial app/overrides/views/products/_clothing_checkbox
    . But any code I add in the backend is of course not tracked by me git repo. Thank you for your help!
    r
    k
    • 3
    • 9
  • w

    Will

    05/11/2023, 6:41 PM
    I see the getting started docs mentioning that testing_support should be part of the core install, but the path does not exist in my install. Is there something I need to do to get them to install? I am simply trying to get capybara to be able to handle logging in to the demo site, and I guess the missing helpers might be the issue- nothing I've tried (many variations on
    fill_in('spree_user_email', with: '<mailto:admin@example.com|admin@example.com>')
    ) has been able to enter text in the user/pass fields. Thanks in advance
    k
    • 2
    • 9
  • t

    Tom Wilson

    05/12/2023, 8:26 PM
    I was trying to update our store to Solidus 4, and then I realized that Avatax would hold us back. So I put up https://github.com/boomerdigital/solidus_avatax_certified/pull/178 - curious if anyone thinks this is a bad idea?
    šŸ˜ 1
    z
    • 2
    • 1
  • s

    Steve Simitzis

    05/13/2023, 2:00 AM
    In solidus_subscriptions, I’m unable to find any mailers or email templates. What is the best way to send email to customers on installments, cancellations, upcoming orders, etc?
    n
    • 2
    • 3
  • s

    SƩbastien Ternest

    05/15/2023, 11:57 AM
    Hi solidus team ! Do you guys please can give some help. I’m trying to install solidus_stripe for the starter frontend and I’m stuck with this error message Thank you ! ps: Do we also have to add stripe in the gemfile ?
    l
    • 2
    • 4
  • s

    SƩbastien Ternest

    05/15/2023, 12:01 PM
  • s

    Sarah Naas

    05/15/2023, 4:26 PM
    Hello! I'm working on re-activating cancelled subscriptions. But I'm getting a 404 error when trying to use the
    /subscriptions/api/v1/subscriptions/{id}/activate
    route. I've noticed that the active route only exists in the admin namespace. What do you recommend for activating cancelled subscriptions?
    c
    n
    • 3
    • 6
  • w

    Wes Chang

    05/16/2023, 8:28 PM
    Hi folks! We’re attempting to send a POST request to an external API whenever the
    order_finalized
    event is emitted however, it appears that our event handler is being ignored. Our current setup is a simple 1 line event handler that invokes an ActiveJob which then performs the POST request. We followed the Solidus docs on ā€œSubscribing to Eventsā€ and took inspiration from the solidus_subscriptions gem. Our app is hosted on Google Cloud Run with CPU always allocated. In our GCP logs, we do see evidence of other event handlers being executed, such as
    SolidusSubscriptions::CreateSubscriptionJob
    which is executed on
    order_finalized
    , however, zero logs appear for ours. Initially, we thought that it might be the serverless environment that is preventing the event handler from executing but seeing
    SolidusSubscriptions::CreateSubscriptionJob
    running and succeeding, I don’t believe this is the case. Any insight or suggestions would be greatly appreciated. Here are some snippets:
    /config/initializers/omnes.rb
    Copy code
    Rails.application.config.to_prepare do
      TestStore::OrderFinalized.new.subscribe_to(Spree::Bus)
    end
    /app/subscribers/test_store/order_finalized.rb
    Copy code
    module TestStore
      class OrderFinalized
        include Omnes::Subscriber
    
        handle :order_finalized,
                with: :notify_order_completed,
                id: :solidus_prod_func_order_completed
    
        def notify_order_completed(event, context) 
          TestStore::NotifyOrderCompletedJob.perform_later(event.payload[:order])
        end
      end
    end
    /app/jobs/test_store/notify_order_completed_job.rb
    Copy code
    module TestStore
      class NotifyOrderCompletedJob < ApplicationJob
        queue_as :default
    
        def perform(order)
          handler = "API URL"
          options = {
            body: {
              order: order.to_json
            }
          }
    
          puts "Sending order to #{handler}"
          <http://HTTParty.post|HTTParty.post>(handler, options)
        end
      end
    end
    j
    • 2
    • 1
  • j

    jakemumu

    05/18/2023, 9:01 PM
    Question Solidus Gurus -- On our website we change the currency based on customer country, we used to do this via IP lookup and then set a cookie for the user, then we had basically overridden parts of solidus to pull pricing from the session cookie instead of the pricing selectors or the spree config. We just moved to cloudflare and see we can get the country code with every request for free, so we've change the system to remove all the cookies and instead set
    Spree::Config.currency
    on every request based on the cloudflare headers -- does this sound like a good solution or are we still handling this outside of the box?
    b
    j
    • 3
    • 37
  • e

    Eric Gross

    05/21/2023, 1:51 AM
    Is there a favorite payments integration? I am free to choose and i might as well pick the most full-featured & reliable integration
    k
    j
    • 3
    • 2
  • e

    Eric Gross

    05/21/2023, 2:24 AM
    Has anyone integrated with codat or teller to work with customers' accounts?
    šŸ‘Ž 1
  • e

    Eric Gross

    05/21/2023, 3:59 PM
    Is there a suggested method for populating the line items of an order for checkout when they are ad hoc? In my situation, it's not like somebody's checking out with however many widgets, it's more that they are renting something with a rate that can change. One option is keeping the spree Items up to date with the existing things that can be rented. Another option would be to create items only when a checkout process has begun.
    k
    • 2
    • 1
  • o

    Oliver Vokoun

    05/21/2023, 7:06 PM
    I have my first shop running and try to create my first product but it says out of stock.. so im trying to create a location but it says "You must create a default country before creating a stock location." How can i set a default Country? I found this for spree.rb but creates errors.. any hint? Spree.config do |config| country = Spree::Country.find_by_name('Austria') config.default_country_id = country.id if country.present? end I also found solidus/core/lib/spree/app_configuration.rb file with preference :default_country_iso, :string, default: 'US' but how can i change this value.. i dont have this lib/spree folder in my project at all? im so confused
    k
    • 2
    • 2
  • j

    jakemumu

    05/24/2023, 10:14 PM
    trying to make a conditional confirm step:
    Copy code
    base.remove_checkout_step :confirm
    
            # our custom confirm step
            base.insert_checkout_step :tax_confirmation, {
              after: :payment, if: ->(order) {
                order.tax_total != 0
              }
            }
    -- however this totally breaks checkout and i just get an obtuse error:
    State cannot transition via next
    -- any tips for debugging that?
    a
    • 2
    • 6
  • j

    jakemumu

    05/24/2023, 10:14 PM
    i tried sticking prys into the state machine objects and checkout controllers etc -- but no dice, i can't find where it's halting and failing to transition or why
  • u

    Ulysses

    05/25/2023, 2:35 PM
    I'm trying to disable the option type selectors for out of stock variants in the product page. I understand that the user wouldn't be able to proceed with the checkout if unbackourderable products without any on hand quantity are included in their order, but it would be nicer to have that information on the product page so they can only select in stock items. I've noticed that the option type selector (views\cart_line_items\product_selection\_option_type.html.erb) works with a hidden form for the actual variants in (app\views\cart_line_items\_product_variants.html.erb). The hidden form even adds an out of stock class to unavailable variants, but this is not relflected in the option type selector that is displayed for the user. I understand the complexity of this interface, as the availability of each option type is dependent on the other options already selected. So, I would like to know if this is supported out of the box or a suggested implementation exists. If not, why is the hidden product variant form adding an out of stock class to unavailable variants?
    k
    • 2
    • 4
  • e

    Eric Gross

    05/26/2023, 9:53 PM
    i've been having a hard time integrating devise_invitable into solidus_auth_devise - has anyone ever got these two things working together this or have any suggestions? i guess my next option is to replace
    Spree::User
    with
    User
    so that my install is more vanilla devise 🤷 and then i would use
    User
    as the solidus user model, which i assume i can configure
  • j

    jakemumu

    05/30/2023, 2:15 AM
    I'm having an issue with the Solidus Paypal Extension hijacking the store pricing options which are set inside Spree::Config on app boot:
    Copy code
    initializer "solidus_paypal_commerce_platform.set_pricing_options_class" do
          def (Spree::Config).pricing_options_class
            binding.pry
            SolidusPaypalCommercePlatform::PricingOptions
          end
        end
    ^ this method in the engine.rb file appears to run per request and take precedence to the store level pricing options rendering them unusable -- is there a way to avoid this by chance?
  • j

    jakemumu

    05/30/2023, 2:28 AM
    i see this is removed in 1.x.x -- but unfortunately i can't upgrade anymore cause i'm on the old frontend : (
  • j

    Jared Norman

    05/30/2023, 2:59 AM
    Lol, I wonder why it was defined like that ever. Super weird. You could probably just redefine it yourself in a to_prepare block to get it working again.
  • j

    Jared Norman

    05/30/2023, 3:00 AM
    I’d PR a fix to the branch that still supports the old frontend though. Setting a config option by redefining a method, making it not configurable anymore es no bueno.
  • k

    kennyadsl

    05/30/2023, 5:44 AM
    Yes, if you can submit a PR with the fix, we’ll release a patch for that version.
  • j

    jakemumu

    05/30/2023, 6:04 PM
    can do! I was able to work around it with a
    config.after_initialize
    block, but yeah it took me a while to figure out what was going on
  • s

    SƩbastien Ternest

    05/31/2023, 9:56 AM
    Hello dear solidus community ! I would to know if we could find an example on github of an implementation of the solidus stripe on an app using the starter frontend. I’m still stuck here _app/views/checkouts/payment/_stripe.erb_
    Copy code
    Showing /Users/sebt-max/codeseb/edb091122/app/views/checkouts/payment/_stripe.erb where line #9 raised:
    
    undefined local variable or method `payment' for #<ActionView::Base:0x00000000045448>
    Extracted source (around line #9):
              
            <dt><%= SolidusStripe::PaymentSource.human_attribute_name(:stripe_payment_intent_id) %>:</dt>
            <dd><%= link_to(
              payment.source.stripe_payment_intent_id,
              payment.source.stripe_dashboard_url,
              target: :_blank,
            )%></dd>
    Thank you very much
    e
    • 2
    • 2
  • e

    Eric Gross

    05/31/2023, 11:28 PM
    i have a system test where i'm doing some things such as
    Copy code
    Spree::Order.create!(user: @contract.initiated_to_user)
        product = Spree::Product.all.first
        line_item = Spree::LineItem.create!(order: order, product: product, price: 100, quantity: 1)
        order.next!
        order.complete!
    and it seems to be nondeterministic as to whether the line item's
    item_total_before_tax
    has a value of
    100
    ... is there a better way to create an order and add a line item, and then complete the order? i have removed a few steps to simplify
    Copy code
    base.remove_checkout_step :address
            base.remove_checkout_step :delivery
    a
    • 2
    • 4
1...3536373839Latest