Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Gallery Server Integration With Zazzle Project Phase 1 Complete
chrisrogeski
#1 Posted : Wednesday, 16 February 2011 5:56:59 PM(UTC)
Rank: Member

Joined: 15/12/2010(UTC)
Posts: 28
Location: USA

I'm working on a project to integrate Gallery Server Pro w/ Zazzle.com, just thought I'd share my progress so far:

I've created a settings page where the user can:

1. Enable the banner (website gets referral and zazzle commission)
2. Add their Zazzle Associate ID to get paid for their referrrals)
3. Add their own custom zazzle API link (product or buffet gets them all the $$)
4. Donate the referral to the website while keeping the proceeds from their zazzle store API link
5. They can also just put a link to their website instead of a zazzle API link.

Live Examples
Admin added this picture, enabled the store and pointed it to a specific product page.
http://galleryserver.gre...com/default.aspx?moid=4

A user added this picture, enabled the store and pointed it to a template buffet.
http://galleryserver.gre...com/default.aspx?moid=7

System Added this image and the store is not enabled:
http://galleryserver.gre...com/default.aspx?moid=6

Screenshot of user settings page attatched.

Modified the media gallery object and added a user settings page, and added two new tables and stored procs.

An Admin table controls the website default Zazzle referral ID Zazzle product API link, and the MOID of the "sample" image to use for the user settings page.
chrisrogeski attached the following image(s):
chrisrogeski attached the following image(s): ZazzleUserSettingsScreenSHot.jpg
Roger Martin
#2 Posted : Thursday, 17 February 2011 8:48:52 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Can you give us the big picture here? Are you saying you have a customized version of GSP where you can sell photos through a 3rd party (Zazzle)? Can you describe the workflow a buyer would go through? Does the act of buying give them access to the high-res version? A non-watermarked version? Is it completely automated or does a purchase require admin intervention?

This looks intriguing and I'd like to understand it better.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
chrisrogeski
#3 Posted : Thursday, 17 February 2011 10:20:16 AM(UTC)
Rank: Member

Joined: 15/12/2010(UTC)
Posts: 28
Location: USA

This is a modified version of the 2.4.xx November release of GSP, and with modified DLLs, the enabled/disabled banner images, and the updated page/control files, and some database update scripts to add the tables, and some default admin settings, anyone could put this into their website, I think.

The only part I have not added yet is a page to modify the admin settings, but those could be configured manually pretty easy to add though.

I chose to make my own tables and stored procedures so I would not have to modify too much of your original code, otherwise it might get messy when upgrading to newer versions.

Once the admin settings and tables are in place it's automated. Each user can configure their own settings, which are blank by default) via a Make Money From My Pictures link at the top of the page.


How Sales Works:

The user clicks the ink, which passes a high res image to Zazzle.com, they purchase the product with the image from Zazzle and Zazzle pays markup to the store owner, and referrals to the referring user.

There are two ways you make money from Zazzle.

1. Sales royalty/markup of items in your store. You create products, feed in images (or up load them) and when someone buys your product with your picture or your own, you get a commission of the sale, a minimum of 10% markup

2 Referrals. If you have a product, and I link to it, with my referral ID in the link I get a commission of 15% and up. More if I refer tons of people to Zazzle products.

The Zazzle API works by letting you pass in link to the high res version of the image, to a Zazzle store/product link.

Users would have understand that if they enable the store, the website owner would technically be getting money from the sale of their pictures, but the user would hopefully get referral credit from Zazzle if they enter their accountID. Or those user could choose to provide their own store/referral information and take all the money for themselves. This might not be the intended use of the Zazzle API, but it should all work in theory. =:)

