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

    Given Reed

    11/05/2021, 5:45 PM
    I'm looking to integrate the signifyd gem for fraud detection, yesterday had a talk with somebody from them about implementation and all that. They talked about a multi-week "burn in" period where we'll still send them order data, they'll still send things back, but we should disable the workflows that automatically act on their response. I believe I found where the gem decides what to do (https://github.com/solidusio-contrib/solidus_signifyd/blob/58b57e70fc8b25715d7e2ab[…]app/controllers/spree/api/solidus_signifyd/orders_controller.rb), I guess my question is: Is this the only place I need to adjust the code, and if so, would just temporarily commenting out lines 15-19 be enough for what they're talking about?
  • c

    Chris

    11/09/2021, 12:55 PM
    Hi, does anyone know how to solve this problem? I am deploying solidus-example-app to heroku.👀
    g
    • 2
    • 3
  • j

    jakemumu

    11/10/2021, 4:53 PM
    quick question -- is there a way to pull which single use promo code if any was used on an order?
    s
    • 2
    • 4
  • n

    Nazim-Yoldas

    11/13/2021, 12:54 AM
    Hey guys, I just asked the Ruby forum concerning this problem, but they think it's more of a Solidus/Spree problem. Everything's been working fine until today where, when I just do my regular
    bin/rails s
    , it's giving me an error where it states that the db doesn't exist. More precisely:
    FATAL:  database "Near_Moi_development" does not exist (ActiveRecord::NoDatabaseError)
    I've tried db:create.all, db:setup, but to no avail
    j
    • 2
    • 11
  • d

    Denys Medynskyi

    11/16/2021, 10:15 AM
    Hey guys 👋 I am working on multitenancy and seems like the best solution in Rails world https://github.com/citusdata/activerecord-multi-tenant. I wanted to use it within solidus, so I am looking to insert some global before filter like this:
    Copy code
    class ApplicationController < ActionController::Base
      set_current_tenant_through_filter # Required to opt into this behavior
      before_action :set_customer_as_tenant
    
      def set_customer_as_tenant
        customer = Customer.find(session[:current_customer_id])
        set_current_tenant(customer)
      end
    end
    Do you know what is the preferable way to do this? or simply define
    Spree::SomeBaseController
    and add filtration in any way I want 🤔
    e
    • 2
    • 2
  • d

    Denys Medynskyi

    11/16/2021, 10:19 AM
    I do know about https://github.com/solidusio-contrib/solidus_multi_domain, but I want to have separate
    /store/admin
    for each tenant
  • l

    Landon Lapensee

    11/17/2021, 5:03 AM
    Hey there. Im having trouble finding the correct way to access my routes using the rails
    url_for
    command in the product model. Essentially I want to be able to call
    generate_qr
    on a product instance and get the url for each product to display it in the admin panel. In the attached image you can see the error message I get when trying to access the product controller. The closest information I could get about the problem was this: ” Its a spree app and the controller was inherited from Spree::BaseController. url_for only sees routes within the spree engine and not globals Fixed the issue by adding main_app to url_for `main_app.url_for(...)`” I used this main_app method but got the following error message:
    Copy code
    undefined local variable or method `main_app' for #<Spree::Product:0x00007f85ba80fb28>
    Does anybody have any insight on how to tackle this problem?
    k
    j
    • 3
    • 5
  • g

    Given Reed

    11/17/2021, 4:36 PM
    This seems like a simple enough thing and I'll probably feel silly when I see how much I'm overcomplicating it... I'm trying to integrate with an api that needs the session id for the order. I initially was sending the guest_token, but they said they want the actual session id to (I believe, not completely sure) match up with some data they track using js. I know that I can't try to pull the session from the controller, it's server-side and so there isn't a web session. Is that tracked somewhere? Is that the right piece and there's something else going on?
    e
    c
    • 3
    • 6
  • t

    Tyler Kocheff

    11/17/2021, 5:01 PM
    I'm stumped on this because I imported a bunch of products a while back successfully, so trying to track down how this broke. When creating a product on either through the admin or through 
    Spree::Product.new(data_goes_here).save
     It returns
    nil
    . From the SQL in the rails console it looks like 
    INSERT INTO "spree_products"
    , 
    INSERT INTO "spree_variants"
    ,  
    INSERT INTO "spree_prices"
     are successful, and then I see this:
    Copy code
    Spree::StockLocation Load (0.3ms)  SELECT "spree_stock_locations".* FROM "spree_stock_locations" WHERE "spree_stock_locations"."propagate_all_variants" = $1  [["propagate_all_variants", true]]
      Spree::StockItem Exists? (0.8ms)  SELECT 1 AS one FROM "spree_stock_items" WHERE "spree_stock_items"."variant_id" = $1 AND "spree_stock_items"."deleted_at" IS NULL AND "spree_stock_items"."stock_location_id" = $2 AND "spree_stock_items"."deleted_at" IS NULL LIMIT $3  [["variant_id", 850], ["stock_location_id", 1], ["LIMIT", 1]]
    TRANSACTION (0.5ms)  ROLLBACK
    The stock location from the ID in the params exists. The difficult part is that 
    Spree::Product.new().errors
     is blank and thus the error in the UI is also blank when the flash errors div appears in the admin UI. Any thoughts or things I may be missing? This store is set not to track inventory in 
    config/initializers/spree.rb
     via `config.track_inventory_levels = false`but I tried switching that to true and still getting the same. The only change to products I made was adding a
    handling_charge
    boolean via migration a while back and giving that a spot in the UI, but I swear this was working after that. I have
    Spree::PermittedAttributes.product_attributes << :handling_charge
    in
    config/initializers/spree.rb
    e
    r
    • 3
    • 8
  • g

    Given Reed

    11/17/2021, 8:13 PM
    Attempting to run
    bundle
    after adding braintree (https://github.com/solidusio/solidus_paypal_braintree) to the gemfile throws an error. Attempting to run the
    gem install
    from the error message also fails. Is there a known way to get braintree installed?
    j
    • 2
    • 3
  • a

    Alexander

    11/18/2021, 12:42 PM
    is it possible to implement virtual products? so if a customer purchases a ticket/voucher for example that a download starts?
    g
    j
    • 3
    • 3
  • v

    victor

    11/22/2021, 1:38 PM
    Hi guys
  • v

    victor

    11/22/2021, 1:38 PM
    Suddenly getting a nil on @product_attributes after upgrading to 3.1
    k
    • 2
    • 17
  • j

    jakemumu

    11/22/2021, 11:01 PM
    anyone have an idea why the delete convention on the solidus frontend wouldn't work after navigate to the page via turbolinks?
  • j

    jakemumu

    11/22/2021, 11:01 PM
    all the generated code looks the exact same -- however it only works on a full page load and not via a turbolinks visit
  • j

    Jared Norman

    11/22/2021, 11:03 PM
    you're saying that the UJS stuff just isn't working at all after you navigate to a new page?
  • j

    jakemumu

    11/22/2021, 11:15 PM
    yeah -- i'm actually not an expert on the paradigm that allows that delete syntax to work, but when i navigate to the page via a turbo load -- clicking the "delete" actually tries to load the
    #
    on the page -- so seems UJS isn't grabbing it
    c
    • 2
    • 4
  • j

    jakemumu

    11/22/2021, 11:15 PM
    perhaps something is wrong in my application.js?
  • j

    Jared Norman

    11/22/2021, 11:22 PM
    normally Rails' UJS code intercepts those clicks and does the magic to make them work... are you seeing any kind of JS errors or anything? (disclaimer: I normally do not use Turbolinks)
  • j

    jakemumu

    11/22/2021, 11:25 PM
    yeah it's strange no other errors -- fair enough though i'll keep looking at it
  • j

    jakemumu

    11/22/2021, 11:25 PM
    it must be something with ujs
  • v

    victor

    11/23/2021, 2:59 PM
    After upgrading to 3.1 I am getting various ActiveStorage adaptor errors. I've not set anything up. It used to be the default Paperclip implementation. I am getting undefined method
    processed
    and
    analyze?
    t
    • 2
    • 4
  • j

    jakemumu

    11/23/2021, 7:32 PM
    alright i'm circling back on this -- has anyone taken the dive to using Turbo with solidus? about 99% of everything works totally fine, but there are a couple slight issues, hoping to trade tips with someone who may have encountered these
    c
    k
    s
    • 4
    • 14
  • n

    nsolidus

    11/25/2021, 10:20 PM
    hi guys. i have a problem with active_storage. every time i restart the app (or after a while) the images are not available, they return 404. if i try to access them via browser, i get 'the image cannot be displayed because it contains errors'. what can it be? i am using active_storage and storing images in disk
    j
    • 2
    • 24
  • a

    Andrew

    11/29/2021, 10:11 AM
    We don’t need the ability to track inventory but we do want to be able to set a variant as out of stock. Is there any way to do this without implementing the inventory tracking? My currently solution is to set all the products as stock on hand as 0 and back orderable = true. If the item is not available for purchase I set back orderable = false. However, the problem with this method is that it still requires us to transfer in a unit of stock in order for the item to be shipped to the customer
    k
    v
    t
    • 4
    • 6
  • s

    Slackbot

    11/29/2021, 10:48 AM
    This message was deleted.
    i
    • 2
    • 1
  • a

    Andrew

    11/29/2021, 2:02 PM
    Is it possible to override Core validations using a decorator a
    self.prepended(base)
    The code below doesn’t seem to work
    Copy code
    module Spree::StockItemDecorator
      def self.prepended(base)
        base.validates :count_on_hand, numericality: { only_integer: true }, unless: :backorderabled?
      end
      Spree::StockItem.prepend self
    end
    a
    • 2
    • 3
  • g

    Given Reed

    11/29/2021, 3:05 PM
    Has anybody here done any implementation of the Solidus Braintree (https://github.com/solidusio/solidus_paypal_braintree) gem? I got the sandbox account set up, I linked it to my paypal sandbox account, I added the keys to the config, I see the paypal button on checkout, but when I try to use paypal to check out, I see
    smart_button_validation_error_derived_payee_transaction_mismatch_sandbox
    and
    smart_button_validation_error_payee_no_match
    in the developer console. It's likely that it's a configuration issue on my end, but I'm using the values from the braintree dashboard. I went through the readme and didn't see any additional setup or config options, anybody have any ideas?
    k
    • 2
    • 24
  • g

    Given Reed

    11/29/2021, 9:38 PM
    Trying to set up a custom payment method to handle purchase orders. I'm trying to base it off of checks since there's no need for much of anything at checkout, it's just setting a PO number and moving along the flow. The issue I'm running into is that I'm not sure how much I need to set up for such a simple payment method. I tried pulling the
    check.rb
    contents into my custom rb, I've inserted the new payment method into the store config, but when I try to set it up as a payment method for the store I get
    Copy code
    Invalid single-table inheritance type: Spree::PaymentMethod::Check is not a subclass of Spree::PaymentMethod
    I have tried inheriting
    Spree::PaymentMethod
    ,
    Spree::PaymentMethod::Check
    , have tried
    Embold::PurchaseOrder
    and
    Embold::PaymentMethod::PurchaseOrder
    , but it seems like I'm still missing something. Do I need to build a skeleton service provider / gateway and reference it in the new payment method? Is there a controller I need to implement in addition to the model? Does the "check" payment method do weird stuff that I'm just not catching and is causing me headaches? It appears that by picking "check" I've made it hard on myself to do a search for things in the code to look for how that one is set up 😛
    p
    • 2
    • 6
  • g

    Given Reed

    12/02/2021, 3:24 PM
    (pulling out of the thread in case anybody else has any ideas) I've got a custom payment method (PurchaseOrder) going that basically inherits 
    Spree::PaymentMethod::Check
    , now I want to collect a value during checkout (the po number). I can show the field, but I'm not sure how to get the value saved. I created a table to store purchase orders (
    purchase_orders
    ), I created a payment source, and I set the source to the payment method. I'm not entirely sure how to link the new table to the source / method. Is it something that should be automatic and it's all from a naming convention I botched? Do I need to specify the table name somewhere in the source? Should I try to use the existing credit cards table but without all the cc data?
    j
    b
    • 3
    • 31
1...8910...39Latest