WebmasterSite.net

Register | Forgot Password

Aware of this issue? Re: item types
if so maybe the manual needs a note

Version: 5.0.25
printPrint


Aware of this issue? Re: item types
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 60
Total Posts: 180
Posted 12/09/08 - 08:58 PM:
quote post
#1
I was trying to fish out an error and figured out finally what the problem was.

I had the following item types:

regular, property,property_feature,vendor,vendor_featured

my sponsorship page uses conditionals to serve up the appropriate payment button to the appropriate type but it kept spitting this back at me (when trying to renew a "property" type listing:
<?php "property" =="property"features) {?>


My conditionals were written correctly so I finally figured out it was because "property" was too close in name to "property_featured" so I changed the featured listing to "pfeatured" and it went through just fine.

If that's normal, great, but I couldn't find anything in the manual warning about item type naming issues.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California

Total Topics: 64
Total Posts: 7217
Posted 12/11/08 - 09:54 AM:
quote post
#2
My conditionals were written correctly

If that's a conditional, why am I seeing PHP? Is there some manner of posting which can make it show that way?

An underscore in an item type could cause problems, I'll either solve that or forbid them.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 60
Total Posts: 180
Posted 12/11/08 - 10:02 AM:
quote post
#3
My conditionals were written in the template as
 <IF {ITEMTYPE} is property_featured> show this paypal stuff</IF>
The above php was in the header as an error as a result of the itemtype containing an underscore.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California

Total Topics: 64
Total Posts: 7217
Posted 12/12/08 - 09:16 AM:
quote post
#4
You said your types are "regular, property,property_feature,vendor,vendor_featured". Unless you retyped that wrong here and have it right on your site, you're testing for a type which doesn't exist -- adding a d in your conditional which isn't in the name of the type you want.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 60
Total Posts: 180
Posted 12/12/08 - 09:22 AM:
quote post
#5
I've since changed my item types because of the underscore issue. It's working now. Sorry for not mentioning that.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California

Total Topics: 64
Total Posts: 7217
Posted 12/12/08 - 03:22 PM:
quote post
#6
Looks like there's a general problem with conditionals that comes up here, which is too complex for a quick fix. You can use PHP instead for now:
<?php if ("{ITEMTYPE}" == "property_featured") { ?> show this paypal stuff<?php } ?>

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


Sorry, you don't have permission to post. Log in, or register if you haven't yet.

WSN Links WSN Gallery WSN Knowledge Base WSN Forum WSN Classifieds WSN Directory WSN Software Directory