If the user wants to use their own store link, they have to tell Zazzle that they own some of the pictures on the website by 'declaring' the domain. (http://www.zazzle.com/my/associate/domains)

From Zazzle.com http://www.zazzle.com/se...roducts/nameyourroyalty
What if my product is sold as a result of a "Referred Sale"?
"Referred Sale" means a sale where Zazzle incurs a cost to acquire that sale. Examples of Referred Sales include: sales arising from Zazzle's Associate Program; sales resulting from a referral through a registered Affiliate channel; sales resulting from our Search Engine Marketing efforts; and sales resulting from our special relationship with Google Base. Let's say a Zazzle Associate likes a particular t-shirt you designed and they put a link to it on their website or blog. When a buyer comes to Zazzle through that link and buys your shirt, we pay the Zazzle Associate a referral fee for referring that order to your product.


How the code works:

The Zazzle API works by letting you pass in link to the high res version of the image, to a Zazzle store/product link.

For example, users are not able to browse the high res version of this image on my website without being an admin.
http://galleryserver.gre...com/default.aspx?moid=2

So in the code behind I grab the media object ID and the craft a special link to the high res version of the image, which can be retrieved even if the user is not logged in. (a bug?,but a handy one in my case)

Small: http://galleryserver.gre...moid=2&dt=2&g=0
High Res: http://galleryserver.gre...moid=2&dt=3&g=0

I then feed that link into the Zazzle API link by replacing/adding the querystring value for CoverIMage, or Image1 in the template buffet/product template link from in the admin zazzle settings or user zazzle settings table, depending on the users store settings.

So to put it all together, the user who added this image, has chosen to enable the banner/store and has given a referral ID, so we user the website's Zazzle template buffet link, and replace the coverimage link, with the link to the high res version of this image, and then replace the 'referral' ID with their referral ID '238345325100453600'. Note that the AT query string ID is the ID of the website 'great maine picture', and the RF ID in the link below is for the user '238345325100453600' (and ID i just made up).

http://www.zazzle.com/ap...id%3d2%26dt%3d3%26g%3d0



chrisrogeski
#4 Posted : Thursday, 17 February 2011 10:28:04 AM(UTC)
Rank: Member

Joined: 15/12/2010(UTC)
Posts: 28
Location: USA

I'm not sure about watermarking, does not seem to be working on my images (text based, I did not try a watermark image). Any suggestions there would be appreciated.
Roger Martin
#5 Posted : Thursday, 17 February 2011 10:53:30 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Thanks for the explanation. Looks like a pretty slick integration.

About the possible high-res bug: Do you have the option 'Allow anonymous browsing of high resolution images' disabled on the gallery settings page? If it is disabled, then anon users (like Zazzle) should not be able to access it. On the other hand, if all you did was turn off the 'Show high-resolution image toggle button' option on the gallery control settings page, they you are seeing expected behavior.

As for watermarking, be sure you aren't seeing the previously cached copy of the image. Force a browser refresh.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
chrisrogeski
#6 Posted : Thursday, 17 February 2011 11:21:14 AM(UTC)
Rank: Member

Joined: 15/12/2010(UTC)
Posts: 28
Location: USA

Thanks, I'd be happy to share the source code if you ever wanted to put this, or a variation of it into GSP.

Actually in the the Gallery Settings, the Allow anonymous browsing of high resolution images is unchecked.

[x] Allow anonymous browsing
[ ] Allow anonymous browsing of high resolution images

And on the gallery control settings page, the Show high-resolution image toggle button is checked.
[x] Show high-resolution image toggle button

Right now when I login as a regular user, I can only see the high res button for images that I added.

As for the watermarking, I've had it turned on for some time now but have never seen it work in any browsers (ie,
Firefox, Chrome)

chrisrogeski attached the following image(s):
chrisrogeski attached the following image(s): Watermarking.png
chrisrogeski
#7 Posted : Thursday, 17 February 2011 11:31:16 AM(UTC)
Rank: Member

Joined: 15/12/2010(UTC)
Posts: 28
Location: USA

Maybe I needed to re-sync the website? The watermarks are there now.

And thankfully, when I click the zazzle link the watermark is not being pushed to to Zazzle which is great =:).

EDIT - Nevermind, the watermarks on the images are coming through. Maybe I'll create a custom Zazzle version getmediaobject.ashx that returns the images without the watermark?
Roger Martin
#8 Posted : Thursday, 17 February 2011 12:53:20 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

How quickly I forget: I actually identified the high-res thing as a bug and fixed it three weeks ago. It will be included in 2.4.6.

If you want to preserve the original behavior, you'll have to stick with your current version or manually revert the code. Or maybe this is good enough: enable high-res viewing but turn off the 'view high-res' button on the gallery control settings page.

At any rate, here are the details from my bug tracker:

Title: Anonymous user can view media object when anonymous browsing is disabled

Details:
When anonymous browsing is disabled, GSP correctly restricts users from browsing albums and media objects through the web page. However, the HTTP handler that serves the media files does not correctly respect this setting, allowing a user who happens to know the URL to view the media objects through the handler.

Resolution:
Modified the IsUserAuthorized function in getmediaobject.ashx.cs to delegate authentication for anonymous users to the SecurityManager class. It already has logic to check anonymous access, but it, too, had a bit of a security hole, so it was fixed.
Another change was that the handler was modified to always use the gallery ID associated with the media object when possible rather than the gallery ID specified in the query string.

Files modified:
Website/gs/handler/Website/gs/handler/getmediaobject.ashx.cs
TIS.GSP.Business/SecurityManager.cs
Roger Martin
Creator and Lead Developer of Gallery Server Pro
chrisrogeski
#9 Posted : Thursday, 17 February 2011 1:03:56 PM(UTC)
Rank: Member

Joined: 15/12/2010(UTC)
Posts: 28
Location: USA

Roger, Thanks for the additional information!
chrisrogeski
#10 Posted : Thursday, 10 March 2011 9:19:24 PM(UTC)
Rank: Member

Joined: 15/12/2010(UTC)
Posts: 28
Location: USA

Phase 2 is complete. Site Settings page now contains new settings for the Zazzle store feature.

Screen Shot Attached.

Although I plan to make more revisions, if I decide to create a custom build to share this with the community, where do I put the SQL to create the necessary tables and stored procedures?
File Attachment(s):
GalleryServer_Zazzle_Admin_Settings.png (886kb) downloaded 10 time(s).
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.