I created a product type where I don't want stock level to be active.
I go to Power Tools setting for that product type, check "Do not set stock level".
When I create that kind of product, it says I have no stock. If I check the stock levels, its checked with 0 values.

I need the stock to be unchecked, can you help me?

Comments

Edy Gorbacev’s picture

Decrement stock upon order submission, set it off..
go to :

admin/store/ca/uc_stock_decrement_on_order/edit

and set the status "disable"

mairav’s picture

Hi @edygorbacev, thanks for your reply.

The problem is not about the stock being decrement. The problem is that the product has no stock at all.

If I go to /admin/store/products/power-tools inside the product I want to modify, in the Stock title, if I check "Do not set stock level", when the product is created, it should not be created with the checkbox of stock checked, cause I said that this product doesn't need a stock level.

But insted, despite I checked "Do not set stock level", the product is created with th stock checkbox checked.

I think this is a problem with the uc_product_power_tools module.

Can you tell me how can this be fixed?

Sincerely thanks.

willvincent’s picture

Category: bug » feature
Priority: Normal » Minor
Status: Active » Postponed

Power tools lets you set defaults.. the "do not set stock" checkbox will simply not set a default value, not turn off stock for that item.

jahaswel’s picture

your comment: "If setting a default stock level, stock will be set to active for products of this type."

makes it appear that if you select "do not set stock level" that the stock will be set to inactive.

It would be great if this was the case because our store has some products that we need to track stock for and other that it is not necessary. The current configuration adds an additional step to listing a product and risks making an available product un-orderable.

please considering fixing this.

tr’s picture

Version: 6.x-1.11 » 7.x-1.x-dev
Priority: Minor » Normal

New features will go into the Drupal 7 version first. A patch to implement this feature would be highly appreciated.

tr’s picture

Status: Postponed » Active
litmusdesigns’s picture

This 'feature' hasn't been added to the 7.x dev module as of the 2011-Oct-17 version (I would actually consider it a bug, since Power Tools is changing the default behavior of the stock module even when "Do not set stock level" is selected").

The fix for "7.x-1.x-dev 2011-Oct-17" is to change line 285 from:

  // Handle Stock settings here.
  if (module_exists('uc_stock')) {

to:

  // Handle Stock settings here.
  if (module_exists('uc_stock') && $class_settings['stock']) {
mynameiscorey’s picture

Status: Active » Needs review
StatusFileSize
new719 bytes

I agree this is a bug considering the misleading help text and as litmusdesigns said, how it changes the default behavior.

Attached a patch of the above fix for those interested. It's working in my production site.

  • stefan.r committed 56d092b on 6.x-1.x
    Issue #861950: Stock checked even when "Do not set stock level" was...
stefan.r’s picture

Issue summary: View changes
Status: Needs review » Fixed

  • stefan.r committed 12c1a9b on 7.x-1.x
    Issue #861950: Stock checked even when "Do not set stock level" was...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.