display the profile1 in the Photo Shop order list display the profile1 in the Photo Shop order list
 

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

display the profile1 in the Photo Shop order list

Started by wkpoon, June 11, 2007, 08:11:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wkpoon

As I store user name in profile1, please kindly tell how to display the profile1 in the photo shop order list.

Stramm

in photo_shop_admin.php (update with the todays release before you start modding)

find
$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 aktive=".$box." AND cd=1 ORDER BY ". $sort_codes[$sort] ." LIMIT $lower_limit, $orders_per_page";

and replace with
$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 aktive=".$box." AND cd=1 ORDER BY ". $sort_codes[$sort] ." LIMIT $lower_limit, $orders_per_page";


find
$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";

replace with
$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";


find
$user_name[] = $i['user_name'];

replace with
$user_name[] = $i['user_profile1'];


find
<span style="cursor:pointer" onclick="window.location='profile.php?uid={$row['uid']}';">{$row['user_name']}</span> -

replace with
<span style="cursor:pointer" onclick="window.location='profile.php?uid={$row['uid']}';">{$row['user_profile1']}</span> -



at your own risk, no guarantees

wkpoon

Thanks for your code and I will test on my test website, but one more importance thing that I found the item id is the same as the pid could it be possible to display the file name in the email notice instead of pid ?

Stramm

pretty easy, in photo_shop_checkout.php find
$out['text'].= sprintf("%10.10s\t", $item_id['pid']).sprintf("%15.15s\t", $SHOP_CONFIG[$item_id['id']]['name']).sprintf("%10.10s\t", $item_id['amount']).sprintf("%15.15s\n",$lang_photoshop['USD'].' '.$price);


here just replace
$item_id['pid']
with
$row['filename']

however you'll most probably won't see the entire filename (if it's a long one). Read in the php manual more about the sprintf command to format the output like you need it. You also may want to format the header in a similar way and replace 'Item ID with 'Filename'.

wkpoon

That wonderful !! really thanks for your help !
I had try to download the latest photo shop 1.3.5 both in office and home but was failed with the same error "404" and I did clear all cache cookie and everything in both IE and Firfox could it be possible to post the photo shop to sourceforce as the previous version

Thanks
with regard

Joachim Müller

Quote from: wkpoon on June 14, 2007, 03:27:25 AM
I had try to download the latest photo shop 1.3.5 both in office and home but was failed with the same error "404" and I did clear all cache cookie and everything in both IE and Firfox could it be possible to post the photo shop to sourceforce as the previous version
You already have started a thread where you reported that you can't download the plugin. Don't cross-post!
Is the issue discussed in this thread solved? Resolve your threads!

wkpoon

After download the latest photo shop and change the code, the profile1 can now be display on order list.

Thanks a lot !!