4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: IcEcReaM on March 21, 2006, 10:36:38 PM
-
[ Introduction ]
With this mod you are able, to set for each image a different price,
and when set, on the details site, there will be an small link to the paypal site.
[ Features ]
- Price can be set individually for each image different
- if no price is set, no link will be shown
Demo can be seen here: Demo Link (http://icecreamtest.ic.funpic.de/gallery/details.php?image_id=130)
[ Changed Files ]
lang/<your language>/main.php
details.php
includes/db_field_definitions.php
templates/details.html
[ New Files ]
templates/details_paypal.html
templatesdetails_paypal_cart.html
[ Installation ]
Download the rar archive.
unpack the files.
follow the installation note.
Download here: Download Link (http://icecreamtest.ic.funpic.de/gallery/details.php?image_id=131)
You can register your own account (no email verification is needed)
or login in with 4images/4images.
Step 1:
Open includes/db_field_definitions.php
add before ?>
$additional_image_fields['price'] = array($lang['image_price'], "text", 0);
Step 2:
open templates/details.html
search for
<br />{lightbox_button} {postcard_button} {download_button} {download_zip_button}
</div>
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
and add below
{if price} {details_paypal} {endif price}
you can place this code everywhere you want in the details.html,
where the link should be displayed.
Step 3:
open details.php
search for:
"prev_image_file" => $prev_image_file,
"prev_thumb_file" => $prev_thumb_file
));
unset($next_prev_cache);
add below:
//-----------------------------------------------------
//--- Shop Mod Lite -----------------------------------
//-----------------------------------------------------
if (isset($image_row['price'])) {
$site_template->register_vars(array(
"email_business" => "mymail@here.com", // enter your email adress/paypal account here
"buyer_email" => ($user_info['user_email']) ? $user_info['user_email'] : '',
"url_paypal" => "www.paypal.com", // enter www.sandbox.paypal.com to test the sandbox function
));
$details_paypal = $site_template->parse_template("details_paypal");
$details_paypal .= $site_template->parse_template("details_paypal_cart");
$site_template->register_vars("details_paypal",$details_paypal);
}
Step 4:
execute the installer.
and place all templates from the rar archive to your templates folder.
[ Notes ]
You have to edit from step 3 this line:
"email_business" => "mymail@here.com", // enter your email adress/paypal account here
don't forget to set your email adress here.
If you want, that an other image should be displayed, just edit the template files.
In the template files (details_paypal.html/details_paypal_cart.html) edit the following lines:
<input type="hidden" name="shipping" value="1.00">
<input type="hidden" name="shipping2" value="0.50">
<input type="hidden" name="handling" value="2.00">
here you can set additional costs for shipping and/or handling.
All values must be entered in following format with a dot "." as seperator for prices.
The price can be set in control panel by editing the images.
done.
Have Phun.
This is not really a shop mod, it's just to play around with it.
-
Nice, this is exactly what I did Sunday night. I was going to post it sometime this week when I got time but you have beat me to it.
-
Oh and one thing, your download link does not work.
-
the download link works, but the site is sometimes a little bit slow or down,
then you have wait some minutes.
-
that link takes me to microsoft
-
fixed
-
ok i got to the mods page, but now there is no where to click for the actual download
-
the download link takes you directly to the mod site & download.
If neccessary you must only login with your own account or the account login is described above.
-
ah sorry i missed that part, thanks
-
Ok, so I tried installing yours on a old gallery site and it did not work. It told me some bad sql query run line crap. Any ideas? It seems like not very much code you know?
-
Installed this mod with 1.7.2. I had to make some changes to get it to work. In the .php file, the new column added was named "price2" instead of "price". Also default value of 0.00 should be added. Fixed by installing as normal, and then using phpmyadmin. Changed the column name of price2 to price. Added default value = 0.00 by editing the structure of column from structure tab. Updated all price values with query: update `4images_images` set `price`=0.00 WHERE `image_active`=1. It might have been eaiser to update the query to alter table in the .php file.
This is probably not hard, but does anyone know how to return the user_email variable (like it was used in members.php) onto the details.php? I want to use {user_email} on the details template page as the paypal payment email. Please give the codes needed to be changed. Thanks.
-
UP23 -
I see what you are saying. I think for this to maybe 'take off' with more people that you should go into detail with code exacmples for him to edit the first message on this board so people do not have to go hunting for the fixes and what not.
-
Installed this mod with 1.7.2. I had to make some changes to get it to work. In the .php file, the new column added was named "price2" instead of "price". Also default value of 0.00 should be added. Fixed by installing as normal, and then using phpmyadmin. Changed the column name of price2 to price. Added default value = 0.00 by editing the structure of column from structure tab. Updated all price values with query: update `4images_images` set `price`=0.00 WHERE `image_active`=1. It might have been eaiser to update the query to alter table in the .php file.
Sorry, my fault, i updated the installer,
now the created column is price instead of price2.
And default value shouldn't be set, cause if you set per phpmyadmin an default price,
this paypal button does appear on every image, which should only appear if an price is set.
This is probably not hard, but does anyone know how to return the user_email variable (like it was used in members.php) onto the details.php? I want to use {user_email} on the details template page as the paypal payment email. Please give the codes needed to be changed. Thanks.
what do you mean?
You mean the email from the user who want to buy the image?
if yes, the users email is already been parsed (if set) in the {buyer_emall} tag
@sau4scr:
I thought you already have coded your own?
You spaming this thread with a lot of unnecessary posts & comments.
-
I'm not spamming. Yes I do already have my own, its a little different from yours though because I have a base value set instead of a value from a database. I am more trying to help this post out for the use of others.
www.photographybyweston.com/gallery and you can see mine. It is a little more messy you could say though. I am not the greatest at PHP, I am really good with Coldfusion.
-
ok, that getting to offtopic.
the reason why i said, you were spamming,
that mainly all of your posts above,
could be answered themself, if you had read my first post correctly.
cause everything where and how to download was described there.
and also to say, "it doesn't work for me" is not very helpful,
if you were not more specifc what kind of error messages you get,
or what exactly doesn't work.
-
Ok, so I applied this to my site simply because I like the ability to give an image a different price.
Here is my one question,
{if price} {details_paypal} {endif price}
I want to make another line of that if no price then show this. So I did this...
{if no price} {details_paypal} {endif no price}
And it did not work, how do I do that so if there is no price then they can download the image?
-
it depends of which 4images version you use.
if you use 1.71 and have installed the ifno mod which posted from vano,
you should use {ifno price} {details_paypal} {endifno price}
otherwise for 1.72
{ifnot price} {details_paypal} {endifnot price}
-
Thank you! Much appreciated!
-
what do you mean?
You mean the email from the user who want to buy the image?
if yes, the users email is already been parsed (if set) in the {buyer_emall} tag
Thanks for the fix icecream. I got the problem solved. I wanted to send the money to the uploader of the image, so I had to get the uploader's email. I added $owner_email = $image_row['user_email'];
to details.php after the first sql query: $image_row = $site_db->query_firstrow($sql);
and added "owner_email" => $owner_email,
under the "Print Out" section. I used {owner_email}
on the details.html template file.
-
ok, if you were more detailed in your first post,
then i could have give you a solution too.
i thought you mean the email adress of the user, who want to buy that picture.
-
Hi!
Is there a possibility to set more than one price??
Greetings
Nika-2000
-
Hi,
I implemented this nice MOD, but after the payment there is no recive to download for the bought Image. Is that right or did I anything wrong? If not, one witch way I can realised an automatic download for the bought Images?
Thanks in Advanced :roll:
-
no, you didn't something wrong.
this mod is for paying only,
there are no option for download after buying.
an automatic download option would require some more improvements for this mod,
which i will not do...cause this mod isn't a "full" shop mod.
-
panic, panic, panic
I tried to install your MOD and i'm getting the below DB error, mayby you can take a look before uninstal it
I did it exactly like you wrote and it gave me a notice that the db was update succesfully
If it not easy resolve the problem, can you tell me then how i can remove the I.price collum from the field list
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, i.price, c.cat_name, u.user_name, u.user_email FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_id = 165493 AND c.cat_id = i.cat_id
Unknown column 'i.price' in 'field list'
with regards
www.foto-janssen.nl (http://www.foto-janssen.nl)
-
try to run the installer again,
seems the required field price is missing.
-
okay, tried this now i get
DB Error: Bad SQL Query: ALTER TABLE `4images_images` ADD `price2` VARCHAR( 12 ) NOT NULL
Duplicate column name 'price2'
an Error occured
i'm using 1.7.1, mayby this will help
-
Dont worry...
change the database fild name from price2 to price.
And all must works fine!
Regards, Tom
-
could it be, that you already had installed an other mod,
who is using a field named price2?
i tested this mod with 1.71 (fresh install) and it worked.
-
I don't think that possible, i havn't uninstalled it because customers don't have to see the problem and i havn't got time to try it again, i will let you know
regards
edwin
-
Hi;
Nice mod ..
How can we make the price set by each user (who upload images) with image upload?
In other words, I have users who upload their photography, and i want them to be able to set price for each image they upload.
And to display a link to contact the user directly instead of the PayPal link.
This will make the users able to sell their images.
I've been thinking in this long time but no result ..
how can we do that?
Thanks
-
I know this might sound like a strange business model, but I would like to see if it is feasible to create a mod which will have a paypal donate (or buy) button when someone wants to see an e-card (electronic postcard).
They pay $0.50 or $1.00 to send the e-card.
To keep them from just downloading the image and emailing the image, we'd install the watermark MOD. However, the postcard'ed image would not be watermarked.
Is this possible? I noticed that icecream stated that this MOD is not a full shop solution. so even though a person pays, they do not get to instantly download the image. For the solution that I'm talking about, they would pay, and then get to send the e-card immediately.
I apologize if I've posted this message in an inappropriate place.
I've been trying to get to icecream's website to look at the code for this mod for 2 or 3 days now and it seems to be down. Perhaps you can attach the files in your original post.
-
Hi,
I'm getting this error after install--I'm using 1.7.3:
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, i.price, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id = 31 AND c.cat_id = i.cat_id ORDER BY image_name ASC, image_id ASC LIMIT 0, 9
Unknown column 'i.price' in 'field list'
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/cymaui01/public_html/boutique/includes/db_mysql.php on line 116
When I try and rerun the installer I get this error:
An unexpected error occured. Please try again later.
an Error occured
I'm all backed up--any comments before I uninstall?
Thanks
-
I too am getting the same error trying to use it on 1.7.3 Any help would be great. I am somewhat new to this so forgive my ignorance, but I tried to point my browser to the paypal_install.php file in my templates folder, this is how you run the installer, correct?
-
the installer never got repaired as mention previously in the thread
-
Are there any other Paypal mods that you know of?
Thanks for the reply!
-
you know you can stick paypal buttons in the description field but you need to use this:
http://www.4homepages.de/forum/index.php?topic=14433.msg77800#msg77800
from Mr. V@ano who is always a GREAT help, or the formatting will be terrible
The promise of merging 4images with paypal is an incredibly powerful idea--to bad it stops here--maybe the new google checkout would be more viable/doable—if there could be an inventory check the payment processor does all the heavy lifting, 4images would only be the structure and you could have a complete system less the science fiction stuff of the pay on download idea
-
Thank you so much for the help with this!!!!
-
To avoid the problem of the error
Unknown column 'i.price' in 'field list'
Use this version of paypal_install.php instead
<?php
define('ROOT_PATH', './');
include(ROOT_PATH.'config.php');
include(ROOT_PATH.'global.php');
$sql_data = array(
"ALTER TABLE `".IMAGES_TABLE."` ADD `price` VARCHAR( 12 ) NOT NULL",
);
foreach ($sql_data as $val){
if ($site_db->query($val)) {
$log[$val] = "Succesfully updated Database";
}
else {
$log[$val] = "<font color=\"red\">Error</font>";
$error = 1;
}
}
if (!$error) echo "Succesfully updated Database";
else echo "an Error occured";
?>
The only difference from the original file posted is this line:
"ALTER TABLE `".IMAGES_TABLE."` ADD `price` VARCHAR( 12 ) NOT NULL",
On the original this was 'price2'
-
Question: $log ... is happen ? See in foreach but no after ...
-
Hello @all
Where i have to put the code from details.php in, when i want to show the paypal button in user_login_form or somewhere els?
---
Hallo zusammen,
wo muss ich den Code aus der details.php reinsetzen, damit der PayPal Button auch im user_login_form oder sonstwo angezeigt wird.
Gruß
Ingo
-
I installed the mod, with no errors...
Now where do you go to set the price for each image? Thanks!
-- Edit! --
Found it! : )
Thanks!
-
Hi -
I have several different artists within the art gallery on my website. Is it possible that each member is able to have their own paypal account so that when a buyer clicks on their buy now button it will be paid to that individual? Is this possible?
Melissa
-
The download link for this MOD is broken.
Have tried over 3 days but consistently stating that the page is not available
Does anyone have the file or a location to link it from?
If someone has the file then I will happily supply hosting
-
You must register at the site, before you can download the files.
-
Had registered but when taking link and putting direct into browser I was just getting - page not found.
Have downloaded now from link on first page of this thread - not asked to login.
File downloaded direct from host - all good, cheers!
-
i installed everything as it was told, but when I set a price for a picture no paypal button appears.
i donno what the problem might be.
Please help! Thx a lot!
-
Thanks beavtiful mod.
-
:cry: :cry: :cry: :cry:not install 1.7.6 plz help
-
bei dem Paypal teil haut der da automatisch einen Button rein?? wenn ich das uploade und wie ist das mit dem download?
-
Thank you so much for a great Mod, but after installing visitors are able to view the full image without payment.
I'm wondering what's the difference after payment for an image?
I think this MOD is about allowing download for paid images?
Or is it for Print Orders Payment and it has nothing to do with Download or High Resolution?
-
cant we integrate a shopping cart system to this ?
-
How to make this MOD have this features:
1. Set price for each files (MOD had)
2. If no price set for files, it will available as defaults (Registered users can download without paid)
EDITED: After installing and using, i know that this MOD can do all requested above.
THANKS
-
Open <your lang>main.php
add this
$lang['image_price'] = "Price";
-
I'd like to change this MOD. Is it possible to display the image description only after a paypal payment has made?
-
I find the place in my page for this MOD. Many Thanks!
My Demo:
On Detail image "Info"
http://www.pulsarmedia.eu/r_space_exploration_wallpapers_14_planet_with_rings_wallpaper_2560x1600_83988.html