[cpg1.4.x]: Shopping cart (new version) - Page 9 [cpg1.4.x]: Shopping cart (new version) - Page 9
 

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]

Main Menu

[cpg1.4.x]: Shopping cart (new version)

Started by Stramm, December 21, 2008, 11:43:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stramm

check the log if the test order went trough

camster

The IPN logs show an "INVALID" message, all transactions are identical to below. All the logs are when I was testing live, I dont see any logs for the sandbox tests. I've removed email addresses on this public example. I made sure currencys in P_S and paypal are matching. I've attached a screen shot of the user "My Orders" list showing the order as not payed.

[05/27/2009 11:53 AM] - SUCCESS!
IPN POST Vars from Paypal:
mc_gross=1.05, invoice=12, protection_eligibility=Eligible, address_status=confirmed, item_number1=, payer_id=PJXK5XTJ6PML4, tax=0.05, address_street=8802-93 st, payment_date=11:53:35 May 27, 2009 PDT, payment_status=Completed, charset=windows-1252, address_zip=t6c 3t1, mc_shipping=0.00, mc_handling=0.00, first_name=Cam, mc_fee=0.33, address_country_code=CA, address_name=HockeyArtist.com, notify_version=2.8, custom=, payer_status=verified, business=cwilson@camwilson.ca, address_country=Canada, num_cart_items=1, mc_handling1=0.00, address_city=edmonton, verify_sign=AI36sk2Aln3iC.t.mla1wMizPRcQASqnNWaQI-KbA0R6L9Pzd1BXu2dp, payer_email=email@email.ca, mc_shipping1=0.00, tax1=0.00, txn_id=69N981769B280143K, payment_type=instant, payer_business_name=HockeyArtist.com, last_name=Wilson, address_state=Alberta, item_name1= => Title: No title - ID: 825, receiver_email=email@email.ca, payment_fee=0.33, quantity1=1, receiver_id=43HRRSYGTJG6J, txn_type=cart, mc_gross_1=1.00, mc_currency=USD, residence_country=CA, transaction_subject=Shopping Cart, payment_gross=1.05,
IPN Response from Paypal Server:
HTTP/1.1 200 OK
Date: Wed, 27 May 2009 18:53:43 GMT
Server: Apache
Set-Cookie: cwrClyrK4LoCV1fydGbAxiNL6iG=aDhKlzEL-SN_RxuEZcxq_4aXrXZh8T90TYNtALj3pYjSUgM2jQ7QR5w4LG9J6xch8bNGoQZ5iHb9FMuO5luqxR2B6-toZpsse7nwMNsm-D5KM4KdPq7SkAngb5Tgq8zL-jws_W%7ck3kYCxu9z9ZDPBtI9xKnOXCLhXGmU7JPLYRMt8Jp3WlxpELOX6V5reRZvFg6kIuJSoozDm%7c7z43xfr_xG0dLVGN5N-K9to__QvDrvH0Y1o2HirVekpvd-Zu_ITDkTeEdFsJT8GraeO7om%7c1243450423; domain=.paypal.com; path=/
Set-Cookie: cookie_check=yes; expires=Sat, 25-May-2019 18:53:43 GMT; domain=.paypal.com; path=/
Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/
Set-Cookie: navlns=0; expires=Tue, 22-May-2029 18:53:43 GMT; domain=.paypal.com; path=/
Vary: Accept-Encoding
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

7
INVALID
0


[05/28/2009 7:16 AM] - SUCCESS!




Thanks

Stramm

Paypal currency is set to USD... didn't you say you use CAD? Set USD in the shop's config and try again

camster

The log shown in last message was from a live test where my paypal merchant account is CAD, thats why the log shows CAD. P_S config was set as CAD as well.
In my sandbox test the merchant account is US currency and I have P_S set to USD so in both cases they are matching but getting the same problem with the live test (both CAD) as I am with the sandbox test (both USD).

But for some reason the IPN logs are only showing the live transaction logs and not the Sadbox transaction logs.  I'm not getting an IPN error email with the sandbox tests as I am with the live tests

Thanks

Stramm

then sandbox isn't setup correctly (merchant email)

zelal

Hi Stramm, I am also having the same problem. Please look at my screenshots below. I am using PayPal sandbox accounts.

My order is not processed and Sandbox sends me (admin@istockgraphics) the e-mail with the subject "PayPal IPN failed" and message:-

