Aware of this issue? Re: item types
if so maybe the manual needs a note
Version: 5.0.25
URL:
|
sparkalina
Forum Regular Usergroup: Customer Joined: Nov 25, 2003 Total Topics: 69 Total Posts: 198 |
Posted 12/09/08 - 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: 65 Total Posts: 7610 |
Posted 12/11/08 - 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: 69 Total Posts: 198 |
Posted 12/11/08 - 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: 65 Total Posts: 7610 |
Posted 12/12/08 - 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: 69 Total Posts: 198 |
Posted 12/12/08 - 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: 65 Total Posts: 7610 |
Posted 12/12/08 - 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 } ?>
|
Sorry, you don't have permission to post. Log in, or register if you haven't yet.

Print