Shopping cart - Page 27 Shopping cart - Page 27
 

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

Shopping cart

Started by Stramm, June 04, 2006, 09:02:32 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

JohannM

Stramm

I also encounter that the discount I configured is either allocating it to the Total of Photo's Amount or the total of CD Amount, if a customer order both photos and cd's, the discount calculation is wrong.

Please help !

Stramm

The discount as it is in the actual function is just an example. The array values are explained as well there
Quote//$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

So just change the function to do what you want to have
eg. discount for cds and pics
Quote$discount = 0.1 * $temp_price[0] + 0.1 * $temp_price[1];

JohannM

Stramm

Thanks for the help ... Silly me !

e.g. :    

   if(USER_GROUP == 'Registered'){$discount = 0.10 * $temp_price[0] + 0.10 * $temp_price[1];}
   if(USER_GROUP == 'Sponsor25'){$discount = 0.25 * $temp_price[0] + 0.25 * $temp_price[1];}
   if(USER_GROUP == 'Sponsor50'){$discount = 0.50 * $temp_price[0] + 0.50 * $temp_price[1];}

This correct ?

Stramm

seems to be OK to me... always depending on what you want to do ;)

JohannM

Stramm, seems to work fine !  Thanx

If I understand it correctly, all orders posted to the datebase (> 1000) before the correct "number format" changes on the core files, will still indeed show incorrectly in the "Admin" and "My Orders" pages ?


JohannM

Hi

How can I set the sort order for pid or photo number numeric before a copy of the shopping cart order is being mailed to the user & admin ?

camster

shopping cart and everything seems to work great on this except I have installed 1.3.6 but can not find the paypal feature on this. I'm sure I have the right version installed because the plugin manager lists it as 1.3.6. If anyone can help me  implement paypal that would be great.

Thanks
Camster

Shonna

Quote from: camster on August 01, 2008, 09:12:39 PM
shopping cart and everything seems to work great on this except I have installed 1.3.6 but can not find the paypal feature on this. I'm sure I have the right version installed because the plugin manager lists it as 1.3.6. If anyone can help me  implement paypal that would be great.

Thanks
Camster


same here

Shonna

Quote from: Shonna on August 15, 2008, 10:21:11 PM

same here

well i found in includes/gateway.inc to change a value to 1 to enable paypal..  and the paypal button came up at checkout.. but it went to paypal sandbox and i am confused... can it not go to where you either pay by credit card or login to paypal? like a regular pay now button?

Shonna

never mind.. didnt look down enough :p

efekt

I installed fresh version of coppermine and then installed the photo shop plugin and the whole gallery just went blank and its like this each time I reinstall everything. When I delete the plugin manually from the server all goes back to working state however obviously I cant use the plugin. All the sql data added during installation is in the database.

gallery: http://hmr6dobl2ii0.az.pl/shop/
cpg: 1.4.19
photoshop: 1.3.6

Any ideas how I might fix this??

Stramm

Please enable debug mode and post the error message.

efekt

The debug mode is on and I also added this piece of code I found in some other topics about "blank gallery" in index.php

error_reporting(E_ALL);
ini_set("display_errors", 1);


and there is still nothing...

can this be a configuration problem of the server?? maybe this plugin needs some specific php.ini or other configuration that Coppermine doesnt?? Because the gallery works fine without the plugin installed, it even works fine with the plugin installed however no plugin files... Ive run this plugin on other server and it works fine, however I need to run in on this server...

efekt

in administrator tools I found this info, however Im too new to coppermine to know if this is at least little helpful

