News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

add a Paypal shopping basket to your gallery.

Started by Casper, July 04, 2004, 07:02:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Casper

Hi Gaugau,

yes they are all zipped, but the mod files, complete with instructions and images, are 331kb, and each theme folder comes at between 117 and 126kb.

Will email them to you shortly.

For those interested in having different prices in different albums, I have set up the demo to show what can be done with a little bit of code changing.
There are now 3 categories, each with a different setup.  See it HERE
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

big nose

Hi Casper

All looks very good, Ive just setup a new gallary for some of my clients and this paypal mod is just what i have been looking out for...

I was wondering if there is a way to make sure that orders had a postage portion to them before people would pay, thus ensuring postage costs were catered for.

Is there also a way of putting a Bio on the front page of coppermine

keep up the good work... great piece of code

regards

martin

Casper

Hi Martin,

Quote from: big nose on July 27, 2004, 05:00:50 PM
I was wondering if there is a way to make sure that orders had a postage portion to them before people would pay, thus ensuring postage costs were catered for.

This is done in your Paypal account.  You log on, and go to your account, then set the postage costs in your profile.  You can also set up your basket page to look like it is part of your site here, along with any re-direct pages once your users checkout.


Quote from: big nose on July 27, 2004, 05:00:50 PM
Is there also a way of putting a Bio on the front page of coppermine

You can use the anycontent.php for this. 
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

big nose

Hi Casper

Ive tried running the update script on the latest 1.3.1 version I get the following error

SQL-query : 

ALTER TABLE `CPG_filetypes` DROP INDEX `EXTENSION` ,
ADD PRIMARY KEY ( `extension` )

MySQL said:


#1091 - Can't DROP 'EXTENSION'. Check that column/key exists

any ideas

regards

martin

Casper

Hi Martin,

that is part of the normal update, not for the shop, and should not cause a problem.

However, if you have already updated to 1.3.1, and only want to add the shop fields, use the attached file, which you will need to use to replace your existing update.sql., and then run update again.

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

big nose

Thanks for the reply

Ok Ive run the update and now Ive got another problem as whenever I try and use the save config button at the bottem of the config page it opens up the paypal shopping cart...

this only seems to happen after running the update

This the error after running the update

SQL-query : 

INSERT INTO CPG_config
VALUES (

'size1', '0'
)

MySQL said:


#1146 - Table 'photodb.CPG_config' doesn't exist

I havent generated any albums or other content before running the update

hope this helps

regards

martin

Casper

Did you do a full install of version 1.3.1 before doing the mod, and checkit was working?

When working correctly, and with all files installed, you update should create this query;
QuoteINSERT INTO yourprefix_config
VALUES (

Not this;
QuoteINSERT INTO CPG_config
VALUES (

Unless of course, your prefix is actually 'CPG'
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

There seems to be an issue, when you create a new install, then update to this mod, before you have set the gallery up, and created at least one album.

I can replicate Martins problem with the config directing to the paypal basket, instead of updating the db etc, but only on a brand new install, with no cats/albums created.

At the moment, I am unable to find the cause of this, so suggest creating a category and album, and uploading at least 1 pic, before applying the mod.
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

big nose

Thanks for that Casper was thinking I was going slowly mad....

I was getting to this thinking through testing on a standalone install on my laptop

I will now setup the mod as per your latest instructions, thanks again

Update...... just done that without loading an image and the issue with the buttons is still there, Would this be a problem with the new theme.php picking up the wrong button ID... accuse my ignorance

regards

martin

Casper

Well, this had me scratching my head so much, I got splinters.

But I found it.  It's in the theme.php of the reynolds theme.  When I cut and pasted the button form, I cocked up.

In your reynolds/theme.php, find;

</form>
</ul>
<!--  view basket button  -->
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value='{$CONFIG['gallery_admin_email']}'>
<input type="image" src="https://www.paypal.com/en_GB/i/btn/view_cart_02.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="display" value="1">


And move the '</form>' to it's correct place at the bottom of the button.

@ Martin, Please confirm this cures the problem for you.
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

big nose

Hi Casper

well caught,,, moving the form tag has sorted this out

However I now get this error for the rating graphics at the bottem of the page

Warning: Invalid argument supplied for foreach() in /usr/local/home/httpd/vhtdocs/selectred/martin/themes/reynolds/theme.php on line 1512

All the graphics are in the folder

regards

martin

Casper

Yes, that is a known problem, which is caused by the modified displayimage.php.  It only appears if there is no image description.

If you put the original displayimage.php file back in, the shop will still work fine, and this will not happen.
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

big nose

Kool thanks Casper....

All I need to do now is integrate this all into mambo ;-)

should be fun

once agin thanks for the help

regards

martin

catch22

Warning: Invalid argument supplied for foreach() in /home/pos/www/www/poscpg/themes/classic/theme.php on line 1579

I have installed 1.3.1 and it works fine as a standalone.

Once I add the shop update, I get the message above. I have looked at every post dealing with that known issue, and it seems it was solved for the out of box version above. But returns after shop setup. The "old" solutions do not much apply, as the code has been changed already in this version to reflect.

I have tried 1.3.1, 1.3.0 versions. The select print sizes are not showing up either. The had shown up on an earlier install (on install 215 already  ;))

The instructions say to install version 1.3.2 before shop upgrade, but it isn't here yet...? I am looking to pay to port the PayPal function to AuthorizeNet and have some people standing by to do just that.

Any help here would be appreciated.

catch22

Found some things on a search of "PayPal"....will try those.

Joachim Müller

apparently your posting refers to a mod. It would have helped if you posted a reply to the mod you are refering to instead of starting a new thread, or at least post a link to it.

GauGau

catch22

Problem of the Invalid Argument solved in

http://coppermine-gallery.com/forum/index.php?topic=7619.msg37025#msg37025

Simply replacing the original install versions' displayimage.php over the shop version.

Problem of print size selection not showing up is due to no image descriptions. This is solved more premanently in that topic above, I just don't have the stamina to follow through today.


Casper

If you use the latest version of the mod, there is no need to have descriptions for the prices etc to show.

Merging with the correct thread/board
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

catch22

Hello. I installed a clean version of 1.3.1, downloaded 8/10 from sourceforge. I then ran the shop-update routine, also just downloaded, and overwrote displayimage.php, avoiding the PHP error.

I still, however, must have a description to have the cart sizes/prices show.

http://scientificsound.com/copper

This is not a show stopper, but curious.


Casper

Can you please post screenshots of this, as I am unable to replicate.
The prices will not show if the pic has no title, but should not need a description, as shown on my screenshots attached.
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