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

    jakemumu

    12/13/2022, 10:59 PM
    has anyone seen this issue? I've noticed i get this error when running db:migrate vs dbschemaload:
  • j

    jakemumu

    12/13/2022, 10:59 PM
    Copy code
    PG::DuplicateTable: ERROR:  relation "index_spree_line_items_on_order_id" already exists
    .../db/migrate/20160129053931_spree_one_two.spree.rb:145:in `up'
  • j

    Jared Norman

    12/13/2022, 10:59 PM
    in what context are you running those commands?
  • j

    jakemumu

    12/13/2022, 11:00 PM
    just like:
    Copy code
    rake db:drop, rake db:create, rake db:migrate, rake db:seed
  • j

    jakemumu

    12/13/2022, 11:00 PM
    it appears to have come kind of randomly (or i'm not sure when), the conflict is that file, & the
    solidus_one_four
    which appears to create the same index
  • j

    Jared Norman

    12/13/2022, 11:01 PM
    being able to migrate from scratch is something that pretty much always eventually breaks on any long-lived rails app
  • j

    Jared Norman

    12/13/2022, 11:01 PM
    that's why
    db:reset
    doesn't try
  • j

    Jared Norman

    12/13/2022, 11:02 PM
    it just does drop, create, schema:load, seed
  • j

    Jared Norman

    12/13/2022, 11:02 PM
    and db:setup is the same but without the drop
  • j

    Jared Norman

    12/13/2022, 11:02 PM
    tldr; don't worry about it, just schema:load
  • j

    jakemumu

    12/13/2022, 11:02 PM
    but not my rails apps 😭
  • j

    jakemumu

    12/13/2022, 11:02 PM
    lol okay fair enough, just seems this would also effect fresh apps that don't have existing schema
  • j

    Jared Norman

    12/13/2022, 11:03 PM
    yeah that's true... are you sure your drop is working 🤔
  • j

    Jared Norman

    12/13/2022, 11:06 PM
    something is sus...why do you have that migration file at all
    • 1
    • 1
  • j

    Jared Norman

    12/13/2022, 11:11 PM
    If you really want to retain the ability to migrate from scratch, you can edit the migrations to resolve whatever issue you ran into, but I think this is a product of some really old migration squashes that aren't playing nice with each other.
  • j

    jakemumu

    12/13/2022, 11:45 PM
    apologies had to jet, thanks for that -- i wasn't aware that it was not a huge concern for a legacy rails app!
  • j

    jakemumu

    12/13/2022, 11:46 PM
    it'll consider fixing it eventually, but if other engineers wouldn't be shocked that you need to use schema:load vs migrate, i can live with that for now
  • a

    Alexis

    12/15/2022, 3:31 PM
    Hi, can someone help me understand the product prices, I gave one of my products a price in GBP and I’d like to show UK users the price in GBP and others the price in EUR, is this possible within the same store ?
    k
    e
    • 3
    • 11
  • j

    jakemumu

    12/16/2022, 9:38 PM
    Random question for other engineers -- I've been looking at swapping to the braintree integration for solidus, but i'm finding braintree to be almost impossible to contact and generally a bit sketchy. Does anyone recommend working with them still? It's enticing that they support apple pay etc in a unified dashboard, but wondering if there are better alternatives? I really enjoyed working with stripe, but having separate stripe + paypal integrations just seems not necessary if braintree can just wrap them all up together
    s
    c
    s
    • 4
    • 6
  • t

    TEMITAYO ADELEKE

    12/19/2022, 10:24 AM
    Hello everyone, I have a quick question about ordering in solidus; is it possible to reverse a completed order in solidus? or is it impossible in solidus to reverse an order once it's completed?
    j
    • 2
    • 2
  • s

    Sabo

    12/19/2022, 1:11 PM
    Hello, I have an error in my app in production mode, when I set a new stock from the admin panel
    admin/stock_items
    I get
    error 500, internal server error
    in a flash message, but the stock get anyway correctly set to the new value In production log I have something like :
    Copy code
    2022-12-19 13:59:14.110053012 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/request.rb:77:in `block in handle_request'
    2022-12-19 13:59:14.110060224 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
    2022-12-19 13:59:14.110083807 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/server.rb:443:in `process_client'
    2022-12-19 13:59:14.110082559 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/request.rb:76:in `handle_request'
    2022-12-19 13:59:14.110084306 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/thread_pool.rb:147:in `block in spawn_thread'
    2022-12-19 13:59:14.108900764 +0100 CET [web-1] F, [2022-12-19T12:59:14.107379 #15] FATAL -- : [2b985f61-1517-4eb3-9a7f-a0f798397ff4]
    2022-12-19 13:59:14.108946522 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] vendor/ruby-3.1.2/lib/ruby/3.1.0/tempfile.rb:238:in `size'
    2022-12-19 13:59:14.108935168 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] Errno::ENOENT (No such file or directory @ rb_file_s_size - /tmp/image_processing20221219-15-8o2d5a.png):
    2022-12-19 13:59:14.108947366 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] activestorage (7.0.4) lib/active_storage/service/s3_service.rb:30:in `block in upload'
    2022-12-19 13:59:14.108947746 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] activesupport (7.0.4) lib/active_support/notifications.rb:206:in `block in instrument'
    2022-12-19 13:59:14.108936005 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4]
    2022-12-19 13:59:14.108964453 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] activesupport (7.0.4) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
    k
    e
    • 3
    • 4
  • w

    Wes Chang

    12/20/2022, 11:05 PM
    Hi all, I’m attempting to extend the Promotions API routes to include an index route. So far, I’ve been able to return all Promotion objects but when I try to extend the object with an
    includes
    method to also return the PromotionAction, PromotionRule, and PromotionCode, the response is still the same. I’ve also added
    [:rules, :codes, :actions]
    to
    Spree::Api::Config.promotion_attributes
    . Am I missing anything? Here is my controller override module:
    Copy code
    module SolidusTestApp
      module Spree
        module Api
          module PromotionsControllerDecorator
            # override the existing before_action on the PromotionsController
            def self.prepended(base)
              base.before_action(
                :load_promotion,
                only: [:show],
              )
            end
    
            def index
              @promotions = promotion_scope.includes(promotion_includes).ransack(params[:q]).result
              @promotions = paginate(@promotions)
              respond_with(@promotions.to_json)
            end
    
            private
    
            def promotion_scope
              ::Spree::Promotion.accessible_by(current_ability)
            end
    
    
            def promotion_includes
              [:promotion_rules, :promotion_actions, :codes]
            end
    
            ::Spree::Api::PromotionsController.prepend self
    
          end
        end
      end
    end
    
    # Spree::Api::PromotionsController.prepend(DockerSample::Spree::Api::PromotionsControllerDecorator)
    Here’s what I get from pinging
    localhost:3000/api/promotions
    Copy code
    [
        {
            "id": 1,
            "description": "",
            "expires_at": null,
            "starts_at": "2022-12-20T00:00:00.000Z",
            "name": "First Subscription 30% Off",
            "usage_limit": null,
            "match_policy": "all",
            "advertise": false,
            "path": null,
            "created_at": "2022-12-16T20:34:09.680Z",
            "updated_at": "2022-12-20T21:05:39.423Z",
            "promotion_category_id": null,
            "per_code_usage_limit": null,
            "apply_automatically": false
        }
    ]
    Here is what I expect
    Copy code
    [{
        "id": 1,
        "name": "First Subscription 30% Off",
        "description": "",
        "expires_at": null,
        "starts_at": "2022-12-20T00:00:00.000Z",
        "type": null,
        "usage_limit": null,
        "match_policy": "all",
        "advertise": false,
        "path": null,
        "rules": [
            {
                "id": 1,
                "promotion_id": 1,
                "product_group_id": null,
                "created_at": "2022-12-19T19:06:51.229Z",
                "updated_at": "2022-12-19T19:07:04.097Z",
                "code": null,
                "preferences": {
                    "match_policy": "any"
                }
            }
        ],
        "codes": [
            {
                "id": 1,
                "promotion_id": 1,
                "value": "firstsub30",
                "created_at": "2022-12-16T20:34:09.687Z",
                "updated_at": "2022-12-16T20:34:09.687Z",
                "promotion_code_batch_id": null
            }
        ],
        "actions": [
            {
                "id": 1,
                "promotion_id": 1,
                "position": null,
                "deleted_at": null,
                "preferences": {},
                "created_at": "2022-12-19T19:07:12.884Z",
                "updated_at": "2022-12-19T19:07:12.884Z"
            }
        ]
    }]
    Any insight would be greatly appreciated!
    n
    • 2
    • 3
  • s

    Sébastien Ternest

    12/24/2022, 1:40 PM
    Hello, I have problems with solidus_stripe. There is still this when I try to buy something with my admin account. Is it normal that there is no template for stripe once I go to the payment page ? I use the solidus starter frontend. Thanks and merry christmas !
    n
    w
    • 3
    • 4
  • p

    PEYARA NANDO

    12/28/2022, 3:07 PM
    i added a product in the admin side, but it is not displaying on the customer side... Please help
    g
    • 2
    • 5
  • b

    BFX462heo

    12/29/2022, 9:21 AM
    Hi Solidusers. I have a little question. Wich is the best practice to render the static pages like contact page, legal info, shipment info...? Is it better to create an
    StaticPagesController
    or is better to add the views to the Rails public folder? Thanks in advance and sorry for my ignorance.
    k
    • 2
    • 2
  • t

    Tyler Kocheff

    12/29/2022, 2:50 PM
    Doing routine maintenance on one of our sites and looks like solidus_paypal_commerce_platform had a big update? After installing the new version, rails kept complaining about missing views, so based on the recent git commits, I ran the generator with
    bin/rails generate solidus_paypal_commerce_platform:install
    it added a lot of new files, and now I can get all the way to the payment step of checkout, where I get this error:
    Copy code
    Missing partial spree/checkout/payment/_paypal_commerce_platform with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in:
    ...
    ...
    <%= render partial: "spree/checkout/payment/#{method.partial_name}", locals: { payment_method: method } %>
    View appears to be the same as the current solidus_frontend commit (we're still using the old frontend on this site in case that may be related).
    k
    • 2
    • 7
  • r

    Rafaqat Ali

    12/30/2022, 4:27 PM
    I am using the excellent jumpstarrails pro template and adding solidus into it an existing app using the instructions here - https://guides.solidus.io/advanced-solidus/custom-authenticationhttps://guides.solidus.io/advanced-solidus/custom-authentication - I have hit a blocker that I think I need help/advise from someone who knows spree and roles/permissions - undefined method `spree_roles’ for #<User id: 1, email: - there seems to be step missing to make the cancancan work standalone for solidus - any pointers or advise would be welcome
  • m

    Marie Lamoureux

    01/03/2023, 8:04 AM
    Hello and happy new year to you all ! I'm trying to make the subscription gem work on my shop but I'm stuck at this part
    include the following parameters when posting to /orders/populate
    I've installed the gem, ran the migration, I can now make a product susbcribable from my admin panel by ticking a box. But nothing happens on the shop side. So I'm obviously missing a step. I don't know where/how to add the following params:
    Copy code
    {
      // other add to cart params
      subscription_line_item: {
        quantity: 2,             // number of units in each subscription order
        subscribable_id: 1234,   // which variant the subscription is for
        interval_length: 1,      // time between subscription activations
        interval_units: "month", // plural qualifier for length (day/week/month/year)
        end_date: '2011/12/13'   // stop processing after this date (use null to process ad nauseam)
      }
    }
    Could anyone help me please ?
    ✅ 1
    n
    k
    • 3
    • 31
  • t

    Tyler Kocheff

    01/03/2023, 6:30 PM
    Any good solutions for configurable products with the new frontend? Looks like the gems we were using don't work on the new frontend yet as far as I can tell. (solidus_configurable_kits and I've seen solidus_product_assembly talked about)
    j
    j
    m
    • 4
    • 6
  • j

    jakemumu

    01/03/2023, 9:40 PM
    Hey -- question for the community here. One gripe i always have with our solidus shop is that it's so hard to get information compared to something like shopify. Like "how many new users did i have last month that paid over $x" -- does anyone have an integration or some sort of metrics integration they're using which is nice to use and can hook up to solidus relatively easily?
    j
    c
    s
    • 4
    • 9
1...293031...39Latest