Information about errors
USER:
------------------
Array
(
    [ID] => 9a99c4c967375516c3a16af5f107e589
    [am] => 1
    [lang] => polish
)

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

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [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 cpg14x_filetypes; (0s)
    [1] => select * from cpg14x_plugins order by priority asc; (0s)
    [2] => delete from `skn63483_martinoliva`.cpg14x_sessions where time<1219573601 and remember=0; (0s)
    [3] => delete from `skn63483_martinoliva`.cpg14x_sessions where time<1218367601; (0s)
    [4] => select user_id from `skn63483_martinoliva`.cpg14x_sessions where session_id = '90f45ba52fb9aa66552c6bf9802912c4' (0s)
    [5] => select user_id as id, user_password as password from `skn63483_martinoliva`.cpg14x_users where user_id=1 (0s)
    [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 `skn63483_martinoliva`.cpg14x_users AS u INNER JOIN `skn63483_martinoliva`.cpg14x_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [7] => SELECT user_group_list FROM `skn63483_martinoliva`.cpg14x_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [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 cpg14x_usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg14x_usergroups WHERE group_id= 1 (0s)
    [10] => update `skn63483_martinoliva`.cpg14x_sessions set time='1219577201' where session_id = '90f45ba52fb9aa66552c6bf9802912c4' (0s)
    [11] => SELECT user_favpics FROM cpg14x_favpics WHERE user_id = 1 (0.001s)
    [12] => DELETE FROM cpg14x_banned WHERE expiry < '2008-08-24 11:26:41' (0s)
    [13] => SELECT * FROM cpg14x_banned WHERE (ip_addr='89.243.224.149' OR ip_addr='89.243.224.149' OR user_id=1) AND brute_force=0 (0s)
    [14] => SELECT COUNT(*) FROM cpg14x_pictures WHERE approved = 'NO' (0s)
    [15] => SELECT user_name AS user_name, aid, a.title
                                                                                FROM cpg14x_albums AS a
                                                                                LEFT JOIN `skn63483_martinoliva`.cpg14x_users AS u
                                                                                ON (category - 10000) = user_id
                                                                                WHERE category > 10000 (0.001s)
    [16] => SELECT aid, title, name FROM cpg14x_albums LEFT JOIN cpg14x_categories ON cid = category WHERE category < 10000 ORDER BY title (0.001s)
)

==========================
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 5.2.6 - OK
------------------
mySQL version: 5.1.26-rc-log
------------------
Coppermine version: 1.4.19(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
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.1.26-rc
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/include/mysql
MYSQL_LIBS -L/usr/local/lib/mysql -lmysqlclient_r 
==========================
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 | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | exec,system,shell_exec,passthru,escapeshellcmd,escapeshellarg,proc_close,proc_open,proc_open,set_ini,ini_alter,eval,popen,dl,pcntl_exec,php_uname,posix_uname,disk_free_space | exec,system,shell_exec,passthru,escapeshellcmd,escapeshellarg,proc_close,proc_open,proc_open,set_ini,ini_alter,eval,popen,dl,pcntl_exec,php_uname,posix_uname,disk_free_space
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -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 | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.051 seconds - 17 queries in 0.003 seconds - Album set : ; Meta set: ;


Warnings
/bridge/udb_base.inc.php

    * Notice line 717: Undefined variable: listArray
    * Warning line 724: Invalid argument supplied for foreach()

/include/functions.inc.php

    * Notice line 2694: Undefined variable: i
    * Warning line 2696: Invalid argument supplied for foreach()
    * Warning line 2696: Invalid argument supplied for foreach()

/include/functions.inc.php(2706) : eval()'d code

    * Warning line 1: array_multisort() [function.array-multisort]: Argument #1 is expected to be an array or a sort flag

efekt

can this script be blocked somehow by .htaccess ??


efekt

I disabled the plugin, installed the photo shop, and found out that it doesnt show in the Plugin Manager as installed, it doesnt show at all... so maybe during the installation something went wrong?? how can I install it manually??

Stramm

I hope you uploaded the photo_shop directory into the plugins dir?

efekt

omg, of course I did... can u actually try to ANSWER one of my questions?? (please)

efekt

I'll bounce another idea off you... maybe this will ring a bell  :P can this be happening because this server has SAFE MODE ON??

Stramm

answers to your questions
Quote... can this be a configuration problem of the server??
Yes, it can but it musn't. If yes, then I can't tell you exactly where it is as I do not administer your box and I haven't seen such a behaviour before.

Quote... can this script be blocked somehow by .htaccess ??
Yes, you should know better than I do as you have access to your htaccess files and most probably you've put it on your server yourself.

Quote... so maybe during the installation something went wrong??
It may if you haven't uploaded the plugin into a wrong location (eg. with overwriting coppermines init.inc.php, functions.inc.php - that's why I ask some questiones - if you know better than I do what to ask and what to answer, then maybe you can answer your questions yourself)

Quote... can this be happening because this server has SAFE MODE ON
not likely

Quote... how can I install it manually??
upload it into the plugins dir, make the necessary entries to the db, the first into the plugins table (where you already deleted it once), the other entries are in one of the plugins subdirs (sql)... adapt the table names and use a tool like phpmyadmin to add them