GithubHelp home page GithubHelp logo

Comments (8)

mrpollo avatar mrpollo commented on August 14, 2024

Hey @sohara i think you might want to look into the backorder splitter https://github.com/spree/spree/blob/2-0-stable/core/app/models/spree/stock/splitter/backordered.rb sounds like it's splitting your order

from spree-product-assembly.

huoxito avatar huoxito commented on August 14, 2024

Here's a suggestion (I'll try to implement that myself later on, just need to think more about it before pushing here):

When looping through parts in Packer, here https://github.com/spree/spree-product-assembly/blob/2-1-stable/app/models/spree/stock/packer_decorator.rb#L28-34, we could do something like self.holds_bundle! and then here, https://github.com/spree/spree/blob/master/core/app/models/spree/stock/packer.rb#L12-18, only split if that Packer instance doesn't deal with a bundle.

from spree-product-assembly.

sohara avatar sohara commented on August 14, 2024

@huoxito @mrpollo Thanks so much for your suggestions. I'm not sure what's going on with our stock situation here because the bundles are being split even when I remove Spree::Stock::Splitter::Backordered from the ssytem (the only splitter is Spree::Stock::Splitter::ShippingCategory ). I'll try this out on a stock spree store and see what happens.

from spree-product-assembly.

huoxito avatar huoxito commented on August 14, 2024

@sohara keep in mind that we build packages as per Stock Location so if the bundle has parts in different stock locations you will still end up with part split across packages / shipments. Would that be the case here?

from spree-product-assembly.

sohara avatar sohara commented on August 14, 2024

@huoxito Yes, I realize that is the default behaviour but it is not desired for us... in general we'd like to keep bundles shipped together so customers don't have to pay extra shipping costs.

The strange thing is that I am not sure what is splitting the shipments on our store:

Spree::Stock::Splitter::Backordered.class_eval do

  def split(packages)
    return_next packages
  end

end

And the shipments are still being split, even though it prevents splitting when I add it to a stock Spree store. So there must be some other behaviour in our app that is also doing some 'splitting'. I will let you know if I can track it down.

from spree-product-assembly.

huoxito avatar huoxito commented on August 14, 2024

I think this is a better way to remove the Backordered splitter:

Rails.application.config.spree.stock_splitters = [Spree::Stock::Splitter::ShippingCategory]

By doing that none of your packages should be split by their backordered / on_hand status, being an assembly or not. In case we want to join parts from different Stock Location in the same shipment we probably need write a new Adjuster class or make the AssemblyPrioritizer join those parts on the same package. I'm afraid that will be a bit more complicated.

from spree-product-assembly.

sohara avatar sohara commented on August 14, 2024

@huoxito Yes, I thought that should work, but I tried that yesterday and our shipments were still being split.

We don't want to join parts from different stock locations, we just want to not split shipments that have backordered parts. Instead we just want to have the entire shipment 'backordered' until all the items are in stock.

from spree-product-assembly.

huoxito avatar huoxito commented on August 14, 2024

Ok so please let us know if you can reproduce it on a fresh Spree install
with product-assembly.

On Thu, Oct 10, 2013 at 3:01 PM, sohara [email protected] wrote:

@huoxito https://github.com/huoxito Yes, I thought that should work,
but I tried that yesterday and our shipments were still being split.

We don't want to join parts from different stock locations, we just want
to not split shipments that have backordered parts. Instead we just want to
have the entire shipment 'backordered' until all the items are in stock.


Reply to this email directly or view it on GitHubhttps://github.com//issues/56#issuecomment-26076408
.

Washington L Braga Jr

Developer
Spree Commerce, Inc.

from spree-product-assembly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.