Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 2 3 [4] 5 6 7 8 ... 20   Go Down

Author Topic: add a Paypal shopping basket to your gallery.  (Read 314889 times)

0 Members and 2 Guests are viewing this topic.

jayos

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
    • Jaypix
Re: add a Paypal shopping basket to your gallery.
« Reply #60 on: August 31, 2004, 07:12:04 pm »

Hi Casper

I want some albums with photos for sale and some just showing photos, pricing will be different for different albums and categories and using the smf theme

I have managed to get the hack working but when I view basket it takes me to your paypal checkout ???? and I did remember to change the email address in theme.php

link
http://www.jaypix.co.uk/gallery/displayimage.php?album=9&pos=0

username     test
pass     test
« Last Edit: August 31, 2004, 07:32:30 pm by jayos »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #61 on: August 31, 2004, 07:53:51 pm »

First, this should show your own paypal account if all the steps have been followed.

But I am going to update this hack tomorrow, if you can wait.  It will then use the same method as the current simple hack, but with instructions how to set up the albums/cats with different or no prices etc.

I will help you get this set up easily.

Please PM me with how many different size/frame options you want to give in total, and how many setup variations you need.  I will then work it out for you.

Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Detonate

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: add a Paypal shopping basket to your gallery.
« Reply #62 on: September 01, 2004, 03:06:09 am »

The way I've been doing it, is files with Titles are available for purchase, while files without titles are not.

Example Gallery with Titles:
http://www.redreefusa.com/thumbnails.php?album=5

Then I made a [ paypal ] type UBB code to insert Buy now buttons in Gallery descriptions so that my users can buy entire albums on CD.  Example:
http://www.redreefusa.com/index.php?cat=6

The actual album description looks like this:
Code: [Select]
[paypal]Open Water Date 2004.07.04[/paypal]CD includes all pictures in this album in full resolution, and any additional photos taken that are not displayed. and the bb_decode function does the string replaces.


I haven't quite figured out a good way to change prices on individual items, or for different catagories yet.  But that need hasn't come up for me yet.
Logged

wprowe

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
    • Music, Travel, Outdoor, Nature and Wildlife Photography
Re: add a Paypal shopping basket to your gallery.
« Reply #63 on: September 01, 2004, 07:56:54 pm »

Currently, the update script has a fixed maximum number of sizes and prices that is creates entries for in the config database (which of course can be changed manually). It would be nice if all of this size information were dynamically configurable from the config screen. For example, the config screen could ask whether you want to support a PayPal shopping cart, and if so what is the PayPal account name (e-mail address) and how many sizes you want to make available. I would like the gallery admin e-mail address to be a different variable than the paypal account e-mail address.

Upon saving the configuration, the revised config screen would now show the additional fields for paypal account name and each of the size descriptions and their prices. The configuration save process should also make any necessary revisions to the config table in the database to insure enough variables are defined for the number of sizes the administrator indicated. Assuming all of the size description and price variable names have a distinct, matchable pattern (i.e. "shopsize_"), you could make your parsing of the config table find them and create the proper associated array indexes in global config associative array and then populate their values. The revised theme.php could scan the indexes of the associative config array looking for these indexes and dynamically create the drop down menus for the appropriate number of sizes.

I realize this is much more enhanced than is there today, and that your code is free and done on your own time. These are just enhancement suggestions that would make managing the whole setup of the shopping cart feature easier. I don't know too well how all of the coppermine pieces fit together, so my implementation details are based on limited familiarity with how coppermine works.

This is a great enhancement for my photography business and I very much appreciate your work on this feature.
Logged
Walter Rowe
Music, Travel, Outdoor, Nature and Wildlife Photography

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #64 on: September 01, 2004, 11:21:24 pm »

This hack is easily changed to suit most peoples wishes, but there are just too many variables, and I am not a good enough coder, to make this fit all requests without some work by the end user.

Changing the paypal email to be a different one from the gallery admin email makes sense, and is easy enough, so I will add this in the near future.

Adding more fields to the database is an easy enough task, and most users will find the 6 fields enough.  This makes the work required to make this all done in config not worth the effort, IMHO.

There has been some small talk about making this a core part of the code, but as paypal is just one of several payment methods, and most users do not want this for their install, I do not believe this would be for the good of coppermine.  And if it does go in, it will need a better coder than me.  I believe that having it as an easy add on, is the best way to go.

That is not to say there can be many more improvements.

I have today been working on having the size selection as a dropdown box as well, and have got it to work.  You will then just have one line under the pic for selection of all options, including size.  There are some drawbacks to this though.  The current method makes the basket clear and easy to understand.  But this change uses javascript to achieve the result, and the basket is a little more messy, although still works.  You can see this on my demo  by selecting the classic theme.  See the difference by adding something to he basket in this theme, then change themes to one of the others (except reynolds 2 or 3), and adding the same pic again.

