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: [Solved]: Who can I modify Item ID in photo shop plug in?  (Read 7687 times)

0 Members and 1 Guest are viewing this topic.

friisco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
[Solved]: Who can I modify Item ID in photo shop plug in?
« on: May 06, 2008, 02:10:51 pm »

hello!!!
I am doing a photo gallery and I did install the photo shop plug in and modified a lot of things but I canīt find out how to change the Item ID (that is set to display the pos= -) from the order mail to a 'title' or caption?
The Item ID is not especific to a product and can cause problems whith orders.
Can somebody say to me if it is possible and help me if is possible???

Thanks a lot! ;)
« Last Edit: May 08, 2008, 04:49:55 pm by Stramm »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Who can I modify Item ID in photo shop plug in?
« Reply #1 on: May 06, 2008, 03:00:35 pm »

I'm not sure if I understand what you mean! If you do not want the pid (what you call item id) to display you'll have to look through the code... but it's there to help you not to get problems with your orders as title or description are not unique. But the pid is. Each picture has a unique pid (picture id).
Don't mix that up with the relative addresing. This is not distinct. You can see that in the url with no minus (pos=xxx). The unique addressing with the pid uses (pos=-xxx) (note the minus - )

friisco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Who can I modify Item ID in photo shop plug in?
« Reply #2 on: May 06, 2008, 06:15:28 pm »

What I would like to do is to have a description of the pictures as a extra info to be displayed in the order mail. I understand that the pid is a unique but doesnīt describe what it is as I want. The orders will go to someone that will redirect e mails and will be a bit complicated if they have to check each pic id to send the order futher and add text to especify the product info.
Anyway... What I am thinking is to make a similar thing as is displayed in the e-card where the caption is showing when you send the e -card .
I am a bit afraid to mess with codes... I can remore or change a bit of the codes that will be displayed but I donīt know with this plug in what should I do...
I know that in e card the caption comes with:
'{PIC_CAPTION}'
'pc' => $pic_caption,

can you help me so I can place the right code in the right place and things work fine???

Thanks a lot!!! ;)
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Who can I modify Item ID in photo shop plug in?
« Reply #3 on: May 06, 2008, 06:35:55 pm »

friisco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Who can I modify Item ID in photo shop plug in?
« Reply #4 on: May 07, 2008, 10:12:32 am »

I did test and modify to 'filename' amd works but isnīt what I really want... so I tried:

Code: [Select]
$out['text'].= sprintf("%10.10s\t", $pic_caption['pc']).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);

but I got nothind this time!!! The item id is empty.

Is that right to add this: $pic_caption['pc']?
or maybe I should put that code somewhere else also???

Please help me!!!
Thanks a lot!!! ;)
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Who can I modify Item ID in photo shop plug in?
« Reply #5 on: May 07, 2008, 11:17:14 am »

it's wishful thinking to grab variables/ array names from other files...

First you need to check if the necessary data is available in checkout. Initially the data's stored in the pictures table.
Few lines above where you do your tries you'll find
Code: [Select]
$select_columns = 'filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, title, aid';

that variable holds the culumns the following query will get from the pictures table. You'll see the title, but no caption. If you need it, add it there. The exact name for the caption you'll find if you browse the database with a tool like phpmayadmin. In this case it's by accident 'caption' as well.

If you've done that, then you can examine the query and see where it saves the data and how it's processed.
Code: [Select]
    $result = cpg_db_query("SELECT $select_columns from {$CONFIG['TABLE_PICTURES']} WHERE pid='{$item_id['pid']}' LIMIT 1");
    $row = mysql_fetch_array($result);
the array $row holds all the data we want.
eg. $row['filename'] caontains the filename, $row['caption'] the caption

friisco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Who can I modify Item ID in photo shop plug in?
« Reply #6 on: May 07, 2008, 12:39:33 pm »

ok.. I did add caption to this line:

Code: [Select]
$select_columns = 'filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, title, aid, caption';

then I tried:
Code: [Select]
$result = cpg_db_query("SELECT $select_columns from {$CONFIG['TABLE_PICTURES']} WHERE pid='{$row['caption']}' LIMIT 1");

and:
Code: [Select]
$result = cpg_db_query("SELECT $select_columns from {$CONFIG['TABLE_PICTURES']} WHERE caption='{$row['caption']}' LIMIT 1");

but I get this message in check out:
Critical error
There was an error while processing a database query


What I am doing wrong?

Sorry for that!!!

Would be nice if you can tell me what is wrong!!!

Thanks
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Who can I modify Item ID in photo shop plug in?
« Reply #7 on: May 07, 2008, 01:24:26 pm »

you do not modify
Code: [Select]
    $result = cpg_db_query("SELECT $select_columns from {$CONFIG['TABLE_PICTURES']} WHERE pid='{$item_id['pid']}' LIMIT 1");This grabs the data from the db... and it now gets a lil bit more now, the caption

$row['filename'] or $row['caption'] (depending on what you want) you use instead of your made up $pic_caption['pc']

friisco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Who can I modify Item ID in photo shop plug in?
« Reply #8 on: May 07, 2008, 03:04:43 pm »

Works....
But the shows only some letters like this:

Item ID              Type       Amount       Price total
Style numb               Box            1         DK 100.00

and it is supose to show the style number like this:
Style number: 46594030

What should I do? I have to add more space somehow or the number(thatīs the date that I type) will not show?

thanks a lot for your help...
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Who can I modify Item ID in photo shop plug in?
« Reply #9 on: May 07, 2008, 03:09:30 pm »

friisco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Who can I modify Item ID in photo shop plug in?
« Reply #10 on: May 07, 2008, 03:44:24 pm »

Ok... I did look after your link and that is a bit greek for me !!! I need time to trie to figure it out!!!
Sorry that much questions... but what is happening is that I have a big project to delivery for a company in 3 days and I am far to finish... I need to fix this functionality for order control of the company . Can you maybe give me another link from other users that had similar problems??? I think I saw somewhere around the forum when i was searching information but I canīt find anymore!!!!

Please...

Thankīs :-\
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Who can I modify Item ID in photo shop plug in?
« Reply #11 on: May 07, 2008, 03:59:02 pm »

You probably have read about that in the link I've given above. Afaik that's the only similar question.

friisco

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Who can I modify Item ID in photo shop plug in?
« Reply #12 on: May 08, 2008, 04:47:04 pm »

I did fix... Thankīs a lot for the information!!!!
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.