Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 19   Go Down

Author Topic: [cpg1.4.x]: Shopping cart (new version)  (Read 331675 times)

0 Members and 1 Guest are viewing this topic.

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #120 on: April 10, 2009, 05:47:42 pm »

My bad...  :-X

I read it very quickly searching for "category", I didn't find the word and I wrongly assumed that it was not possible.

Thanks,
Logged
Read Docs and Search the Forum before posting. - Soporte en espaņol
--*--
Fabricio Ferrero's Website

Catching up! :)

Graham66

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #121 on: April 15, 2009, 01:56:08 am »

I have recently created a Coppermine site and have installed the Photo_Shop shopping cart plug-in.  I am not a PHP programmer and had no experience of it at all until I started on my site a couple of weeks ago, but so far, generally so good, and thank you so much for the work which has gone into these products.

Two questions, if I may please:

1.  I have the shopping cart enabled on one gallery only, and this is how I want to keep it.  If I create a new gallery, or (more importantly) another user creates a User Gallery, it is created with the shopping cart enabled, which is not what I want at all.  Is it possible to modify anything such that the default for a new gallery is that the shopping cart is inactive unless and until expressly enabled by the administrator, even if it is active on other galleries?

2.  I am afraid the apostrophe raises its ugly head again!  I have seen that it used to be an issue with the main Coppermine configuration that odd characters would be generated when the site title and certain other words contained an apostrophe, but that this was fixed.  My site is called "Graham's photography galleries".  The problem is that when emails are created as a result of a user confirming an order, the "from" field of the confirmatory email appears as "Graham's photography galleries".

The problem seems to arise from one of the Photo_Shop PHP files, since the confirmatory email which is sent if a new user creates an account correctly shows as "Graham's photography galleries".  I assume this is something which would need to be corrected in photo_shop_checkout.php.  I have read the old threads about how this was corected for the main programme and have tried copying in the HTML_SUBST code which was used previoulsy, but unfortunately this is not working and I am not suffieintly skilled in PHP to know what to try next.  Any guidance as to how to fix this, which I suspect is something fairly simple for those who know how, would be much appreciated.

Thank you for any help you can give on these.  My site is at www.a1rat.com/coppermine, and there is a dummy user account test/test.
The shopping cart is enabled only in the Chichen Itza gallery (this is only as a test to get things working properly - I am not actually selling anything yet!).

Graham
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #122 on: April 15, 2009, 11:09:45 am »

