ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Using ProductCart
  New Posts New Posts RSS Feed - Custom Search Fields
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom Search Fields

 Post Reply Post Reply Page  12>
Author
Message
lhuggins View Drop Down
Newbie
Newbie


Joined: 09-January-2012
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote lhuggins Quote  Post ReplyReply Direct Link To This Post Topic: Custom Search Fields
    Posted: 11-January-2012 at 12:54pm
Is there a way to assign an item to more than one value in a custom search field? 
Example;
Search field- Drum type
                        Values- Metal drum
                                    Plastic drum

I have a product that can be used on metal and/or plastic. If I assign it to metal drum it will not show up on a plastic drum search, if I assign it to plastic drum it will not show up on a metal drum search. I have tried to clone it and assign one to metal and one to plastic but when there is no search on drum type they both show up.
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 21-January-2012 at 3:42pm
Hi,  
   Custom Search Fields only support a single value for each product I'm afraid.
Back to Top
lhuggins View Drop Down
Newbie
Newbie


Joined: 09-January-2012
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote lhuggins Quote  Post ReplyReply Direct Link To This Post Posted: 21-January-2012 at 4:15pm
Any ideas on a work around? I have many products that this effects.
Back to Top
p00pstar View Drop Down
Newbie
Newbie
Avatar

Joined: 17-March-2007
Location: Romania
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote p00pstar Quote  Post ReplyReply Direct Link To This Post Posted: 02-March-2012 at 2:41am
There is a workaround. 

1. From "pcadmin" open file "modifyProductB.asp";
2. Search for "function AddSF(tmpSFID,tmpSFName,tmpSVID,tmpSValue,tmpSOrder)";
3. Change the javascript function to this :

function AddSF(tmpSFID,tmpSFName,tmpSVID,tmpSValue,tmpSOrder)
{
    if (tmpSValue!="")
    {
        var i=0;
        var found=0;

        SFCount++;
        SFID[SFCount]=tmpSFID;
        SFNAME[SFCount]=tmpSFName;
        SFVID[SFCount]=tmpSVID;
        SFVALUE[SFCount]=tmpSValue;
        SFVORDER[SFCount]=tmpSOrder;

        CreateTable();
    }
}

Now it will work to add more values to the same custom-field. Otherwise, it will just replace the old value...

www.dotdesignmedia.ro // web application development
Back to Top
lhuggins View Drop Down
Newbie
Newbie


Joined: 09-January-2012
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote lhuggins Quote  Post ReplyReply Direct Link To This Post Posted: 05-March-2012 at 3:03pm
Thank you so much for this GREAT information, I really need a work around. One problem, I can not find "function AddSF(tmpSFID,tmpSFName,tmpSVID,tmpSValue,tmpSOrder)" in "modifyProductB.asp".

I am using PC v4.5bcm
Back to Top
lhuggins View Drop Down
Newbie
Newbie


Joined: 09-January-2012
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote lhuggins Quote  Post ReplyReply Direct Link To This Post Posted: 05-March-2012 at 3:25pm
I did find it in "modifyProduct.asp" and changed it as you instructed and I can not add more than one value to one custom search field.
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 05-March-2012 at 3:25pm
Hi, Try in modifyproduct.asp. The code also appears in several other files.
Back to Top
p00pstar View Drop Down
Newbie
Newbie
Avatar

Joined: 17-March-2007
Location: Romania
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote p00pstar Quote  Post ReplyReply Direct Link To This Post Posted: 05-March-2012 at 3:43pm
I'm afraid i can't help you with 4.5, i only have version 4.1 with sp3.
Maybe there are some differences, i don't know...
www.dotdesignmedia.ro // web application development
Back to Top
p00pstar View Drop Down
Newbie
Newbie
Avatar

Joined: 17-March-2007
Location: Romania
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote p00pstar Quote  Post ReplyReply Direct Link To This Post Posted: 05-March-2012 at 3:47pm
This function just searches for the custom field that you want to modify, and if it exists, it replaces the old value with the new value. 

If you comment those lines (or delete them) it will work to add another value to the same custom field...
www.dotdesignmedia.ro // web application development
Back to Top
lhuggins View Drop Down
Newbie
Newbie


Joined: 09-January-2012
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote lhuggins Quote  Post ReplyReply Direct Link To This Post Posted: 05-March-2012 at 6:48pm
Thank you for the help, unfortunately it did not work. I modified "modifyProduct.asp" to;
function AddSF(tmpSFID,tmpSFName,tmpSVID,tmpSValue,tmpSOrder)
{
if (tmpSValue!="")
{
var i=0;
var found=0;
SFCount++;
SFID[SFCount]=tmpSFID;
SFNAME[SFCount]=tmpSFName;
SFVID[SFCount]=tmpSVID;
SFVALUE[SFCount]=tmpSValue;
SFVORDER[SFCount]=tmpSOrder;
}
CreateTable();
}
}
And it still replaces the value in custom fields instead of adding another one.
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.