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

    Chris Todorov

    02/13/2023, 6:37 PM
    Is the search on the guides broken for anyone else?
    ✅ 1
    e
    k
    • 3
    • 13
  • b

    BFX462heo

    02/14/2023, 7:45 AM
    Hi all! I need to migrate from my Sqlite3 DB to Postgresql DB. Do you know any good guide to do this? Thanks in advance.
    ✅ 1
    k
    • 2
    • 12
  • t

    Tyler Kocheff

    02/15/2023, 2:20 PM
    Is this a common error when updating Solidus?
    You have already activated stringio 3.0.4, but your Gemfile requires stringio 3.0.5. Prepending 'bundle exec' to your command may solve this. (Gem::LoadError)
    We have a couple Solidus sites on the same Hatchbox server, and sometimes doing a
    bundle update
    on one causes this error. Only way around it I have found so far is to go into the Ruby version the site is running on, and do a
    gem install stringio -v 3.0.5
    which fixes it for that site. Yesterday I did this, and it fixed the site I was working on, but broke another Solidus site running on that server until I did a
    bundle update
    on that one as well. Looks like
    stringio
    is required by
    psych
    which is required by
    solidus_core
    . Is there any way to prevent this from happening?
    e
    • 2
    • 1
  • z

    Zyad A

    02/15/2023, 7:27 PM
    Hi all, wondering if anyone has found a solution for the below. I have tried avoiding expiring urls but this did not resolve the issue.
    Copy code
    config.active_storage.service_urls_expire_in = false
    ✅ 1
    j
    c
    • 3
    • 7
  • b

    BFX462heo

    02/17/2023, 10:50 AM
    Hi all! I have deployed my Solidus Store in Railway.app. It works fine. But I have a little question. How can I create an admin user? I know that the default admin user is admin@example.com with password; test123. I have created but it does not work. In the deployment process I have not received the question to create the admin role unlike in the local installation. How can I do this? Thanks in advance and sorry for my ignorance. 🤯
    ✅ 1
    z
    k
    • 3
    • 10
  • j

    jakemumu

    02/18/2023, 7:10 AM
    Hey! -- i'm trying to learn a bit about building my first extension so i can hopefully create a cool one here in the future : ) it's my first time creating a rails engine -- after generating the sandbox apps following the docs i'm hitting:
    Copy code
    ➜  sandbox git:(main) ✗ bin/rails server                                                                                                                        
    The git source <https://github.com/solidusio/solidus.git> is not yet checked out. Please run `bundle install` before trying to start your application
    
    ➜  sandbox git:(main) ✗ bundle install  
    Fetching <https://github.com/solidusio/solidus.git>
    fatal: Needed a single revision
    Git error: command `git rev-parse --verify ''` in directory
    /Users/jacobpenn/.asdf/installs/ruby/3.0.5/lib/ruby/gems/3.0.0/cache/bundler/git/solidus-169f1ecb1aee2122950e6d586daf2410f62df66e has failed.
    Revision  does not exist in the repository <https://github.com/solidusio/solidus.git>. Maybe you misspelled it?
    If this error persists you could try removing the cache directory
    '/Users/jacobpenn/.asdf/installs/ruby/3.0.5/lib/ruby/gems/3.0.0/cache/bundler/git/solidus-169f1ecb1aee2122950e6d586daf2410f62df66e'
    e
    • 2
    • 7
  • s

    Sébastien Ternest

    02/20/2023, 5:26 PM
    Hi everyone ! Has someone tried to use solidus_stripe with the starter frontend ? I tried to follow the steps on this link https://github.com/solidusio/solidus_stripe but it’s not working I put the following env variables in a .env file SOLIDUS_STRIPE_API_KEY=“my test stripe_api_key” SOLIDUS_STRIPE_PUBLISHABLE_KEY=“my test stripe_publishable_key” In spree.rb: config.static_model_preferences.add( Spree:PaymentMethod:StripeCreditCard, ‘stripe_env_credentials’, secret_key: ENV[‘SOLIDUS_STRIPE_API_KEY’], publishable_key: ENV[‘SOLIDUS_STRIPE_PUBLISHABLE_KEY’], server: Rails.env.production? ? ‘production’ : ‘test’, test_mode: !Rails.env.production? ) config.static_model_preferences.add( Spree:PaymentMethod:StripeCreditCard, ‘stripe_env_credentials’, secret_key: ENV[‘SOLIDUS_STRIPE_SECRET_KEY’], publishable_key: ENV[‘SOLIDUS_STRIPE_PUBLISHABLE_KEY’], stripe_country: ‘BE’, v3_elements: false, v3_intents: false ) I ’m using rails 6 so I can’t use bin/dev as was mentioned in the readme. “Visit
    /admin/payments
    and create a new Stripe payment using the static preferences.” /admin/payments => no route ...Do you mean
    /admin/payments_methods ?
    k
    • 2
    • 20
  • s

    Sébastien Ternest

    02/20/2023, 5:35 PM
  • t

    Tom Wilson

    02/21/2023, 11:24 PM
    This may not really be a "support" question, but I figured this is a good starting point.
  • t

    Tom Wilson

    02/21/2023, 11:26 PM
    When reading through some of the solidus code, there seems to be a bit of a confusing relationship between
    shipment.ship
    and
    order_shipping.ship
    . It seems like there's some intention to potentially invert the relationship these method calls have with each other. (ie, today,
    shipment.ship
    invokes
    order_shipping.ship_shipment
    , and it seems like it might intend to be the other way?)
  • t

    Tom Wilson

    02/21/2023, 11:26 PM
    Is that something that is still being actively considered, or are those TODO comments stale remnants of something that is no longer considered desirable?
  • t

    Tom Wilson

    02/21/2023, 11:28 PM
    Asking because we recently encountered a bug based on our own misunderstanding of the intended order of events around calling
    order_shipping
    and
    shipment
    methods. (The
    order_shipping
    method can update the state of the shipment to
    shipped
    , but it does so via a direct column update rather than via the statemachine, and so therefore will not invoke state machine callbacks)
    k
    • 2
    • 5
  • b

    BFX462heo

    02/22/2023, 2:26 PM
    HI everyone! Last week I've done the migration of my Solidus development database from Sqlite to Postgres. Today I can not clone or create new products. I receive this error...
    ✅ 1
    s
    • 2
    • 11
  • j

    jakemumu

    02/22/2023, 5:58 PM
    Is there any information online about how it will look migrating from the current to the new frontend? If payment extensions etc are only going to be compatible with the new front that means we should consider upgrading when the time is right correct?
    j
    k
    • 3
    • 20
  • k

    Kurtis

    02/23/2023, 11:06 AM
    Hi guys, have updated to latest Solidus version and getting
    Copy code
    super: no superclass method shipping_category_id' for #<Spree::Variant:0x00007fe5cd511cc8>
  • k

    Kurtis

    02/23/2023, 11:06 AM
    Saw this issue: https://github.com/solidusio/solidus/pull/4739
  • k

    Kurtis

    02/23/2023, 11:06 AM
    Not sure if anyone knows how to resolve?
  • k

    Kurtis

    02/23/2023, 11:20 AM
    I see inside https://github.com/solidusio/solidus/blob/master/core/app/models/spree/variant.rb it still has shipping_category_id on delegate + def for shipping_category_id – not sure if that relates
  • k

    Kurtis

    02/23/2023, 11:57 AM
    Don’t know if I should revert to 3.2 for now?
  • k

    Kurtis

    02/23/2023, 11:58 AM
    Would like to be on latest version, plus saw solidus_paypal_braintree dropped < 2.4 for core
  • k

    Kurtis

    02/23/2023, 12:51 PM
    I have for now reverted to 3.2 – if anyone could get back to me, it would be very much appreciated as would like to make use of 3.3
    k
    w
    • 3
    • 17
  • z

    Zyad A

    02/24/2023, 12:35 PM
    Hello I have gotten started on a payment integration for PayMob (Egypt based unsupported PSP). I've created the payment gateway (as below) and a payment method as per the documentation. However, I'm not sure 1. how this class would access current order data 2. how this would all be called after selecting credit card on the payment step in checkout I know this is too broad and a bad question, but after hours of searching for some steps/guidance I'm sort of at the end of the line. If anyone has any pointers they would really help, even if it is just to say, "too complex given skill set, hang it up". thanks
    Copy code
    module PayMob
        class Gateway
            API_URL = "<https://accept.paymob.com/api>"
    
            attr_reader :api_key
    
            def initialize(options)
                @api_key = options.fetch(:api_key)
            end
    
            def authorize(money, auth_token, options = {})
                response = request(
                    :post,
                    "/auth/tokens",
                    payload_for_charge(money, auth_token, options).merge(capture: false),
                )
    
                if response.success?
                    ActiveMerchant::Billing::Response.new(
                        true,
                        "Transaction Authorized",
                        {},
                        authorization: response.parsed_response["token"],
                    )
                else
                    ActiveMerchant::Billing::Response.new(
                        false,
                        response.parsed_response["error"],
                    )
                end
            end
    
            #changed the option parameters as per the API
            def purchase(money, auth_token, options = {})
                response = request(
                    :post,
                    '/ecommerce/orders',
                    {
                        "auth_token": authorization,
                        "delivery_needed": false,
                        "amount_cents": money,
                        "items": []
                    }
                )
    
                if response.success?
                    ActiveMerchant::Billing::Response.new(
                        true,
                        "Transaction Purchased",
                        {},
                        order_key: response.parsed_response["id"],
                    )
                else
                    ActiveMerchant::Billing::Response.new(
                        false,
                        response.parsed_response["error"],
                    )
                end
            end
    
            def capture(money, transaction_id, options = {})
                response = request(
                    :post,
                    'acceptance/payment_keys',
                    {
                        "auth_token": authorization,
                        "amount_cents": money,
                        "expiration": 3600,
                        "order_id": order_key,
                        "billing_data": {},
                        "currency": "EGP",
                        "integration_id": 3410599
                    }
                )
    
                if response.success?
                    ActiveMerchant::Billing::Response.new(
                        true,
                        "Transaction Captured",
                        {},
                        token:  response.parsed_response["token"],
                    )
                else
                    ActiveMerchant::Billing::Response.new(
                        false,
                        response.parsed_response["error"],
                    )
                end
            end
                   
    
            private
    
            def request(method, uri, body = {})
                HTTParty.send(
                    method,
                    "#{API_URL}#{uri}",
                    headers: {
                        "Authorization" => "Bearer #{api_key}",
                        "Content-Type" => "application/json",
                        "Accept" => "application/json",
                    },
                    body: body.to_json,
                )
            end
    
            def payload_for_charge(money, auth_token, options = {})
                {
                    auth_token: auth_token,
                    amount: money,
                    currency: options[:currency],
                    description: "Payment #{options[:order_id]}",
                    billing_address: options[:billing_address],
                }
            end
        
        
        end    
    end
    
    class PayMob::PaymentMethod < Spree::PaymentMethod
    
    
    end
  • a

    Ashish Khetarpal

    02/25/2023, 6:44 AM
    Hello team, I just tried solidus latest version ruby 3.0 with rails 7, I added the embedded code of youtube video in a PRODUCT DESCRIPTION field and its overlapping to PROPERTY TYPES
    k
    • 2
    • 2
  • b

    BFX462heo

    02/27/2023, 9:55 AM
    Hi all! I need to uninstall the PayPal Solidus extension. Can I remove it from the `Gemfile`and run
    bundle
    ? Or do I need to do something else? Thanks in advance.
    k
    • 2
    • 6
  • g

    Georg Keferböck

    03/01/2023, 5:00 PM
    Hi all, I have set up the products and variants, setting prices for "United Kingdom" in GBP, and I removed (deleted) all pricing for "Any Country", which I presume is the fallback rule. However, if I go to the product page, I get the message: "This product is not available in the selected currency." What do I have to do to select the correct currency? I set the default to "GBP" (£) in the spree config file, which is reflected in the backend. What must I do to set the correct currency, or what is wrong with my setup? In future, we want to add prices in Euro for Germany & Poland. Thank you for your help!
    j
    • 2
    • 1
  • t

    Test Account

    03/01/2023, 11:48 PM
    Hey y'all! Getting this on Rails 7.1.0-alpha:
    /home/myuser/.bundle/ruby/3.1/bundler/gems/rails-5cbf61502c69/activerecord/lib/active_record/attribute_methods/serialization.rb:207:in 'serialize': missing keyword: :coder If no default coder is configured, a coder must be provided to serialize. (ArgumentError)
    `from /home/myuser/myapp/vendor/solidus/core/lib/spree/preferences/persistable.rb10in
    block in <module:Persistable>'
    persistable.rb
    looks like this:
    Copy code
    module Spree
      module Preferences
        module Persistable
          extend ActiveSupport::Concern
    
          included do
            include Spree::Preferences::Preferable
            serialize :preferences, Hash
            after_initialize :initialize_preference_defaults
          end
    
          private
    
          def initialize_preference_defaults
            if has_attribute?(:preferences)
              self.preferences = default_preferences.merge(preferences)
            end
          end
        end
      end
    end
    Any idea what to do?
    j
    k
    • 3
    • 4
  • t

    Tyler Kocheff

    03/06/2023, 4:01 PM
    General question surrounding fraudulent orders. One of our clients' stores has gotten a large amount of fraudulent orders recently (126 this weekend alone), all for the same price amount and on the same product it looks like. Are there any known Solidus vulnerabilities that bots/bad actors might be leveraging? Also are there any good known ways to combat this? We have Signifyd on this store to help catch them, but not sure if there are any best practices or good tools that could block them before they get placed. First thought was maybe adding reCaptcha v3 to checkout somehow.
    j
    e
    c
    • 4
    • 9
  • f

    Fotios Lindiakos

    03/06/2023, 11:42 PM
    good evening. i'm looking for some advice. my team is looking to implement a feature where customers can pre-pay for mulitple orders (kinda like a subscription where they'd pay once and get products now, in 1 month, 2 months, etc). it's not really a subscription since they're paying once up front. like they have 1 of product A and 2 of product B, and they want to pay for 3 months/deliverys/ one approach we were thinking was using
    cartons
    where all the products would be in a single order (3xA and 6xB) and then break it up into 3 cartons (1xA and 2xB, 1xA and 2xB, ...). at least in that case, the payment data model stays the same (1 payment for 1 order). but the order's "state" gets a little more complicated w.r.t shipment status. another approach would be to generate 3 distinct orders, but it seems trickier to get them all under a single payment. does anybody have any suggestions or prior art on doing something like this?
    j
    k
    s
    • 4
    • 22
  • b

    BFX462heo

    03/07/2023, 9:57 AM
    Hi there! I'm trying to uninstall the PayPal Solidus extension. But when I run the
    rails db:rollback STEP=2
    command, the
    schema.rb
    is modified in all the tables rather than only PayPal tables. The rollback command removes all the
    null: false
    from all the columns of all the tables....
    r
    k
    • 3
    • 23
  • t

    Tyler Kocheff

    03/07/2023, 2:52 PM
    Using
    solidus_auth_devise
    we would like to require users to confirm their email address if the order total is below a certain amount before they can check out as a fraud prevention measure (lots of fraudulent orders on the cheapest items in the store). We have this part working with some monkey patching, but noticed if the user registers an account during check out, once they confirm and log in, their cart is not associated, so they login to an empty cart. Found the setting
    allow_unconfirmed_access_for
    which does let the cart associate but then allows the user to check out without confirming their email first. Is there any way to associate the cart immediately upon account creation without letting a user check out while unconfirmed? Or maybe block checkout from fully completing if the user hasn't confirmed their email yet? My initial thought is that maybe the latter might be easier to implement. I found some of the logic in the
    warden
    and
    devise
    gem, but wondering if anyone has worked this out already or if there's a different setting I'm missing. Edit: Maybe this actually isn't working. I can't reproduce it in the normal checkout flow, but after deploying this yesterday, somehow over 12 guest orders have still come through that should have been forced to register. Not sure if there's some other way these might be coming in? Hoping anyone has any insight. Edit 2 (sorry): Looks like the method I took is only blocking the frontend form from appearing, so hitting the
    /checkout/registration
    endpoint with a valid auth token and the email field filled out still allows a user to guest checkout. Not sure if we did this wrong or if this is a bug.
    j
    k
    c
    • 4
    • 43
1...313233...39Latest