With a small change (unfortunately it'll need another query) it's possible to change to function of the 'per album settings' in the shops config.
By default the system looks up if there's an entry in the db for a certain album. If not, it shows the album. If there is an entry, it may mean that the album should not be displayed or that this album should show different prices.
We just invert the meaning of the checkbox 'Shop enabled for this album'. If the checkbox is checked, then the shop is disabled for that album.


To do that find in codebase.php
Code: [Select]
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_SHOP_PRICES']} WHERE aid={$pic_data['aid']}");

    while ($temp_data = mysql_fetch_array($results)) {
if($temp_data['gid']=='-1') return $pic_data;
$SHOP_CONFIG[$temp_data['gid']]['price']=$temp_data['price'];
}
mysql_free_result($results);

and replace with

Code: [Select]
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_SHOP_PRICES']} WHERE aid={$pic_data['aid']} AND gid=-1");

$temp_data = mysql_fetch_array($results);
if(!$temp_data['gid']=='-1') return $pic_data;
else
{
$results = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_SHOP_PRICES']} WHERE aid={$pic_data['aid']}");
    while ($temp_data = mysql_fetch_array($results)) {
$SHOP_CONFIG[$temp_data['gid']]['price']=$temp_data['price'];
}
}

mysql_free_result($results);

For your second question.... make sure the lang file is saved as utf-8

Graham66

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #123 on: April 16, 2009, 11:37:51 pm »

Thank you for your prompt reply.

The reversal of the meaning of the checkbox works perfectly.  To tie in with this, I altered 'shop_enabled' in line 95 of english.php to read "=> 'Shop disabled for this album',", so that the text against the checkbox reflects the checked or unchecked status.

In relation to the apostrophe problem, however, I have checked the file format, and this is apparently not the source of the problem.  In fact, I did not expect it to be, although I did re-save the lang file, to check.  The problem occurred right from the very first test I did of the cart, before I had altered any of the files in the plug-in, and therefore before I had had the opportunity to change the encoding (assuming that the files in the distribution package were encoded in this way).  Do you have any other suggestions, please?

Thank you for your help

Graham
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #124 on: April 17, 2009, 12:04:20 pm »

Yep, working while registering but not for eg. ecards

to fix that find in photo_shop_checkout.php
Code: [Select]
if(cpg_mail($user_info['user_email'], $subject, $mail_body, 'text/plain', $CONFIG['gallery_name'], $CONFIG['gallery_admin_email'] )) {
and replace with
Code: [Select]
if(cpg_mail($user_info['user_email'], $subject, $mail_body)) {

Please report back if it works and if you recognize any drawbacks.

Graham66

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #125 on: April 17, 2009, 02:54:48 pm »

Thank you for the fix.  I have made the change, and this broadly works.  Certainly for my gallery name with an apostrophe, it is fine.  I have, however, found one instance in which is does not work.  As an experiment, I created a new user with a name which contains an apostrophe (the name I used was "test's control", but I am sure this does not matter), and then had this user send an ecard.  The outcome was that the email subject appeared correctly as "An e-card from test's control for you", but the email sender showed as "test's control".  The text within the body of the email was fine, however.

This is clearly a far less important issue than previously - how many users would ever register with an apostrophe in their user name and then send an ecard, I wonder? - but I wanted this to work.  I seem to have solved the issue by including, after the exisiting line 32 of mailer.inc.php, the line:

$sender_name = strtr($sender_name, array_flip($HTML_SUBST));

In the limited time I have had to try this out, it seems to work, at least for ecards.  Hopefully it will not have any adverse knock on effects, but if I discover any, I will let you know.

Many thanks for your help in sorting this out.

Graham

Logged

feline

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 3
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #126 on: April 21, 2009, 01:03:17 am »

Stramm, the widow of an WWII ex-prisoner of war in Germany is back. 
Making an item cost 0.00 does not work for me.  What can I do to have a unique price list for each album?
Ruth

http://arthursphoto.com/coppermine/cpg1.4.21/cpg14x/index.php
Logged

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #127 on: April 21, 2009, 03:11:32 am »

Hey Stramm,

Got a strange one.

Brand new install over the weekend.

Running:
Coppermine Photo Gallery 1.4.21 (stable)
Same version of your Mod Pack
Plug-ins:
Name Final_Extract2 v1.0     
Name Keywords_add v1.1   
Name Copy /Paste BB Code image url v1.2   
Name Photo Shop v1.4.0 

For reference, another thread I had open that is now solved, but insight into my troubleshooting so far:

http://forum.coppermine-gallery.net/index.php/topic,59102.0.html

While I've got this exact same set-up running correctly elsewhere, at this new gallery, now that I've got no more full-size images popping up incorrectly like this (just two copies of a scrap test file with diff file names):

http://www.pupandhorse.com/dog-pictures/displayimage.php?pos=-2

instead, they are displaying like this:

http://www.pupandhorse.com/dog-pictures/displayimage.php?pos=-4

Unlike the other correct install, your shop plug-in no longer "knows" how big the upload was and is only offering the smallest file size for purchase (see link just above).

I'm trying to get the link above to display just like it is now without a javascript call to a fullsize image, but, with the cart offering purchase of files up to the full size (as in the first link drop down choices). Make sense?

Thank you for your great contributions and help!
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #128 on: April 21, 2009, 01:26:32 pm »

I can't open your site so I'm just guessing...
 -permissions (check the orig_ and the fullsized image, check if the orig_ has been created, If php can't read the orig, it'll use the fullsized image to determine the dimensions; if that's resized to a smaller size [and if this size is approx your smallest offer in the shop, you'll have the solution]) --> change file/ folder permission [coppermine config and/ or FTP] --> you also may try to http upload an image and try if that works

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #129 on: April 21, 2009, 05:32:14 pm »

Thanks for the speedy reply Stramm.

Orig file is there - but - it got re-sized...

Ah... digging further. My bad! Here is what happened (don't let this happen to you!) ;)

While testing I put the file up there again without the permission change to the actual file (via FTP/batch). Saw it was still not doing what I wanted it to do (per my other thread). Changed the permission by hand on the file. Ran the Admin tool. Changed "everything" on the re-size. Voila, re-sized original - not what I wanted.

Just uploaded via FTP/batch. Changed permission on the actual file. Added it via batch. All is good in the world. My thanks to you again Stramm.

If you PM me your IP I'll double check the firewall is not blocking it for some odd reason just in case you'd like to take a look.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #130 on: April 21, 2009, 07:09:11 pm »

k, I'm glad you find the solution for your problem.

And it seems that this is a region based block (as another supporter based in Europe wasn't able to view your site, too).

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #131 on: April 21, 2009, 09:12:06 pm »

Re: Block - was the other supporter not in South America? Should you wish to PM me the IP I'll be sure you can get in. Our server's security has tightened of late.

Again, my thanks for your help and the many contributions (mod, plug-ins, etc.)
Logged

feline

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 3
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #132 on: April 21, 2009, 11:50:35 pm »

When I discovered the reason that putting o.oo in the shop configeration did not work for me I felt silly.  The table that appears BELOW on the screen after a save of the shop config is the place to remove prices with a 0.00.  Then I can select album, delete prices on items not wanted (0.00) and update album.  Works great! 
Ruth
Logged

feline

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 3
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #133 on: April 22, 2009, 08:21:18 pm »

An item is added to the shopping basket.  Then the box "1 image in cart" is clicked.  The new screen shows a minipic and item details.  Can the 'pricelist' under these details be preventeds from showing?  All album prices show on the pricelist and I do not want all pricing to show.   Thanks.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #134 on: April 23, 2009, 07:58:03 am »

in photo_shop_cart.php find
Code: [Select]
photoshop_pricelist();and comment it out
Code: [Select]
//photoshop_pricelist();

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: A Tip For [cpg1.4.x]: Shopping cart (new version)
« Reply #135 on: April 28, 2009, 03:11:19 am »

I thought I'd share a tip I'm using. I've noticed some customers were confused about the need to click the paypal button to complete the checkout so I modified the language file and took the opportunity to tweak a couple of other messages at the same time. This is appropriate for my stock photo business, but may not be fully appropriate for all users. Please take or leave any of it.

It:

1) Encourages customers to click the paypal button to checkout with any major credit card and reminds them no paypal account required.
2) Tells them to look in their spam folder for the confirmation e-mail that is coming.
3) Reminds them that their purchase binds them to the terms of the site license.

In:

yoursite/pathtocpg/plugins/photo_shop/lang/english.php

Look around line 137 or so for this code:

Code: [Select]
'email_sent' => 'Thanks for your order.<br> We have sent you a confirmation email! <br>Your order will be processed after payment! <br>',
And consider making the changes here:

Code: [Select]
'email_sent' => 'Thank you for your order - it is almost complete!<p> We are sending you a confirmation email - check your SPAM folder! <p>Your order will be processed automatically after your payment.<p><font color="red"><i>IMPORTANT</i></font> - YOU MUST CLICK THE PAYPAL BUTTON NOW TO COMPLETE THE ORDER WITH ANY MAJOR CREDIT CARD - NO PAYPAL ACCOUNT NEEDED. <p><font color="red"><i>NOTICE</i></font>:Your purchase indicates your agreement to be bound by our <a href="http://www.YOURSITE.com/pathto/YOURTERMS.html" title="license - click to read" target="_blank"><font color="blue">license terms</font></a>. (a new window will open)<br>',
Logged

JackDeth

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #136 on: May 09, 2009, 05:40:08 am »

First of all, thanks Stramm. Great plugin! I found it just when I needed it for a photographer friend.

Everything, so far, appears to work pretty well. However, I've run into what appears to me to be a bug, but if not maybe you can explain.

When a user adds several pictures to the shopping cart, then click the button to view cart, you see the list of pictures. In the fourth column you have an "Amount" listed with a box and a 1 there.

I assume when you say "Amount" you really mean Qty (quantity)??

If this is the case, the user tries to change the quantity to order more than one picture (they will be sent prints) and then clicks "Save New Amounts", but nothing changes and it reverts back to a 1 again.

How do we get around this since he wants to sell multiple prints? Thanks in advance!


TRS
Logged

genesisncc

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: [cpg1.4.x]: Shopping Cart Worldpay Integration
« Reply #137 on: May 12, 2009, 02:38:46 pm »

Hello

I have recently setup a WorldPay Merchant account with the Royal Bank of Scotland

I am currently running the coppermine gallery on our site http://www.genesisphotographers.org.uk/gallery

I would like to add the functionality of WorldPay as this would be a big help to me. WorldPay have told me its quite simple just need the total amounts to be added to a HTML redirect script file from the final checkout page.

Does anyone know a way of integrating WorldPay?

These are the details i have from them:

---

Dear Mr McDonough,
 
I am pleased to inform you that your application is now at the final stage. Once you are ready to start trading, please make sure you have completed the following steps:
1. You have completed the technical integration of your website with our Payment Service and have made a test purchase/order to check that your integration is working correctly
2. Your integration is set to work in test mode (your store is set to 'test' or your testMode parameter equals '100', e.g. <input type=hidden name="testMode" value="100">)
3. Your website fully complies with our website rules (we will not be able to activate your installation until your website is fully compliant). Our website rules can be found on our support website at http://www.worldpay.com/support/content.php?page=startup&sub=website
** Please note you should not submit your activation request until you have completed steps 1-3 above. Failure to do so will result in a delay in activating your installation to take payments **
4. You have submitted an activation request. To submit your activation request, you will need to log in to the Merchant Administration Interface (MAI) and follow the instructions outlined in our Test and Go Live guide http://www.worldpay.com/support/kb/mergedProjects/testandgolive/tgl5201.html
Within two working days of receiving your activation request we will place a test purchase/order on your website using the instructions you provide in the MAI and check that your website meets our requirements (if we encounter any issues during our testing we will contact you by email).
After successfully testing your website, we will activate your installation and send confirmation to you by email (please follow the instructions outlined in this email to start accepting live payments on your website).
If you have any queries or require further information about connecting your website to our Payment Service, please refer to our support website http://www.worldpay.com/support/content.php?page=technical
Best regards,
XXXX [Edit GauGau 2009-05-23 17:28 h UTC+2] Removed name as per request [/Edit]
Customer Services Administration

---

Many Thanks

Graham McDonough
« Last Edit: May 23, 2009, 05:29:02 pm by Joachim Müller »
Logged

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: [cpg1.4.x]: Shopping cart (new version)
« Reply #138 on: May 13, 2009, 11:33:12 am »

Hallo to all readers, big up to Stramm for this excelent plug-in.

I am using this shop on my website, a small photostock selling images, with good resoults.
I just thought it would be great to have a link in the e-mail sent to the clients if they want to pay with pay-pal.
Is it possible to include in the e-mail the link to pay-pal?

I dont understand coding enoughf but maby it could be an easy and usefull mod.
If someone can give me a hint it would be greatly appreciated.

Logged
Live long and prosper!
www.tripodart.net

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: [cpg1.4.x]: Shopping Cart Worldpay Integration
« Reply #139 on: May 14, 2009, 12:06:16 pm »

Hello

I have recently setup a WorldPay Merchant account with the Royal Bank of Scotland

I am currently running the coppermine gallery on our site http://www.genesisphotographers.org.uk/gallery

I would like to add the functionality of WorldPay as this would be a big help to me. WorldPay have told me its quite simple just need the total amounts to be added to a HTML redirect script file from the final checkout page.

Does anyone know a way of integrating WorldPay?

Pretty easy.... edit photo_shop_checkout.php

before
Code: [Select]
//pay by wireadd
Code: [Select]
if ($CONFIG['photo_shop_cc_enable'] && $order_price > 0) {
$msg_box_txt .= <<<EOT


EOT;
}

Between the EOTs write the html necessary for your billing system. Have a llok at the paypal and google versions. These should teach you what to do.
Finally enable Credit Card payment in the shop config.
Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 19   Go Up
 

Page created in 0.07 seconds with 20 queries.