When I enable Marketplace File Downloads and then try to edit/save any product (i.e. a product that is not downloadable) I receive an error that states: "No file upload attached."

I have two different product types (i.e. content types / product classes): products that are downloadable and those that are regular non-downloadable. I think Marketplace File Downloads needs a setting where you can chose the product class/content type that is to be used for Marketplace File Downloads.

In the Seller Settings admin page we provide the machine name of the product's Filefield that is to be associated with Marketplace File Download, but not all product classes/content types may have this Filefield.

Furthermore, in the Sellers Settings page if I disable the "Require feature" option in an attempt to get rid of the "No file upload attached" error by making it not required to provide the Marketplace File Downloads Filefield, I instead get another error when I save/edit products that are non-downloadable. I receive this error: warning: Invalid argument supplied for foreach() in ....../sites/all/modules/ubercart_marketplace/mp_file/mp_file.module on line 210.

It seams that no matter what, as long as I have Marketplace File Downloads enabled, I can not have any functional non-downloadable product.

Comments

syndicateStorm’s picture

Thanks akolahi, I was short sited when I first put this together and neglected to consider product classes. I have a much better feel for the scope of Marketplace now, so hopefully I can revisit this soon and correct the issue.

syndicateStorm’s picture

Title: Marketplace File Downloads Breaks non-file download products » [Solved] Marketplace File Downloads Breaks non-file download products

I have added the ability to enable/disable product file features by product class. I haven't tested this much so it's still in dev, but I will commit it to the next beta release once it's ready. This feature is available via the mp_product_tools module. Let me know if you have questions, find bugs, etc. Cheers.

syndicateStorm’s picture

Status: Active » Fixed

I will continue to improve the support for product classes in Marketplace but I think the new functionality committed to the dev release is sufficient to close out this bug.

akolahi’s picture

thank you!

Status: Fixed » Closed (fixed)

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