• Welcome to KonaKart Community Forum. Please login or sign up.
 

Module using FileUpload field

Started by tduffey, July 05, 2011, 08:08:56 pm

Previous topic - Next topic

tduffey

Does anyone have a working example of a custom module using a FileUpload field?  I am trying to a create a new promotion with the ability to upload an image using the "FileUpload" set function.  This is very loosely described as an option in the Cod payment module.  However, when I add the field and create a new promotion I just get a text input, no upload button.

Where'd I go wrong?

Tom

kate

That 'set function' doesn't work with promotions today...   it does work however with the configuration variables and modules though - Cod demonstrates this with an example (that isn't actually used by the module and is only there as an example).

tduffey

Thanks for the response.  Our use case is that we'd like to display a popup w/information about the promotion after coupon code entry including one or more images.  We're integrated with the Magnolia CMS and are going to use it to handle the assets since there seems to be no way to associate an image to a Promotion in KK.

Tom

trevor

When you create a promotion module, you can give it as many fields as you want in order to connect the promotion to one or more images.

tduffey

I'm confused.  According to kate the "set functions" don't work with promotions but you seem to be implying that they do?  I tried it and did not get an "upload" button when adding a new promotion.

It doesn't help us to have files attached to the module itself -- these would be per-promotion.

trevor

You don't get an upload button in the promotion panel, but you can get one or more entry fields where you can enter the names of the images, assuming they are on the server.

tduffey

Understood, and we definitely need the ability to upload...so into Magnolia the content goes.

trevor

You can upload images from other parts of the admin app to get them on the server so you could get them there, although I'd say that most of our customers use FTP as part of an automated process, rather than uploading single images through the admin app.

Anyway, if you are integrating KK with a CMS system it probably makes more sense to manage the content through the CMS since that's what it's good at doing.