I believe the set up of the basic shopping basket hack is now very easy to implement, and I am rewriting the complex one to use the download as well, making that much easier.  Also the javascript selection mentioned above, will make it easier easier to do the complex shop, with different categories selling at different options or prices.
I am also writing instructions for how to add this to other themes.  But as you mentioned, I do this in my spare time, and the last few weeks there has not been much of that  ;D
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

wprowe

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
    • Music, Travel, Outdoor, Nature and Wildlife Photography
Re: add a Paypal shopping basket to your gallery.
« Reply #65 on: September 03, 2004, 04:13:13 pm »

Casper - the dropdown menu on the demo looks great and is exactly what I was thinking. Thanks for that! Great work!

While I agree that coppermine should not have a paypal specific shopping cart system, it would be great to have a generic shopping cart feature. My vision for it would be to work similar to themes. In themes, each theme is required to define the same specific variables and functions. A shopping cart system could work very much the same way. Then the appropriate places within the core of coppermine or the themes code would call these functions or reference these variables.

Also like themes, a cart system could place files under different subdirectories of a common "cart" directory. Within each payment system's subdirectory, the file(s) would have the same name (i.e. cart.php). For example, there might be

  • cart/paypal/cart.php
  • cart/epayment/cart.php
  • cart/netcheque/cart.php
  • cart/worldpay/cart.php

Each of these cart.php files would define the same variables and functions - perhaps "cart_add", "cart_view" and "cart_checkout". They might also have to define some javascript like you write for paypal to properly handle the dropdown menu selections for sizes and paper types. I would want to think about this more to determine if that was necessary.

An option in the config menu would determine whether the cart feature is enabled or disabled, and a drop-down selection in the config menu would define which payment system's implementation is called. By working in a similar manner to themes, it would be easy for people to add support for many payment systems, all of which would be pulled into future releases of coppermine. It makes it an extensible cart system.

All this is just thinking out loud ... what do you think? I might be willing to contribute to this effort.

Thanks again for the hack you have provided. Its great and much appreciated!
Logged
Walter Rowe
Music, Travel, Outdoor, Nature and Wildlife Photography

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #66 on: September 03, 2004, 05:44:15 pm »

An option in the config menu would determine whether the cart feature is enabled or disabled, and a drop-down selection in the config menu would define which payment system's implementation is called. By working in a similar manner to themes, it would be easy for people to add support for many payment systems, all of which would be pulled into future releases of coppermine. It makes it an extensible cart system.

Version 1.4 is coming with a plug-in manager, activated in config, and your idea would fit well with that, making each cart system a plug-in.  Sounds interesting, doesn't it.

I am really struggling for time this next few days, but will be spending a few days getting this back up to speed from Monday, when I will put up the files for the dropdown menu.  Paypal normally has a maximum of 10 options on any 1 list, so I will work to allow users to have 10 size/price options.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

wprowe

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
    • Music, Travel, Outdoor, Nature and Wildlife Photography
Re: add a Paypal shopping basket to your gallery.
« Reply #67 on: September 03, 2004, 06:21:34 pm »

Thanks for the prompt reply. I just realized that the system might also need a "cart_config" that would work inside the confines of the coppermine config menu and would have fields specific to that particular payment system (like e-mail address for paypal). The 1.4 release plug-in manager sounds great.
Logged
Walter Rowe
Music, Travel, Outdoor, Nature and Wildlife Photography

wprowe

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
    • Music, Travel, Outdoor, Nature and Wildlife Photography
Re: add a Paypal shopping basket to your gallery.
« Reply #68 on: September 08, 2004, 08:25:22 pm »

Casper,

Here is an article I found on integrating PayPal via PHP. Don't know if this is helpful, but it might be.

http://www.devarticles.com/c/a/PHP/Quick_ECommerce_with_PHP_and_PayPal

Logged
Walter Rowe
Music, Travel, Outdoor, Nature and Wildlife Photography

big nose

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Martin Croft
Re: add a Paypal shopping basket to your gallery.
« Reply #69 on: September 10, 2004, 05:06:38 pm »

Hi Casper

Ive got your mod running on my freelance web site, being able to take orders on wedding photos is great. This would allow me to show off some of my special pics that I dont really want to sell or cant sell as they are from commisions.

what would be great is if I could exclude a gallery from the shop... is this possible

or could I run two gallerys within one site.... sounds messy

any ideas

regards

martin
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #70 on: September 10, 2004, 07:09:52 pm »

Hi big nose,

yes, just do the following,

