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

    Eric Gross

    06/01/2023, 3:49 AM
    in the solidus back end, when i have the stripe integration installed, when i go to the Payments tab for an order & try to add a stripe credit card, it doesn't seem to be possible - is it expected that it would be possible to add a credit card via stripe for a user's order from the back end?
    k
    • 2
    • 4
  • s

    Sabo

    06/01/2023, 3:33 PM
    Hello everyone 👋 I'm looking for a way to use
    field_container
    with an attribut serialized as an Array if it's possible ? In admin side (admin/products/:product/edit) I have
    Copy code
    <div data-hook="admin_product_form_tags">
            <%= f.label :tags %>
            <%= f.field_container :tags do %>
              <%= f.text_field :tags, class: 'fullwidth title', multiple: true %>
            <% end %>
          </div>
    Technically it's working, but I get something like
    ["tag1 tag2 tag3"]
    where I would have something like
    ["tag1", "tag2", "tag3"]
    ✅ 1
    • 1
    • 1
  • b

    Ben

    06/03/2023, 1:55 PM
    Hi again! I hope you're having a great day. We are nearing the completion of our e-commerce website and have come across a fairly standard edge case that we should have detected earlier. I'm particularly interested in understanding how to handle potential conflicts when multiple customers attempt to purchase the same limited stock product. Our current thinking involves implementing (one of) the following strategies: 1. Reserve stock for a limited time and if purchase is not completed, release stock. For the potential edge case that two users still try and checkout simultaneously, use race conditions to allow first user to successfully checkout. 2. Real-Time Inventory Updates: We are exploring options like web sockets or AJAX polling to achieve real-time communication 3. Notifications: Depending upon whether or not we use solution 1 or 2 above, we will use standard notifications regarding the exhaustion of stock. (Likely at checkout). In the case of the real time inventory solutions, we are interested in hearing from anyone that has experience dealing with notifications throughout the shopping experience (for example, using dynamic scarcity measurements, real time notifications on product sliders, list and details pages, etc.). I would greatly appreciate insights from those who have dealt with similar scenarios. What approaches did you take to manage limited stock effectively? I'm open to alternative solutions or any advice you can provide. Thanks! Best regards, Ben
    👀 1
    k
    • 2
    • 3
  • l

    loic

    06/05/2023, 10:22 AM
    Hello, I don’t know where I should put this, in a github issue or here… sorry if it’s not the right place. This is a feedback on the implementation of the gem solidus_stripe v5, around the payment intent. Before retrieving or creating a payment intent, the gem suppose that the Spree::Payment object is already present, and it needs to be passed as argument everywhere (#prepare_for_payment, #create_stripe_intent, etc..) .
  • l

    loic

    06/05/2023, 10:22 AM
    In our custom implementation, the Spree::Payment object is created after that the payment intent has been confirmed by user on the front end. So I have to overwrite or use custom methods around retrieval/creation of the payment intent, mainly using the same implementation but without reference to the payment. Do you think the payment should always be created and the current gem implementation is good or should the gem leav ethe possibility to manage the payment intent without a payment ?
  • l

    loic

    06/05/2023, 10:24 AM
    I didn’t see where this Spree::Payment is created (not from the solidus_stripe code it seems), and to be fair I don’t understand why the spree payment is created before an intent. It seems more logical to crate a payment in pending state from the moment the intent has been confirmed.
    e
    • 2
    • 15
  • s

    Steven Chao

    06/05/2023, 2:54 PM
    Hello, I've deployed my solidus app to fly.io. But I can't use the images I've uploaded, how can I fix this? Do I have to use S3? How can I do this?
    k
    • 2
    • 3
  • e

    Eric Gross

    06/05/2023, 6:58 PM
    I see how I can add additional roles by calling
    _Spree_::_Ability_.register_ability
    with new abilities. In my case though I don't want to create more abilities, but I want to indicate that any user with
    .has_role?(:admin)
    should be considered an admin by the Soldius back end. I haven't figured out how to make that work, has anyone got it working? I'm using
    pundit
    in my app rather than
    cancancan
    .
    c
    • 2
    • 12
  • e

    Eric Gross

    06/05/2023, 11:03 PM
    i currently have an ugly
    class_eval
    that i suspect i can replace with a cleaner prepended situation, but i'm not sure how ... my current code is
    Copy code
    Spree::Base.class_eval do
      before_create :associate_tenant
    
      class TenantNotFound < StandardError; end
    
      def associate_tenant
        return logger.warn("Ingoring setting tenant") if RLS.disabled?
        raise(TenantNotFound, "RLS.current_tenant is not set") unless RLS.current_tenant
    
        self.tenant_id = RLS.current_tenant_id
        <http://logger.info|logger.info>("Set thread for #{self.class.name}")
      end
    end
    is there an obvious way to replace this evaluated callback creation with one that would prepend the callback instead?
    c
    j
    • 3
    • 8
  • c

    Cody Baldwin

    06/06/2023, 12:41 AM
    I have an app for which I have made a large number of customizations, mainly overrides and deface, but I didn’t take the time to write tests—primarily because I’m not that familiar with rspec. I am finally taking the time to do this, and I’ve run into an error with trying to create a product in rspec. I’ll include the full context as part of the thread so as to not clutter up the main support window.
    • 1
    • 2
  • u

    Ulysses

    06/06/2023, 2:47 PM
    What would be the recommended way to offer a variant/option type filter like we have for taxons? For example, in the demo store's clothing category page, it would be great to have shop by color and shop by size options. Currently, I've implemented a solution that simply duplicates option types to taxons, but since taxons apply to the entire product and option types apply to variants this is a very bad design. I think this might be a commonly needed and implemented feature, and would like to learn from your experience implementing it.
  • e

    Eric Gross

    06/09/2023, 7:36 PM
    i don't know what's happening here... i am seeing this code in
    Copy code
    <% if spree.respond_to? :root_path %>
          <li data-hook="store-frontend-link">
            <%= link_to spree.root_path, target: '_blank' do %>
              <i class='fa fa-external-link'></i>
              <%= t('spree.back_to_store') %>
            <% end %>
          </li>
        <% end %>
    and it's kicking off
    Copy code
    Failures:
    
      1) Dashboard access when accessing the Solidus dashboard with access will go to the dashboard
         Failure/Error:
                       def #{method}(*args)
                         options = args.extract_options!
                         options = url_options.merge((options || {}).symbolize_keys)
    
                         if @script_namer
                           options[:script_name] = merge_script_names(
                             options[:script_name],
                             @script_namer.call(options)
                           )
                         end
    
         ActionView::Template::Error:
           undefined method `root_path' for #<Module:0x000000010c98d700>
    
         [Screenshot Image]: /Users/eric/dev/slipwise/mos/tmp/capybara/failures_r_spec_example_groups_dashboard_access_when_accessing_the_solidus_dashboard_with_access_will_go_to_the_dashboard_498.png
    
    
         # /Users/eric/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/actionpack-7.0.5/lib/action_dispatch/routing/routes_proxy.rb:45:in `root_path'
         # /Users/eric/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/solidus_backend-4.0.0/app/views/spree/admin/shared/_navigation_footer_fallback.html.erb:33:in `___sers_eric__asdf_installs_ruby_______lib_ruby_gems_______gems_solidus_backend_______app_views_spree_admin_shared__navigation_footer_fallback_html_erb___4161283517603043021_318580'
         # /Users/eric/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.0.5/lib/action_view/base.rb:244:in `public_send'
         # /Users/eric/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.0.5/lib/action_view/base.rb:244:in `_run'
    via this spec
    Copy code
    context "when accessing the Solidus dashboard" do
        describe "with access" do
          let(:admin) { create(:account, :admin) }
    
          it "will go to the dashboard" do
            passwordless_sign_in(admin)
            visit spree.admin_path
            expect(page).to have_css "li", exact_text: "Orders"
          end
        end
      end
    i gather that it is expected that i don't have a
    spree.root_path
    because i am not using the front-end, only core & the back-end. i am happy to add
    spree.root_path
    if anyone knows how, or does anyone have any ideas without having to edit the template?
    k
    • 2
    • 1
  • g

    Given Reed

    06/13/2023, 12:33 PM
    Weird question for y'all... this time it's more of a "what's the solidus way to handle this" question We've got checkout pulled onto 1 page. It's terrible, I don't like it, but it is what it is. For this, though, I don't think that makes a difference, just mentioning it on the off chance it does. It's a sort of "stepped" one-page checkout, where it still steps through all the different parts solidus needs, but it shows everything on 1 page. We needed to add an extra address to the order. We have the billing address and the shipping address, but we needed a "subscriber address" that could be different. We also needed some extra fields attached to that address. That part wasn't too bad, I added a new address attributes in
    spree.rb
    , set up the association with the new address to the order, all the new fields show up just like I want them to. The fun comes from the client wanting to move one of the new fields to a different section in the checkout. It worked perfectly when it was in the address step, but they want it all the way out on the confirm step. I've got some code in the update method of
    checkouts_controller.rb
    that logs out the value I want, has everything I need, but when I try to save the value (still associated with the address for now) I get:
    Copy code
    ActiveRecord::ReadOnlyRecord in CheckoutsController#update
    Spree::Address is marked as readonly
    The code I'm trying to use is:
    Copy code
    @order.sub_address.lockbox_code = params['order']['checkout_confirm_attributes']['lockbox_code']
                        @order.save!
    I've also tried instantiating a Spree::Address model specifically to update it directly instead of through the relationships, in case that made a difference, but it gave the same result. I saw this but that looks like how the controller is doing it now:
    Copy code
    Spree::OrderUpdateAttributes.new(@order, update_params, request_env: request.headers.env).apply
    but while I work on that I was wondering if I was just taking the wrong approach entirely 😛
    k
    • 2
    • 2
  • e

    Eric Gross

    06/13/2023, 12:59 PM
    I am trying to check out an order using the starter front-end, and i have disabled inventory management (by de-selecting "Track inventory" on the product), but when I try to transition past the address page on the checkout, I get
    Insufficient stock for order
    - how can I prevent that?
    • 1
    • 1
  • e

    Eric Gross

    06/13/2023, 1:28 PM
    does anyone have the code for a single-page checkout of an order they would be willing to share?
    g
    • 2
    • 2
  • t

    Tom Wilson

    06/13/2023, 2:35 PM
    Does anyone here happen to know who maintains
    solidus-contrib/solidus_product_assembly
    ? I've been trying to make that gem support Solidus 4, but my latest attempt is failing in the Circle specs in ways that don't seem to be related to the code itself, but rather some configuration. (Either that I don't have access to actually trigger the builds correctly, or else there's some Circle configuration that needs to be tweaked)
    d
    • 2
    • 6
  • t

    Tom Wilson

    06/13/2023, 2:35 PM
    https://github.com/solidusio-contrib/solidus_product_assembly/pull/117
    k
    • 2
    • 1
  • e

    Eric Gross

    06/13/2023, 4:05 PM
    i have a situation that i assume is beyond the ability of inventory management to handle, at least out of the box, and i'm curious if it would make sense to try to fit it into Solidus or to build it in the app otherwise. in my case, i am modeling parking spots so at a high-level, the unit is a parking spot. folks can take out a contract on a parking spot for a variable amount of time and in general i only want to create one contract per parking spot at any time. however, in some cases, i do want to be able to create a second contract on a parking spot, for instance when the first contract-holder is out-of-town. i even want to be able to have a third contract in some cases. does this kind of inventory mesh with how solidus handles stock units or does it sound sufficiently incompatible such that building it outside of solidus and only using solidus to check out after the amount due has been figured out would be better?
    c
    • 2
    • 3
  • m

    m marquesini

    06/13/2023, 8:30 PM
    Hello guys, i've posted a question in stackoverflow but saw that you guys uses slack aswell, I dunno if I can post this here but i'm getting an error which I have no ideia how to solve being new to ruby and all. this is the link I have from stackoverflow with my question, I don't know if you guys can access it but if not I can post it here no problem https://stackoverflow.com/staging-ground/76468456 Thank you all in advance 🙂
    j
    • 2
    • 3
  • m

    m marquesini

    06/13/2023, 9:21 PM
    Since Jared couldn't open the link above i've copied its contents in the reply above.
  • g

    gerardo ternero silva

    06/14/2023, 5:23 PM
    Hello, I'm trying to use the Promotions system to display discounted prices in the products' page, but I don't get where and how the product variants' prices are passed to the DOMStringMAP. Can anyone help me?
    c
    • 2
    • 2
  • g

    gerardo ternero silva

    06/14/2023, 5:28 PM
    Or there is a simpler way to display discounts?
  • t

    Tyler Kocheff

    06/14/2023, 10:18 PM
    I am trying to add a field/column to
    Spree::CreditCard
    , but I can't get the table in the database to populate during checkout, or even from the console when doing
    Spree::CreditCard.create()
    . I have tried adding to
    permitted_credit_card_update_attributes
    and just about every other possible permitted attribute I could think of. There is no error that I can find. Am I missing somewhere?
    k
    • 2
    • 2
  • e

    Eric Gross

    06/14/2023, 10:51 PM
    i am looking at the front-end starter's
    routes.rb
    file and i see the line
    Copy code
    get '/checkout/:state', to: 'checkouts#edit', as: :checkout_state
    but looking at the
    CheckoutsController
    and its superclass
    CheckoutBaseController
    and its superclass
    StoreController
    .. and on, i don't see a
    def edit
    so i can't figure out where this is defined.
    k
    • 2
    • 22
  • s

    Steve Simitzis

    06/15/2023, 1:33 AM
    Hi all, is anyone successfully using Churn Buster with solidus_subscriptions? Just want to make sure the integration is working well for other folks before we commit to signing up.
    k
    m
    • 3
    • 6
  • t

    Tom Wilson

    06/16/2023, 2:29 PM
    Hey folks - just posting here in case anyone else has encountered this. But somehow, when updating to
    solidus_support 0.9.3
    , I'm running into errors I can't fully explain. Our CI system is running
    bundle exec rake db:reset
    and it fails to find the
    Spree::Admin::UserSessionsController
    . I'm suspecting that something doesn't play nicely between the change to autoloading here and the structure of the
    solidus_auth_devise
    library.
    d
    e
    • 3
    • 8
  • t

    Tom Wilson

    06/16/2023, 2:31 PM
    I'm digging in a bit to see if I can make this reproducible locally and explain it better. But I'm curious if anyone else has experienced anything similar using
    solidus_support 0.9.3
    and
    solidus_auth_devise 2.5.8
  • e

    Eric Gross

    06/16/2023, 8:23 PM
    i'm implementing a new store with solidus, using the new stripe checkout. i'm sure i'll get it done alone, but if anyone would want to pair with me on this, i suspect it would be super-helpful for me... and i'm happy to pay for your time. anyone interested?
  • e

    Eric Gross

    06/16/2023, 9:30 PM
    should a new store use solidus_stripe v4 or would folks suggest v5 RC 2? assuming 5 should work, i have this in my
    config/solidus_stripe.rb
    Copy code
    Spree::Config.static_model_preferences.add(
      "SolidusStripe::PaymentMethod",
      "solidus_stripe_env_credentials",
      api_key: Rails.application.credentials.stripe.api_key!,
      publishable_key: Rails.application.credentials.stripe.publishable_key!,
      test_mode: Rails.application.credentials.stripe.api_key!.start_with?("sk_test_"),
      webhook_endpoint_signing_secret: Rails.application.credentials.stripe.webhook_signing_secret!,
    )
    for some reason in
    app/views/orders/payment_info/_stripe.html.erb
    ,
    Copy code
    stripe_payment_method = payment.source.stripe_payment_method
    
      # <https://stripe.com/docs/api/payment_methods/object#payment_method_object-type>
      partial_base = "checkouts/existing_payment/stripe"
      payment_type = stripe_payment_method.type
    isn't working because
    stripe_payment_method
    is nil.
    l
    k
    • 3
    • 28
  • e

    Eric Gross

    06/18/2023, 10:23 PM
    it seems that when i go to
    checkout_path
    , it goes all the way through to the summary step, but it does show the payment tab at the top - and it does show a positive total amount. when i select the payment tab, i am able to pay, then it goes back to the confirm step, and then i can complete the checkout flow. why would my checkout flow be passing through the payment step when a payment is required?
    • 1
    • 4
1...3536373839Latest