Jared Norman
Jared Norman
Jared Norman
Efi
08/31/2021, 8:51 PMEfi
08/31/2021, 8:52 PMJared Norman
Jared Norman
Xan
09/02/2021, 6:54 PMKevin I
09/02/2021, 7:25 PMAntonio Bonanno
09/03/2021, 11:34 AMAntonio Bonanno
09/03/2021, 11:35 AMTyler Kocheff
09/07/2021, 9:23 PMXan
09/08/2021, 3:23 PMTom Wilson
09/08/2021, 4:24 PMActiveRecord::ActiveRecordError: cannot update a new record
It seems to originate from the call in the importer to order.updater.update
, and specifically from the update_totals
call within the updater. I'm attempting to trace this further to understand more deeply - but is this... not a supported use case somehow?Tom Wilson
09/08/2021, 4:35 PMupdate_item_totals
- it looks like there's a new shipment created during the process of adding the line item, and that shipment is new, which triggers this line: https://github.com/solidusio/solidus/blob/master/core/app/models/spree/order_updater.rb#L251Tom Wilson
09/08/2021, 5:49 PMTom Wilson
09/08/2021, 7:09 PMcreate_proposed_shipments
method like so:
def create_proposed_shipments
super.tap { save! }
end
Given Reed
09/08/2021, 8:56 PMTom Wilson
09/08/2021, 8:58 PMTom Wilson
09/08/2021, 8:59 PMGiven Reed
09/08/2021, 9:01 PMJared Norman
Given Reed
09/08/2021, 10:07 PMK
09/09/2021, 1:07 AMGiven Reed
09/09/2021, 2:02 PMDaniel
09/09/2021, 2:20 PMProduct#variants_and_option_values_for
?Daniel
09/10/2021, 7:09 PMSpree::Stock::Estimator
class and then call order.create_proposed_shipments
during an orders :cart
state. Is this the way to go or are there any other preferred ways to achieve this?Tom Wilson
09/13/2021, 2:46 PM:delivery
state. I know that stock locations can be marked as fulfillable
or not to help support this, but I don't see any exemptions in the checkout state machine looking for that property.Tom Wilson
09/13/2021, 2:47 PMJared Norman