coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: Catman on January 29, 2007, 08:41:20 AM

Title: Not possible to add a picture to the shopping cart if selected after a search
Post by: Catman on January 29, 2007, 08:41:20 AM
Hello,

I'm using the photo_shop plugin for my gallery.  Everything seemed to work fine, but yesterday I discovered that when I start searching for a picture, it is not possible to add the found picture(s) to the cart. But it is possible to add the same picture to the cart when I access it through the album. I have done the same thing on a test server, with the same result. Then I went to http://stramm.st.funpic.org/ and tried to do the same. I searched with the keyword "sea" I found 1 picture, but again it was not possible to add the picture to the cart. Seems this is a bug because it is possible to reproduce it on several systems.

Regards

Frank
Title: Re: Not possible to add a picture to the shopping cart if selected after a searc
Post by: Stramm on January 29, 2007, 09:31:24 AM
known issue, that's due to way the search system works.
Title: Re: Not possible to add a picture to the shopping cart if selected after a search
Post by: Catman on January 29, 2007, 12:26:11 PM
Thank's for youre reply;

Is there any workaround for this issue? Or is there any hope for the near future that this issue can be solved?

Kind regards

Frank
Title: Re: Not possible to add a picture to the shopping cart if selected after a searc
Post by: Stramm on January 29, 2007, 01:01:38 PM
no workaround
if this will be changed... hmm, I do not know. The plugin relies on the main app to handle over the pic_id. The search system however uses cookies to save the search result.

??? Quick fix possibly is to disable displaying the shop for the search meta album
Title: Re: Not possible to add a picture to the shopping cart if selected after a search
Post by: Catman on January 29, 2007, 04:38:04 PM
It's a pity, because searching, and then adding the found picture(s) to the cart was the main goal. The excellent search function in Coppermine made me start using it. Maybe someone else has a good idea?
Title: Re: Not possible to add a picture to the shopping cart if selected after a searc
Post by: Stramm on January 29, 2007, 05:35:21 PM
there's a possibility, but you'll lose your search meta album once you've added a pic to the basket

codebase.php
find
global $CONFIG, $SHOP_CONFIG, $lang_photoshop;
replace with
global $CONFIG, $SHOP_CONFIG, $lang_photoshop, $album;

find
<form action="{$REFERER}" method="post">
replace with
<form action="{$referer}" method="post">

above
$shop_data =  <<<EOT
add
($album == 'search') ? $referer = "displayimage.php?pos=-{$pic_data['pid']}" : $referer = null;
Title: Re: Not possible to add a picture to the shopping cart if selected after a search
Post by: Catman on January 29, 2007, 07:21:16 PM
 :D Thank you very much; this is working fine. It is very close to what I want.

Kind regards

Frank