Webmastersite.net
Register Log In

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

Comments on Aware of this issue? Re: item types

sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Dec 09, 2008 - 8:58 PM:

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
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 11, 2008 - 9:54 AM:

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.
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Dec 11, 2008 - 10:02 AM:

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
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 12, 2008 - 9:16 AM:

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.
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Dec 12, 2008 - 9:22 AM:

I've since changed my item types because of the underscore issue. It's working now. Sorry for not mentioning that.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 12, 2008 - 3:22 PM:

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 } ?>
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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