bleroy / Nwazet.Commerce

Idiomatic commerce module for Orchard CMS.
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

Possible to change Inventory without publishing product? #71

Closed bleroy closed 8 years ago

bleroy commented 9 years ago

Originally reported by: Anonymous


Thanks for your great module!!

In a site I currently develop I am getting new inventory numbers for all products every hour. I would like to update the products without publish (create new versions of) the products.

Any idea how this could be achieved?


bleroy commented 9 years ago

Original comment by Bertrand Le Roy (Bitbucket: bleroy, GitHub: bleroy):


Yes, I think you are right that this is an issue in Orchard, and your experience brings interesting data. Would you mind opening a bug on the Orchard CodePlex site with that info?

bleroy commented 9 years ago

Original comment by Dieter Schüle (Bitbucket: dpomt, GitHub: dpomt):


Thanks for the tip to disable versioning for the product Content type. This is an Option here for me.

bleroy commented 9 years ago

Original comment by Dieter Schüle (Bitbucket: dpomt, GitHub: dpomt):


Thanks for your Feedback. The reason I thought about avoiding publishing the products each time is avoid having rapidly increasing number of ContentItemVersion records. I am using taxonomies and have the experience on another orchard site that having several thousand Content item Versions each having multiple referenced taxonomy terms lead to bad Performance (e. g. Publishing an items takes nearly 10s).

bleroy commented 9 years ago

Original comment by Bertrand Le Roy (Bitbucket: bleroy, GitHub: bleroy):


This is how it works in Orchard: you publish when you want to update the publicly visible version of a content item. If that's a problem and you don't want multiple versions, you can uncheck versionable in the content type definition. The only other solution I see, but I really don't recommend it, is to hack into the product part record using IRepository and change the inventory there directly. This is not a good solution because there are side effects to changing inventory that won't happen this way (such as updating bundles that depend on that product).