Hi

On Oct 15, 2009, at 3:09 PM, Godshall <[email protected]> wrote:

>
> I had another question regarding Satchmo's downloadable products.  Is
> it possible to serve these files from an external service like Amazon
> S3?

Yes it is.And it's a natural fit:)

> This site will have an indefinite number of downloadable
> products, so utilizing a service like S3 would be ideal.  Any thoughts
> on whether or not Satchmo and S3 would be a good fit?  Has anyone had
> experience with this yet?  Thanks.

Actually this was my first time I heard of satchmo when I got  
contracted to integrate s3 upload and download with private and  
expiring links.
As you can imagine I was not mainly involved with satchmo side so I  
can't give you a lot of inside there.
Basicly whn you upload a file to s3 you get a link with it if it is  
public or you can generate sec link for it.
Your product would store the sec direct link to this product and  
either your server fetch it for you or you can provide it as a direct  
download link.
But with the later your user can download it as many times he wants it.
Our system generated an expireing link to the product upon purchase  
and give that link to the user.
I hope it helps.

lzantal

>
> On Oct 9, 10:31 am, Bob Waycott <[email protected]> wrote:
>> These all sounds like business decisions on your end.
>> You could always clean out inactive products every so often ... or  
>> move them
>> via a script to some ProductArchive model that saves them for  
>> historical
>> reasons. I'd probably go a route like that, honestly. Have a job  
>> that runs
>> to dump the Product table to ProductArchive which is an exact copy  
>> of all
>> Product fields, and only keep active Products around.
>>
>> But again, these are all business decisions for you to figure out  
>> first by
>> asking yourself these questions, and then designing & developing  
>> the store
>> to match.
>>
>>
>>
>> On Fri, Oct 9, 2009 at 12:54 PM, Godshall  
>> <[email protected]> wrote:
>>
>>> Bob,
>>
>>> Thanks for your reply.  I want to use model inheritance for the very
>>> reason you mentioned, but I'm concerned it will become difficult to
>>> manage in the long run.  It is likely that there will be thousands  
>>> of
>>> products on the site, and thousands more that will never be
>>> activated.  What should happen to submissions that are never
>>> activated?  Is it important to keep a history of a user's  
>>> submissions,
>>> or should I just delete the ones that are rejected?  I realize that
>>> this is ultimately a design decision I will have to make, but I  
>>> would
>>> like to know how other people would approach this.
>>
>>> Thanks for letting me bounce my ideas and questions off you!
>>
>>> On Oct 9, 5:54 am, Bob Waycott <[email protected]> wrote:
>>>> Is there a reason you couldn't save yourself the duplicated data by
>>>> inheriting Product, but setting is_active=False until the time  
>>>> that all
>>>> requirements are met and it actually becomes a live downloadable  
>>>> product?
>>
>>>> On Fri, Oct 9, 2009 at 4:09 AM, Godshall  
>>>> <[email protected]>
>>> wrote:
>>
>>>>> I'm developing a store that will offer user contributed  
>>>>> downloadable
>>>>> products.  I'm still very early in the process, but I have satchmo
>>>>> installed properly and  I'm working through the source code and
>>>>> documentation to figure out the best approach for this kind of  
>>>>> service
>>>>> (without hacking the satchmo source hopefully).
>>
>>>>> Here is a general overview of how I envision this working:
>>>>> 1.  User submits content for review (needs to support multiple  
>>>>> file
>>>>> uploads).
>>>>> 2.  Admin reviews the submission and either approves, rejects, or
>>>>> instructs the user what steps need to be taken for approval.
>>>>> 3.  If approved, the submission will be added as a Custom  
>>>>> Downloadable
>>>>> Product , and files will be automatically added to a zip file.
>>>>> 4.  User content now available for purchase.
>>
>>>>> The two approaches I have seen for creating a custom product  
>>>>> include
>>>>> (1) Inheriting the Product model (
>>> http://thisismedium.com/tech/satchmo-
>>>>> diaries-part-one/) and (2) Establishing a OneToOne relationship  
>>>>> with
>>>>> the Product model (http://www.satchmoproject.com/docs/svn/custom-
>>>>> product.html).  For a traditional store I would probably just use
>>>>> model inheritance, but seeing that not all user submitted  
>>>>> content will
>>>>> become products for this project, the OneToOne relationship  
>>>>> seems to
>>>>> make the most sense.  Here's an example of how I think the models
>>>>> should look at this point:
>>
>>>>> class UserContent(models.Model):
>>>>>        name = models.CharField(max_length=255)
>>>>>        user = models.ForeignKey(User,  
>>>>> related_name='submitted_content')
>>>>>        short_description = models.TextField(max_length=200)
>>>>>        description = models.TextField()
>>>>>        #ill probably use a separate file attachment model
>>>>>        ...
>>>>> from product.models import Product
>>
>>>>> #created when the UserContent object is approved
>>>>> class UserDownloadableProduct(models.Model):
>>>>>        product = models.OneToOneField(Product,
>>> verbose_name=_('Product'),
>>>>> primary_key=True)
>>>>>        content = models.ForeignKey(UserContent)
>>>>>        file = FileField(_("File"), upload_to=_protected_dir) #zip
>>>>> file
>>>>>        ...
>>
>>>>> As you can see, even though not every UserContent object will  
>>>>> become a
>>>>> UserDownloadableProduct, I have to collect some of the same data  
>>>>> as
>>>>> the satchmo Product model (name, short_description, description,  
>>>>> etc)
>>>>> so that I can eventually create a Product with that data for those
>>>>> that are approved.  This is where the model inheritance approach  
>>>>> seems
>>>>> to have an advantage (so that I'm not duplicating data), but as I
>>>>> described earlier, it seems like a bad idea to create a Product  
>>>>> for
>>>>> every user submitted content (since some of them will be  
>>>>> rejected).
>>
>>>>> Anyways, I would appreciate some feedback about the direction I'm
>>>>> heading with this project.  Am I taking the best approach for  
>>>>> creating
>>>>> a custom downloadable product?  For UserDownloadableProduct,  
>>>>> should I
>>>>> just reuse most of the DownloadableProduct model code that is  
>>>>> packaged
>>>>> with satchmo?  Is there anything else I need to consider?  Any
>>>>> feedback or insight would be appreciated.
>>
>>>>> Thanks!
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to