 | |  | | | Classifieds Installation & Upgrades If you're having install or upgrade problems, post here. |
February 19th, 2005, 08:42 AM
|
#1 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2005
Posts: 13
| Help with "wanted" Template
I'm struggling with this - I can see the for sale template is 0 - and the default - this works fine. I can see wanted template is 1 (showproduct1, editproduct1 etc......)
Is showproduct1 already set up as a wanted template? (I can see "wanted" in the language file for this) but when I place a wanted advert - it uses a wanted template to upload (eg no pics) but as soon as it is is uploaded and viewed it is laid out as a for sale advert template - and when you try and edit a wanted template it goes to edit a for sale template.
Have I missed something - or is this not already set up?
When I set the categories up I selected they would be "wanted" categories in admin - and in ad types it is set as "enabled"
The templates aren't the easiest to work with so I'm struggling to get to grips with this
Last edited by jazz74; February 19th, 2005 at 08:49 AM.
|
| |
February 19th, 2005, 09:31 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
Hello
In editproduct.php lines 202-204 are this Quote:
$query = "SELECT
catname,extra1,extra2,extra3,extra4,extra5,extra6,adhigh,adbold,adital
FROM {$Globals['pp_db_prefix']}categories where id='$pcat'";
$resulta = ppmysql_query($query,$link);
list( $thecatname, $Globals['extra1name'], $Globals['extra2name'],
$Globals['extra3name'], $Globals['extra4name'], $Globals['extra5name'],
$Globals['extra6name'], $adhigh, $adbold, $adital ) =
mysql_fetch_row($resulta);
Change them to this
$query = "SELECT
catname,extra1,extra2,extra3,extra4,extra5,extra6,template,adhigh,adbold,adital
FROM {$Globals['pp_db_prefix']}categories where id='$pcat'";
$resulta = ppmysql_query($query,$link);
list( $thecatname, $Globals['extra1name'], $Globals['extra2name'],
$Globals['extra3name'], $Globals['extra4name'], $Globals['extra5name'],
$Globals['extra6name'], $Globals['cattemp'], $adhigh, $adbold, $adital )
= mysql_fetch_row($resulta);
| |
| |
February 20th, 2005, 04:11 AM
|
#3 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2005
Posts: 13
|
thankyou Omegatron - I've added that change into editproduct.php and that resolves the editing template - so now I select Wanted to place ad - once submitted it shows as a "For Sale"- and is edited as a Wanted template
Looking at it, it seems to be using my wanted template as I added an extra field "budget" in and this is showing - but the "for sale by" is there instead of "wanted by" - the showproduct1.php language file says "wanted by" so not sure why its still not using this.
|
| |
February 20th, 2005, 05:13 AM
|
#4 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2005
Posts: 13
|
sorted
I applied your suggested change to editproduct.php to the showproduct.php aswell line 111 but instead of $pcat as the existing lines were using $cat I put that
so I changed showproduct.php line 111-114 to this
$query = "SELECT
catname,extra1,extra2,extra3,extra4,extra5,extra6,template,adhigh,adbold,adital
FROM {$Globals['pp_db_prefix']}categories where id='$cat'";
$resulta = ppmysql_query($query,$link);
list( $thecatname, $Globals['extra1name'], $Globals['extra2name'],
$Globals['extra3name'], $Globals['extra4name'], $Globals['extra5name'],
$Globals['extra6name'], $Globals['cattemp'], $adhigh, $adbold, $adital )
= mysql_fetch_row($resulta);
it now seems to work - but please tell me if I've done something stupid and need to undo!
Last edited by jazz74; February 20th, 2005 at 05:15 AM.
|
| |
February 20th, 2005, 11:38 AM
|
#5 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
well I dont think you want to redefine any product variables like $pcat
However the change to the category query like I posted would be correct.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 01:54 PM. | |