Rasna Shakya
09/05/2022, 2:28 PMJohn Pitchko
09/06/2022, 7:18 PMSolidusSubscriptions::Subscription
does not have dependent: destroy
on some of its child models, like Installment
or InstallmentDetail
? I figure maybe just an oversight but perhaps someone has a smart reason for this.Zach Feldman
09/07/2022, 4:43 PMZach Feldman
09/10/2022, 3:15 AMspring-commands-rspec
gem to inject Spring into the rspec
binstub? Seems to cut 2 - 3 seconds off all rake tasks and tests in our app which is really nice for the dev cycle when you want to run 5 - 20 tests after touching a file. Maybe I'm just out of the loop on recent Spring pitfallsKurtis
09/11/2022, 3:41 PMLoadError: cannot load such file -- solidus/migrations/rename_gateways
when trying to migrate`20180814112435_rename_bogus_gateways.spree.rb` ? I have set up a fresh install and moved over everything from existing install, and no migrations have been taken out or removed. Only difference is that it’s now on Solidus 3.2 but I have reverted t. 3.1.7 and didn’t fix it. Also tried 3.2.2Kurtis
09/11/2022, 3:49 PMKurtis
09/11/2022, 4:21 PMjsbundling-rails
but perhaps someone else would knowSabo
09/12/2022, 12:13 PMSabo
09/12/2022, 12:14 PMsolidus_stipe (4.3.0)
Sabo
09/12/2022, 12:16 PMMissing partial spree/checkout/payment/_stripe
) when I go to the route /checkout/payment
Sabo
09/12/2022, 12:17 PMSabo
09/12/2022, 12:19 PMsolidus_stripe
and did rails g solidus_stripe:install
Jay
09/12/2022, 4:46 PMproducts_path
outside of the spree folders?Edwin Cruz
09/12/2022, 4:51 PMspree_app.products_path
🤔Edwin Cruz
09/12/2022, 4:51 PMEdwin Cruz
09/12/2022, 4:52 PMspree.products_path
, confirmedKurtis
09/13/2022, 8:02 AMFYI for anyone that had issues with the csrf_token, this fix sorted it for me. I think the require jquery_ujs doesn’t work for some reason, might be our use ofHi again everyone, finding this unfortunately doesn’t work on prod. Anybody familiar with our setup would be really helpful. Thanksbut perhaps someone else would knowjsbundling-rails
Jay
09/13/2022, 8:55 AM/spree/demo/show
to something like
/demo
the routes looks like:
namespace :spree do
get 'demo/show'
end
Rasna Shakya
09/13/2022, 5:08 PMSlackbot
09/14/2022, 7:12 PMMoreton Marving
09/15/2022, 2:13 AMdtynan
09/15/2022, 11:42 AMNaoki Mi
09/16/2022, 7:55 AM1 product for 100.00
tax: 9.6%
service tax: 20
test code:
order = create(:spree_order, :corporate)
order.contents.add(create(:spree_product, price: '100.00'.to_d, tax_category: tax_category).master)
order.create_fees!
order.create_tax_charge!
# Adhoc discount created via Admin Portal
order.adjustments.create!(
amount: -25.to_d,
label: "25% off due to poor service",
order: order,
source: nil
)
order.update!
expected result:
order.total == 104.12 # item_total(100) + discount(-25) + item_tax(75 * .096) + service_fee(20) + service_fee_tax(20 * .096)
order.adjustment_total == 4.12 # discount(-25) + item_tax(7.2) + service_fee(20) + service_fee_tax(1.92)
order.additional_tax_total == 9.12 # item_tax(7.2) + service_fee_tax(1.92)
order.adjustments.tax.first.amount == -0.48 # service_fee_tax(1.92) + discount_tax_refund(-25 * .096)
actual result:
order.total == 106.52 # item_total(100) + discount(-25) + item_tax(100 * .096) + service_fee(20) + service_fee_tax(20 * .096)
order.adjustment_total == 6.52 # discount(-25) + item_tax(9.6) + service_fee(20) + service_fee_tax(1.92)
order.additional_tax_total == 11.52 # item_tax(9.6) + service_fee_tax(1.92)
order.adjustments.tax.first.amount == 1.92 # service_fee_tax(1.92)
Any idea what could be generating this different behaviour?Юрий Кравченко
09/18/2022, 11:51 PMSabo
09/19/2022, 8:29 AMcvv_path'
in the checkout payment stepSabo
09/19/2022, 8:30 AMNoMethodError in Spree::Checkout#edit
Showing /home/computer/shop/app/views/spree/checkout/payment/v3/_form_elements.html.erb where line #29 raised:
undefined method `cvv_path' for #<ActionDispatch::Routing::RoutesProxy:0x00000c8ef6aa4ad8 @scope=#<Spree::CheckoutController:0x0000000006dc90>, @routes=#<ActionDispatch::Routing::RouteSet:0x00000c8e63c8a700>, @helpers=#<Module:0x00000c8f1697d428>, @script_namer=#<Proc:0x00000c8e98e82500 /usr/local/lib/ruby/gems/3.1/gems/actionpack-7.0.4/lib/action_dispatch/routing/mapper.rb:653 (lambda)>>
<%= label_tag "card_cvc", t('spree.card_code') %>
<div id="card_cvc"></div>
<%= link_to "(#{t('spree.what_is_this')})", spree.cvv_path, target: '_blank', "data-hook" => "cvv_link", id: "cvv_link" %>
</div>
<div id="card-errors" class='errorExplanation' role="alert" style="display: none"></div>
Sabo
09/19/2022, 8:30 AMM C
09/19/2022, 4:01 PMInvalid route name, already in use: 'spree' (ArgumentError)
M C
09/19/2022, 4:03 PMM C
09/19/2022, 4:03 PM# frozen_string_literal: true
Rails.application.routes.draw do
# This line mounts Solidus's routes at the root of your application.
# This means, any requests to URLs such as /products, will go to Spree::ProductsController.
# If you would like to change where this engine is mounted, simply change the :at option to something different.
#
# We ask that you don't use the :as option here, as Solidus relies on it being the default of "spree"
mount Spree::Core::Engine, at: '/'
root to: 'home#index'
devise_for(:user, {
class_name: 'Spree::User',
singular: :spree_user,
controllers: {
sessions: 'user_sessions',
registrations: 'user_registrations',
passwords: 'user_passwords',
confirmations: 'user_confirmations'
},
skip: [:unlocks, :omniauth_callbacks],
path_names: { sign_out: 'logout' }
})
resources :users, only: [:edit, :update]
devise_scope :spree_user do
get '/login', to: 'user_sessions#new', as: :login
post '/login', to: 'user_sessions#create', as: :create_new_session
match '/logout', to: 'user_sessions#destroy', as: :logout, via: Devise.sign_out_via
get '/signup', to: 'user_registrations#new', as: :signup
post '/signup', to: 'user_registrations#create', as: :registration
get '/password/recover', to: 'user_passwords#new', as: :recover_password
post '/password/recover', to: 'user_passwords#create', as: :reset_password
get '/password/change', to: 'user_passwords#edit', as: :edit_password
put '/password/change', to: 'user_passwords#update', as: :update_password
get '/confirm', to: 'user_confirmations#show', as: :confirmation if Spree::Auth::Config[:confirmable]
end
resource :account, controller: 'users'
resources :products, only: [:index, :show]
resources :order_contents, only: :create
get '/locale/set', to: 'locale#set'
post '/locale/set', to: 'locale#set', as: :select_locale
# non-restful checkout stuff
get '/checkout/registration', to: 'checkout#registration', as: :checkout_registration
put '/checkout/registration', to: 'checkout#update_registration', as: :update_checkout_registration
patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
get '/checkout', to: 'checkout#edit', as: :checkout
get '/orders/:id/token/:token' => 'orders#show', as: :token_order
resources :orders, except: [:index, :new, :create, :destroy] do
resources :coupon_codes, only: :create
end
get '/cart', to: 'orders#edit', as: :cart
patch '/cart', to: 'orders#update', as: :update_cart
put '/cart/empty', to: 'orders#empty', as: :empty_cart
# route globbing for pretty nested taxon and product paths
get '/t/*id', to: 'taxons#show', as: :nested_taxons
get '/unauthorized', to: 'home#unauthorized', as: :unauthorized
get '/cart_link', to: 'store#cart_link', as: :cart_link
end
Rails.application.routes.draw do
# This line mounts Solidus's routes at the root of your application.
# This means, any requests to URLs such as /products, will go to Spree::ProductsController.
# If you would like to change where this engine is mounted, simply change the :at option to something different.
#
# We ask that you don't use the :as option here, as Solidus relies on it being the default of "spree"
mount Spree::Core::Engine, at: '/'
# For details on the DSL available within this file, see <https://guides.rubyonrails.org/routing.html>
end