Comments (8)
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.
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.
@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.
@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.
@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.
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.
@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.
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)
- ETA on 3-0-stable compatibility? HOT 3
- translation missing en.spree.validation.must_be_int HOT 1
- Bundler could not find compatible versions for gem "activemerchant"
- Parts should be linked to Variants instead of Products. HOT 7
- Possible Issue with setting part master to not track inventory HOT 1
- Disabling of before_payment state eliminates payment_sources HOT 3
- Part items pricing not adding up
- Option to NOT add part to product assembly
- can_be_part and individual_sale translation
- Didn't work for spree 3.0.0 HOT 1
- Compatibility with Rails 5 and Spree 3.2
- Need of a clearer readme || Getting started || Documentation HOT 1
- spree 3.3 compatible? HOT 3
- Stock availability bug with multiple variants in assembly HOT 2
- Missing products due to translations HOT 2
- Caching issue on assembly product pages (product cache key) HOT 1
- Spree 3.7 compatibility
- undefined method `variant_options' in admin/orders/######/edit HOT 1
- Spree 4.2 HOT 1
- Not tracking inventory correctly when same product in multiple bundles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spree-product-assembly.