[ 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[ 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 LinkYou 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.