make a copy of your shop theme, but with the original unedited theme.php.  It is best if this has the original name, i.e 'hardwired', and the shop theme is also obvious, say 'hardwiredshop'.

Now create the albums you want to display without the shop additions, and make a note of the alum ID numbers.

Open your include/init.inc.php file, and find the following code;

Code: [Select]
if (!file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'classic';
require "themes/{$CONFIG['theme']}/theme.php";
$THEME_DIR = "themes/{$CONFIG['theme']}/";

Now change the above code to this (amending as required);

Code: [Select]
if ($_GET["album"] == '4'  || $_GET["album"] == '9') {
  $theme='hardwired';
       require "themes/hardwired/theme.php";
       $THEME_DIR = "themes/hardwired/";
} else {

if (!file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'classic';
require "themes/{$CONFIG['theme']}/theme.php";
$THEME_DIR = "themes/{$CONFIG['theme']}/";
 }

In this example, albums 4 and 9 will display in the original hardwired theme, all others in the gallery default.  You can have as many albums you want in ths query.

Now just go into config, and set the gallery default theme to 'hardwiredshop'.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #71 on: September 12, 2004, 03:57:08 pm »

I have completely updated this mod, to add a dropdown selection for the price size options, which allows up to 20 such options to be set.  

The files are available from the demo, and I have kept the old mod files available there as well, for those who prefer the look of that.

The instructions for allowing different albums to show different price options, are also attached here, and on the first post of this thread.

I have emailed these new files to gaugau, but it may be a few days before they are available from the downloads section here.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Jonj1611

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: add a Paypal shopping basket to your gallery.
« Reply #72 on: September 14, 2004, 12:16:50 am »

Hi, I have installed the shop mod and it all seems to be working, do you know if there is a facility so I can charge say £0.99 per photo download and then it takes the customer to a page for download? I need it so they can obviouslly only download the picture they have paid for, anyone know a way of doing this, thanks!
Logged

Jonj1611

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: add a Paypal shopping basket to your gallery.
« Reply #73 on: September 14, 2004, 12:35:56 am »

Hi, well I thought I installed it correctly, obviouslly not, nothing is showing in config. I know it says do an update, but how do you do that? I can't see anywhere to do an update, please help. Thanks.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #74 on: September 14, 2004, 12:40:05 am »

To run an update, simply browse to www.yoursiteaddress.com/yourgalleryfolder/update.php

Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Jonj1611

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: add a Paypal shopping basket to your gallery.
« Reply #75 on: September 14, 2004, 01:14:45 am »

Hi Casper, thanks for the reply, I ran the update and it said it had been upgraded but nothing has changed? I couldn't find any documentation with the 'classic download' so I don't even know if I have done it correctly, I uploaded the three files from the classic folder into the themes/classic folder, was that the correct place to put them? Thanks for any help.
Logged

Richy.nl

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
    • Richy.nl - Professional Photography
Re: add a Paypal shopping basket to your gallery.
« Reply #76 on: September 14, 2004, 02:27:46 am »

Hey Folks!

I've done everything to start also a paypall shop with this great hack!

But I can't see the buttons to order the diffent sizes / glossy / etc.

How about to develop the hack in a 'online download shop'?

My website to check my store: www.richy.nl/shop/

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #77 on: September 14, 2004, 12:20:26 pm »

Hi richy,

it looks to me as though you have not added the image description, as is required for this hack to work. 
If you want to send me an admin account login, by pm, I will look into it for you.

Off topic.  Your thumbs look terrible, as though you created them at a small size, then changed the settings.  You would be better off with smaller thumbs, or use the admin tools to re-build the thumbs to the new size.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Jonj1611

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: add a Paypal shopping basket to your gallery.
« Reply #78 on: September 14, 2004, 04:23:42 pm »

Hi Casper, Um, any chance you could help me with my problem, I guess you just missed it as I posted two seperate questions, anyway it went like this :-

Hi Casper, thanks for the reply, I ran the update and it said it had been upgraded but nothing has changed? I couldn't find any documentation with the 'classic download' so I don't even know if I have done it correctly, I uploaded the three files from the classic folder into the themes/classic folder, was that the correct place to put them? Thanks for any help.

Thanks.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: add a Paypal shopping basket to your gallery.
« Reply #79 on: September 14, 2004, 04:29:12 pm »

Please pm me an admin login to your gallery.

Did you replace all the other files required for the mod, the english lang file, the sql files in the sql folder, the upload, editpics, editonepic and displayimage files.
Did you follow all the instructions contained in the index.html file contained in the docs folder of the hack download?

As for the question about allowing download after payment, I don't know how to do that.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: 1 2 3 [4] 5 6 7 8 ... 20   Go Up
 

Page created in 0.028 seconds with 20 queries.