Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Downloads - stock disappearing


Jason

Recommended Posts

I have a wee problem with the stock for some downloads. I set the stock to 9999, and the download appears in the shop. When I 'buy' a copy, the stock goes to -1 and the product disappears from the shop.

 

At first I thought that it was when no file was associated with the download. And, although that seems to be true (?), the problem persists. Is it because I have several options/attributes on one product?

 

Has anyone had the same problem? Or can anyone suggest a solution ?

 

If anyone has a mo, you can take a look here:

http://uptoten.com/catalog/

We haven't finished building (if we had, I suppose I wouldn't be posting), so it is full of holes.

 

Thanks

Link to comment
Share on other sites

This should resolve your problem..

 

go to your catalog admin and choose configuration. In the list you should see stock. choose stock and you will find options for check stock level and subtract stock. edit subtract stock and choose false. You can also choose false for check stock level also. If your out of stock on a product you can always choose out of stock by editing it and choose in stock when your back in stock.

 

Hope this helps!

:D

Pete

Link to comment
Share on other sites

Hi Pete,

 

Thanks. That would solve the problem. But then I would have a problem with stock for other "real" products - I am VERY forgetful :wink: . I will use this idea if I can't find out how to fix it...

I would much rather just stop downloads from being deducted from stock atall and leave the stock control on.

 

Any other ideas?

 

Thanks

Link to comment
Share on other sites

Has anyone had the same problem? Or can anyone suggest a solution ?

 

when did you download the snapshot??

 

I fixed the very same problem in CVS sometime ago.

 

see http://cvs.sourceforge.net/cgi-bin/viewcvs...=1.109&r2=1.110

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

We have the latest version. I just checked that. In fact we installed about two weeks ago, so our snapshot is from early October.

 

I have found the problem (but not the solution):

 

I had a lot of attributes and files to download all over the pplace. I then changed a whole lot of them - lots of deletes for both downloads and download attributes (ALL of them through admin, by the way).

 

It seems to have deleted some lines in the products_attributes_download table - some products atributes that should ahve downloads attrributes attatched to them don't... When I try to update them, via admin, the update does not take place. When I run an SQL query, the insert works (of course) and the module works fine again.

 

The update code must be doing an update query (logical), and in this particular circumstance should be doing an insert.

 

I will a) clean up my database to make sure it is all logical and B) see what I can hack so that if this happens again, the update will insert the line if it does not exist and update if it does.

 

Thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...