jakemumu
12/13/2022, 10:59 PMjakemumu
12/13/2022, 10:59 PMPG::DuplicateTable: ERROR: relation "index_spree_line_items_on_order_id" already exists
.../db/migrate/20160129053931_spree_one_two.spree.rb:145:in `up'
Jared Norman
jakemumu
12/13/2022, 11:00 PMrake db:drop, rake db:create, rake db:migrate, rake db:seed
jakemumu
12/13/2022, 11:00 PMsolidus_one_four
which appears to create the same indexJared Norman
Jared Norman
db:reset
doesn't tryJared Norman
Jared Norman
Jared Norman
jakemumu
12/13/2022, 11:02 PMjakemumu
12/13/2022, 11:02 PMJared Norman
Jared Norman
Jared Norman
jakemumu
12/13/2022, 11:45 PMjakemumu
12/13/2022, 11:46 PMAlexis
12/15/2022, 3:31 PMjakemumu
12/16/2022, 9:38 PMTEMITAYO ADELEKE
12/19/2022, 10:24 AMSabo
12/19/2022, 1:11 PMadmin/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 :
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'
Wes Chang
12/20/2022, 11:05 PMincludes
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:
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
[
{
"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
[{
"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!Sébastien Ternest
12/24/2022, 1:40 PMPEYARA NANDO
12/28/2022, 3:07 PMBFX462heo
12/29/2022, 9:21 AMStaticPagesController
or is better to add the views to the Rails public folder?
Thanks in advance and sorry for my ignorance.Tyler Kocheff
12/29/2022, 2:50 PMbin/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:
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).Rafaqat Ali
12/30/2022, 4:27 PMMarie Lamoureux
01/03/2023, 8:04 AMinclude 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:
{
// 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 ?Tyler Kocheff
01/03/2023, 6:30 PMjakemumu
01/03/2023, 9:40 PM