Advanced search  

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]

Pages: 1 ... 13 14 15 16 [17] 18 19 20 21 ... 30   Go Down

Author Topic: Shopping cart  (Read 607535 times)

0 Members and 1 Guest are viewing this topic.

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Shopping cart
« Reply #320 on: June 12, 2007, 11:35:14 am »

Hi Stramm

Great work so far. I'm using your shopping cart as primary tool for online orders.

I need to know the following. During registration, I added fields like user_address, user_tel, etc. to be saved in the user's table.

Now with the shopping cart, especially in photo_shop_admin and the emails sent to the admin and user, I want to include this fields.  How do I do this ? Is there a simple way just to add a couple of sql query lines to get the information ?

It would also be nice to include the Order ID in the subject of the emails. How do I do this ?

Hope you can help.

Keep up the good work.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #321 on: June 13, 2007, 12:23:58 pm »

in the admin.. basically it's in there, just click the user's name to open his profile (shift+click to open it in a new window). To show all profile info in the shop admin is confusing and far to much info (imho). Probably useful in the detailed order overview if the webmaster requires this info (as I do). But you have  the possibility here too, to open the profile (click on username)

to add more profile info to the email... easy to do, and I'll keep the changes for later releases
in photo_sho_checkout.php find
Code: [Select]
'{LINK}' => $CONFIG['ecards_more_pic_target'],below add
Code: [Select]
'{USER_PROFILE1}' => $user_info['user_profile1'],
'{USER_PROFILE2}' => $user_info['user_profile2'],
'{USER_PROFILE3}' => $user_info['user_profile3'],
'{USER_PROFILE4}' => $user_info['user_profile4'],
'{USER_PROFILE5}' => $user_info['user_profile5'],
'{USER_PROFILE6}' => $user_info['user_profile6'],

now you can use the placeholders {USER_PROFILE1} - {USER_PROFILE6} in your email templates to the user and admin (to be found lang file(s))

Order id in the subject:
in the same photoshop_email_the_user where you just did your first changes find 2-3 lines below in the function call cpg_mail the variable $subject and replace it eg with
Code: [Select]
$subject.', Order ID: '.$order_idto get a result like
Quote
Thanks for your order,  Order ID: 107
to the admin it'll look like
Quote
You got a new order,  Order ID: 107
« Last Edit: June 13, 2007, 12:51:37 pm by Stramm »
Logged

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Shopping cart
« Reply #322 on: June 13, 2007, 03:12:16 pm »

Hi Stramm

Thanx a lot man, your the best !

The reason why I want to have the {USER_ADDRESS} on the admin page is that it would be much easier for me to print out the page for my files when doing the actual order.

You suppose I can include (put) $user_data['user_address'] on the spot in the admin page where I want the address to appear ?

Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #323 on: June 13, 2007, 04:14:17 pm »

no, hehehe, it's not that easy, just thinking one needs the address and therefore typing somewhere {USER_ADDRESS} would bring that up is magic

you'll first need to get the data from the db
-> photo_shop_admin.php
find
Code: [Select]
$sql = "SELECT s.*, u.{$udb_var['field']['username']}, u.{$udb_var['field']['email']}  FROM {$CONFIG['TABLE_SHOP']} AS s LEFT JOIN {$udb_var['usertable']} as u ON u.{$udb_var['field']['user_id']} = s.uid WHERE oid=".$oid." AND cd=1 LIMIT 1";
and replace it with
Code: [Select]
$sql = "SELECT s.*, u.* FROM {$CONFIG['TABLE_SHOP']} AS s LEFT JOIN {$udb_var['usertable']} as u ON u.{$udb_var['field']['user_id']} = s.uid WHERE oid=".$oid." AND cd=1 LIMIT 1";
that could will get the additional data (all user data) from the db, therefore the detailed list got replaced with *
We need (same as in my post above) the fields user_profile1 - user_profile6 (not address ;) )

Now we add that additonal info to the detailed order view
-> again photo_shop_admin.php find ~line 550
Code: [Select]
<span style="cursor:pointer" onclick="window.location='profile.php?uid={$row['uid']}';">{$row['user_name']} - </span> -
and replace
Code: [Select]
{$row['user_name']} - with
Code: [Select]
{$row['user_name']} - {$row['user_profile1']} - {$row['user_profile2']} - {$row['user_profile3']} - {$row['user_profile4']}of course you can insert user_profile5 and user_profile6 too, also you can chose a different place to place the address, that's just an example placement

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Shopping cart
« Reply #324 on: June 13, 2007, 05:03:57 pm »