==================================================================================
Bad order (PayPal says it's invalid): HTTP/1.1 200 OK
Date: Fri, 29 May 2009 17:26:28 GMT
Server: Apache/1.3.33 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_ssl/2.8.22 OpenSSL/0.9.7e
Set-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=OMDCm0U6QFeXXCkFTywvcO-LXbL5VpVPUq8AzoGKLOjJhUmlLMVxlQ-wc2ga8DLz9V_97Gv3XR9l8eWOKsc7BMIllEKpjPi1_GWbrq8OgmMOSvtmmsAG8sth1FtW-7lXfJA0SW%7cu8HEIHEFWgNO2cJ5gDOa9JzLI2NAsY1drYRzKv6I2PWTRjhxmXWbX_PxiGCm3h9mA88w-W%7cYpK3LZNWm7RBXopAGr-cYm6hL8879FD8b7fdWtw5Z0qW31MvXBJ7gJyT0k9ivE6uvVrUy0%7c1243617989; domain=.paypal.com; path=/
Set-Cookie: cookie_check=yes; expires=Mon, 27-May-2019 17:26:29 GMT; domain=.paypal.com; path=/
Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/
Set-Cookie: navlns=0; expires=Thu, 24-May-2029 17:26:29 GMT; domain=.paypal.com; path=/
Set-Cookie: Apache=10.191.196.11.137681243617988975; path=/; expires=Thu, 16-Apr-03 10:58:12 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

7
INVALID
0
==================================================================================

For your kind information, I am using Full Size Control Access plugin and also using .htaccess file (as per your instruction) inside my "albums" folder.

Could you please have a look at my screenshots and give me your kind solution? I will be really grateful.

Regards.

Zelal

pioux

#166
I have an issue too, , can't find the cause

USER:
------------------
Array
(
    [ID] => 212681009986a827b21846258186bd33
    [am] => 1
    [lang] => dutch
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => pioux
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 0
    [can_send_ecards] => 0
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 10
    [num_URI_upload] => 10
    [can_post_comments] => 0
    [can_upload_pictures] => 1
    [can_create_albums] => 0
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg148_filetypes; (0.001s)
    [1] => select * from cpg148_plugins order by priority asc; (0.001s)
    [2] => delete from `stefplus_be`.cpg148_sessions where time<1243799601 and remember=0; (0.001s)
    [3] => delete from `stefplus_be`.cpg148_sessions where time<1242593601; (0.001s)
    [4] => select user_id from `stefplus_be`.cpg148_sessions where session_id=md5("6ccb27d5ec835182f933db6709fcfe8408eb289d20412b31707c0506f1ad53b5"); (0.001s)
    [5] => select user_id as id, user_password as password from `stefplus_be`.cpg148_users where user_id=2 (0.001s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `stefplus_be`.cpg148_users AS u INNER JOIN `stefplus_be`.cpg148_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='2' (0.001s)
    [7] => SELECT user_group_list FROM `stefplus_be`.cpg148_users AS u WHERE user_id='2' and user_group_list <> ''; (0.001s)
    [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg148_usergroups WHERE group_id in (1) (0.001s)
    [9] => SELECT group_name FROM  cpg148_usergroups WHERE group_id= 1 (0.001s)
    [10] => update `stefplus_be`.cpg148_sessions set time='1243803201' where session_id=md5('6ccb27d5ec835182f933db6709fcfe8408eb289d20412b31707c0506f1ad53b5'); (0.001s)
    [11] => SELECT user_favpics FROM cpg148_favpics WHERE user_id = 2 (0.001s)
    [12] => SELECT * FROM cpg148_final_extract_config (0.001s)
    [13] => DELETE FROM cpg148_banned WHERE expiry < '2009-05-31 21:53:21' (0.001s)
    [14] => SELECT * FROM cpg148_banned WHERE (ip_addr='81.247.49.192' OR ip_addr='81.247.49.192' OR user_id=2) AND brute_force=0 (0.001s)
    [15] => select plugin_id from cpg148_plugins where path="photo_shop"; (0.001s)
    [16] => select priority from cpg148_plugins order by priority desc limit 1; (0.001s)
    [17] => insert into cpg148_plugins (name, path,priority)  values ("Photo Shop","photo_shop",2); (0.031s)
    [18] => SELECT COUNT(*) FROM cpg148_pictures WHERE approved = 'NO' (0.002s)
)

==========================
GET :
------------------
Array
(
    [op] => install
    [p] => photo_shop
)

==========================
POST :
------------------
Array
(
    [submit] => Go!
)

==========================
VERSION INFO :
------------------
PHP version: 5.2.9 - OK
------------------
mySQL version: 5.0.32-Debian_7etch10-log
------------------
Coppermine version: 1.4.8(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support: 1
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.0.32
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | On
safe_mode_exec_dir | /surely/you/must/be/joking | /surely/you/must/be/joking
safe_mode_gid | Off | Off
safe_mode_include_dir | /usr/share/php | /usr/share/php
safe_mode_exec_dir | /surely/you/must/be/joking | /surely/you/must/be/joking
sql.safe_mode | Off | Off
disable_functions | disk_total_space, diskfreespace | disk_total_space, diskfreespace
file_uploads | On | On
include_path | .:/usr/share/php | .:/usr/share/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
sendmail_path | /usr/sbin/b1sendmail -t -i | /usr/sbin/b1sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 12M | 12M
post_max_size | 12M | 12M
==========================
Page generated in 0.3 seconds - 19 queries in 0.05 seconds - Album set : ; Meta set: ;

Joachim Müller

Don't post debug_output unless requested.

pyrosteve

Hi,

I am using an older version of the shopping cart plugin (not sure which version tbh) and it has been working perfectly for my needs for over a year or so now. I am not sure if this issue is fixed in the lastest updates or not, but it is something I would like to just add to the current working system I have in place now if possible.

The issue is that when people place an order for photos, they don't always click the paypal button after checkout to pay online, but the order goes through to their account and they can see it when they check their orders - the issue is, is there anyway to add a paypal link in the order tracking part of the shop so people can pay via paypal for their orders even after navigating away from the payment screen after submitting an order?

Sorry I am not sure if that makes much sense or not!

Kind regards,

Steve

zelal

I am still waiting for a kind response from Stramm to my following post in this thread:

http://forum.coppermine-gallery.net/index.php?topic=57206.msg295247#msg295247

Because I am not still getting my PayPal IPN to my coppermine site.

May be, Stramm is doing a research and work-around to improve the Photo Shop and fix any possible non-compatibility with CPG's new version and taking his time to reply to us. If so, I  really wish his success.

Regards.

Zelal

Joachim Müller


camster

Quotethen sandbox isn't setup correctly (merchant email)

ok I'm not sure what is not set up correctly and I read on this thread you recommended creating a new seller account so I thought I would start fresh with new paypal sandbox accounts to make sure I have those correct first.
I've also attached my Photo_shop config and buyer account screenshot with notes below. Hopefully this will help narrow it down.


PayPal Sandbox Account Settings

New Premier Account as seller:
zenseller@zenstream.net
Select Payment Solution "Website Payment Standard"
Currency USA

Account IPN is enabled

Notification URL for the IPN
http://www.zenstream.net/imagestream/     (imagestream is root folder of coppermine)     
is this correct? I tried to find more help on this in the PayPal IPN documentation but I couldnt find any details on this.

New Buyer Account (Premier)
zenbuyer@zenstream.net
Select Payment Solution "Website Payment Standard"
Currency USA

All other settings left as default

If theres anything else I need to do or check on the PayPal side or if something is incorrect here please let me know.


Photo_shop

Coppermine Gallery Admin Email: zenseller@zenstream.net
Photo_shop PayPal Merchant email: zenseller@zenstream.net

New Buyer Account: zenbuyer@zenstream.net

Configuration screenshot is attached
The one part I'm not sure about is the "SSL URL to coppermine base dir"
As you can see in the screenshot I have it as the root directory of my coppermine (imagestream)


The Process

- Buyer checks out
- Logs in to PP
- Invoice with ordered item appears with Pay Now button
- Click Pay Now and get a Thank You For Your Payment page
- Click Return to Merchant and get an "Internal Server Error" page
   Return URL after payment  http://www.zenstream.net/imagestream/   (I keep getting an error page instead of back to the Return URL, I'm assuming this is a PayPal issue)

In Photo_Shop
Attached is a screenshot of buyer account, you can see the purchased image is listed but not as paid even though paypal accepted payment and there is no download link.
(2 transaction tests are shown)

camster

Further to my last post the only other thing I could think of is setting the Photo_Shop directory permissions to read/write/execute but that didnt seem to help. I've put a lot of time into this and would really like to get this last download feature working. If anyone has any ideas where I should investigate please let me know.

StudioLahaye

I'm quite a beginner but i managed to install and configure the shop according to my own specs.

I'm trying to implement IDeal payment (paypal alike procedure).
I recieved the (php) code from my bank with instructions.

plain said it tells me to find the syntax that produces the final price, insert an bank ID for verification and paste the code into the source.

easier said then done for me..
Can someone please help me a little more, i can't find the php code that outputs the total price and I don't know where to install the code (hense where to place the IDeal form and submission button).

Any help is appreciated.

As I don't have the code digital now I will post this later.

elforooffroad.net

woul someone help me install the shoping cart  my gallery, and how much would you charge me?
thank you

elforooffroad.net

Quote from: elforooffroad.net on June 18, 2009, 08:03:23 PM
woul someone help me install the shoping cart  my gallery, and how much would you charge me?
thank you

here is my gallery  www.elforooffroad.net/gallery
thank you

camster

I was just wondering if its possible to change the checkout message.

When a user confirms their order they are taken the checkout page with the message:

"Thanks for your order.
We have sent you a confirmation email!
Your order will be processed after payment! "

I was just wondering if their is somewhere to change this, I've checked in both the photo_shop config and coppermine but cant find it. Any help would be great.

Thanks
Cam

Joachim Müller

Inside the plugin folder, you'll find a sub-folder named "lang" where all language files are suppossed to reside. As far as I can say there currently is only one available: the English language file named english.php. Edit that file with a plain text editor as you see fit - all strings that are send to the output are being defined inside that langauge file. Save your changes after editing and you should be good. Has been asked and answered already afaik.

camster

QuoteInside the plugin folder, you'll find a sub-folder named "lang" where all language files are suppossed to reside. As far as I can say there currently is only one available: the English language file named english.php. Edit that file with a plain text editor as you see fit - all strings that are send to the output are being defined inside that langauge file. Save your changes after editing and you should be good. Has been asked and answered already afaik.

Got it, Thanks!  I did do several keyword searches on the forum and checked the CPG documentation but didnt come up with anything, maybe wrong keywords

Aeronautic

Quote from: Stramm on January 11, 2009, 05:58:31 PM
I've created to functions where you as admin can add own functionality to the shop
open include/functions.inc.php
scroll down to the end of that file and find
- function calculate_discount()
and
- function calculate_shipping()

both you could modify in a way that you get your desired result.

I've read through the entire thread (all 9 pages) 3 times before posting but I can't find the answer.

Stramm's response above was to a user who wanted to set shipping options for US and Canadian customers.

I've looked at the subject code, read the docs at the beginning of this thread, and can't figure out how to implement this solution.

I believe this is all of the default subject code:

//calculate shipping, user defined
function calculate_shipping(){
global $CONFIG, $SHOP_CONFIG;
    //global shipping is taken (type=ship), if the per item shipping is set and higher, than it overrides global
$shipping = $SHOP_CONFIG['ship'];
foreach($_SESSION['photoshop']['cart'] as $key => $temp){//foreach count photo items

$item_id = (isset($_SESSION['photoshop']['cart'][$key]['id'])) ? $_SESSION['photoshop']['cart'][$key]['id'] : '';
if($SHOP_CONFIG[$item_id]['ship'] >= $shipping) {
  $shipping = $SHOP_CONFIG[$item_id]['ship'];
}
}


return $shipping;
}


Unlike the discount, which I figured out easily from the source code example, I can't make heads or tails of this shipping issue.

My goal is to allow (during check out?) the customer to see there list of items in their cart and then select from a range of shipping options:

Ground USA
Expedited USA
Air USA

And the same for International.

A less elegant solution would be to create 6 identical products with the shipping included and noted. I tried to add these as shipping options to the "item" admin menu late last night thinking that was where they went but re-reading the directions with coffee this morning I understand only one such item is intended as a global override now.

Would very much appreciate some help (or to be told just go with plan B - six products including shipping).

For the benefit of others here is my discount code:

//calculate discounts, user defined
function calculate_discount($temp_price, $cd_counter){

$discount = '';
//variables that can be used
//$cd_counter['photo']  number of pics for print
//$cd_counter['cd'] number of pics on CD
//$temp_price[1] price for the CD
//$temp_price[0] price for the pics

//just to demonstrate how to calculate a discount
//10% on print images if user orders more than 10 pics

if($cd_counter['photo'] >= 4) {
$discount = 0.05 * $temp_price[0];
}

if($cd_counter['photo'] >= 7) {
$discount = 0.075 * $temp_price[0];
}

if($cd_counter['photo'] >= 10) {
$discount = 0.10 * $temp_price[0];
}

if($cd_counter['photo'] >= 14) {
$discount = 0.135 * $temp_price[0];
}

if($cd_counter['photo'] >= 17) {
$discount = 0.20 * $temp_price[0];
}

if($cd_counter['photo'] >= 20) {
$discount = 0.30 * $temp_price[0];
}

/*
//or another example... 10% if the order volume is > 100USD
if($temp_price[0] >= 100) {
$discount = 0.1 * $temp_price[0];
}
*/
return $discount;
}


Which yields this result:

Buy 4-6 save 5%
Buy 7-9 save 7.5%
Buy 10-13 save 10%
Buy 14-16 save 13.5%
Buy 17-19 save 20%
Buy 20 or more save 30%