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]   Go Down

Author Topic: display the profile1 in the Photo Shop order list  (Read 7219 times)

0 Members and 1 Guest are viewing this topic.

wkpoon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
display the profile1 in the Photo Shop order list
« on: June 11, 2007, 08:11:16 am »

As I store user name in profile1, please kindly tell how to display the profile1 in the photo shop order list.
« Last Edit: June 15, 2007, 07:59:42 am by Stramm »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: display the profile1 in the Photo Shop order list
« Reply #1 on: June 11, 2007, 09:20:43 am »

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

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

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

find
Code: [Select]
$user_name[] = $i['user_name'];
replace with
Code: [Select]
$user_name[] = $i['user_profile1'];

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


at your own risk, no guarantees

wkpoon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: display the profile1 in the Photo Shop order list
« Reply #2 on: June 12, 2007, 10:09:16 am »

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 ?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: display the profile1 in the Photo Shop order list
« Reply #3 on: June 13, 2007, 12:49:48 pm »

pretty easy, in photo_shop_checkout.php find
Code: [Select]
$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
Code: [Select]
$item_id['pid']with
Code: [Select]
$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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: display the profile1 in the Photo Shop order list
« Reply #4 on: June 14, 2007, 03:27:25 am »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: display the profile1 in the Photo Shop order list
« Reply #5 on: June 14, 2007, 08:43:54 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!
Logged

wkpoon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: display the profile1 in the Photo Shop order list
« Reply #6 on: June 15, 2007, 05:27:41 am »

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

Thanks a lot !!
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.