Hi Stramm

Thanx a lot man, yet again, you are just a STAR !

It all works well ... for the record, I have a field name "user_address".

Now, on my admin page, its shows the adrress like:

PO BOX 5555 CAPE TOWN 8000 (in one line)  and not like

PO BOX 5555
CAPE TOWN
8000


How do I fix this ?

Thanx for your quick and VERY helpful help !
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Shopping cart
« Reply #325 on: June 13, 2007, 05:51:08 pm »

Individual issues should imo go into separate threads and not into the announcement thread. This thread is very cluttered (because it's a "hot" one) already.
Logged

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Shopping cart
« Reply #326 on: June 14, 2007, 06:11:52 pm »

GauGau


Where and on what board should we post questions about this Shopping Cart (Photo Shop) then ?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Shopping cart
« Reply #327 on: June 14, 2007, 07:11:46 pm »

Logged

panthereyes07

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

i have installed the gallery and then went to install the photo shop module i have recived the following error, how do i fix these errors.

There was an error while processing a database query
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #329 on: June 15, 2007, 07:58:40 am »

enable debug mode and post the actual error message

panthereyes07

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

Critical error There was an error while processing a database
While executing query "insert into cpg_plugins (name, path,priority)  values ("Photo Shop","photo_shop",5);" on 0

mySQL error: Duplicate entry 'Photo Shop' for key 2


Debug Info

USER:
------------------
Array
(
    [ID] => 041d17d6d4995250e4e77edccb4e8b91
    [am] => 1
    [lang] => english
    [liv] => Array
        (
           
  • => 45
  • [1] => 46
                [2] => 43
                [3] => 61
                [4] => 65
            )

       
[theme] => valentines
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => chrisb
    [groups] => Array
        (
           
  • => 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
(
   
  • => SELECT extension, mime, content, player FROM cpg_filetypes; (0s)
  • [1] => select * from cpg_plugins order by priority asc; (0s)
        [2] => delete from `foreverl_copp1`.cpg_sessions where time<1181899281 and remember=0; (0s)
        [3] => delete from `foreverl_copp1`.cpg_sessions where time<1180693281; (0s)
        [4] => select user_id from `foreverl_copp1`.cpg_sessions where session_id=md5("54c610b98bb925606d6bb129dc43a51a1a7a7fc37f8facf38c81dd206dbf61bf"); (0s)
        [5] => select user_id as id, user_password as password from `foreverl_copp1`.cpg_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 `foreverl_copp1`.cpg_users AS u INNER JOIN `foreverl_copp1`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
        [7] => SELECT user_group_list FROM `foreverl_copp1`.cpg_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 cpg_usergroups WHERE group_id in (1) (0s)
        [9] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 (0s)
        [10] => update `foreverl_copp1`.cpg_sessions set time='1181902881' where session_id=md5('54c610b98bb925606d6bb129dc43a51a1a7a7fc37f8facf38c81dd206dbf61bf'); (0s)
        [11] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
        [12] => SELECT * FROM cpg_mark_users WHERE user_id = 1 (0s)
        [13] => SELECT * FROM cpg_mark_config (0s)
        [14] => DELETE FROM cpg_banned WHERE expiry < '2007-06-15 10:21:21' (0s)
        [15] => SELECT * FROM cpg_banned WHERE (ip_addr='220.239.183.24' OR ip_addr='220.239.183.24' OR user_id=1) AND brute_force=0 (0s)
        [16] => select plugin_id from cpg_plugins where path="photo_shop"; (0s)
        [17] => select priority from cpg_plugins order by priority desc limit 1; (0s)
        [18] => insert into cpg_plugins (name, path,priority)  values ("Photo Shop","photo_shop",5); (0s)
        [19] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0s)
    )

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

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

==========================
VERSION INFO :
------------------
PHP version: 4.4.4 - OK
------------------
mySQL version: 4.1.22-standard
------------------
Coppermine version: 1.4.10(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 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
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 4.1.22
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.3
Linked Version 1.2.1.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
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 | no value | no value
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 | 8M | 8M
post_max_size | 16M | 16M
==========================
Page generated in 0.07 seconds - 20 queries in 0 seconds - Album set : ; Meta set: ;
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #331 on: June 15, 2007, 12:56:25 pm »

looks like you're trying to install a plugin that's already installed. Uninstall older versions before installing the new one.

Read the install notes in the anouncement thread for version 1.3.5 and do as suggested

manyquestions

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Shopping cart
« Reply #332 on: June 26, 2007, 02:29:02 pm »

Hi Stramm, i am a german guy but try to write in english ;)

Thats a great plugin but where is the opportunity to add the tax of the countries, like germany with 19% V.A.T ?

At the end of each order there must be added the tax to the sum  ???

I can´t find it or isn´t it impelemented?

Greetings

manyquestions
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #333 on: June 26, 2007, 03:38:39 pm »

Usually tax is included in the price you show in the shop. Therefore support for tax isn't enabled atm. But you could 'abuse' the discount or shipping  functionality (for shipping you still can set a global one if you do so).

If you do not want to add the tax to the total, but you just want to display it in the invoice, something like ' incl. 19% MWSt: 3.15 EUR', then you easily can do that in functions.inc.php function photoshop_format_price

manyquestions

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: Shopping cart
« Reply #334 on: June 26, 2007, 04:19:46 pm »

Usually tax is included in the price you show in the shop. Therefore support for tax isn't enabled atm. But you could 'abuse' the discount or shipping  functionality (for shipping you still can set a global one if you do so).

If you do not want to add the tax to the total, but you just want to display it in the invoice, something like ' incl. 19% MWSt: 3.15 EUR', then you easily can do that in functions.inc.php function photoshop_format_price

Thanks Stramm for your feedback.

Sorry, i am not a coder. What should i change to show the tax amount of the order at the end of the bill?

Thanks so much

manyquestions
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #335 on: June 28, 2007, 07:46:28 pm »

function photoshop_format_price in functions.inc.php (the plugins one)
after
Code: [Select]
$tot_price = number_format(($temp_price[1]+$temp_price[0]+$shipping-$discount),2);
define the tax, eg.
Code: [Select]
$tax = number_format(($tot_price/119*19),2);

then add the calculated tax to the html output
looks something like (hardcoded)
Code: [Select]
<td colspan="6" align="right">
{$photo_price2}
{$cd_price2}{$error}
{$total_price}
<br/>Incl. MWSt.: {$tax}{$lang_photoshop['USD']}&nbsp;&nbsp;
</td>

now add it to the txt output (emails)

eg.
Code: [Select]
$out['text'] .= sprintf("%+63s\n", 'Incl. MWSt: '.$tax.$lang_photoshop['USD']);
right before
Code: [Select]
return $out[$template];

 

Styles

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Shopping cart
« Reply #336 on: June 29, 2007, 03:35:59 am »

Hello

Just a quick thank you for this great plugin

I do have a question:

If a buyer desides that he wants to pay later and clicks on "continue" instead of, "paypal".
Is there a way to send him(the buyer) the paypal link in the "thank you for your order" email?
or can the buyer go back to the checkout page without having to reorder?

Thank you
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Shopping cart
« Reply #337 on: June 29, 2007, 09:33:19 am »

in your paypal merchant tools create a buy now button for a single item (doesn't matter what values you use), make sure you check unencrypted, then you get a link to use in emails.

Now copy/ paste the email into the photo shop lang file into an anchor tag ($lang_photoshop_email_order),
replace the price you entered with {PRICE}, the Item ID/Number with {ORDER_ID} and the item name you entered with eg. Your%20order:%20{ORDER_ID}

that'll look similar to
Code: [Select]
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=webmaster%40coppermine%2ecom&item_name=Your%20order:%20{ORDER_ID}&item_number={ORDER_ID}&amount={PRICE}&no_shipping=0&no_note=1&currency_code=EUR&lc=DE&bn=PP%2dBuyNowBF&charset=UTF%2d8">Pay with Paypal</a>this sample uses the email addy webmaster@coppermine.com, Eur and the german paypal frontend

Styles

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Shopping cart
« Reply #338 on: June 29, 2007, 02:06:47 pm »

 :o HOLY DOODLE BATMAN

That was quick (and easy)

Thanks!!
Logged

GuidoR13

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 22
PhotoShop 1.3.5 on CPG 1.4.11
« Reply #339 on: June 29, 2007, 06:44:19 pm »

Hello,

I just installed CPG 1.4.11 and then PhotoShop 1.3.5 and I get an internal server error (500, no debug possible, no serverlog accessible :-() when I send an order in photo_shop_checkout.php. Everything else (adding pictures, administration, deleting orders, deleting pictures in orders) works like a charm. Any ideas?

Thank you,
Guido
Logged
Pages: 1 ... 13 14 15 16 [17] 18 19 20 21 ... 30   Go Up
 

Page created in 0.028 seconds with 20 queries.