Conditionals / Variables for Classifieds Add On
Posted: 29 April 2010 03:53 PM   Ignore ]  
Newbie
Rank
Total Posts:  23
Joined  2010-03-29

I’m really confused about how I can display the variables provided for the Classifieds add on.

Basically, I have a control panel that shows all the pertinent info for the classifieds but I cannot get it to display.

Fore instance, posts left.  {classifieds_posts_left}

I tried this code:

{exp:foxee:transaction_history foxee_product_type="classifieds"

You have {classifieds_posts_left} 

{
/exp:foxee:transaction_history} 

This does not display at all. 

Also I would like to know how the conditional {if foxee_is_classified} is commonly used?

Thanks.

—Rick

Profile
 
Posted: 29 April 2010 09:47 PM   Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1654
Joined  2007-11-23

Hi Rick,

try wrapping the tag in the {transactions} tag pair.

{exp:foxee:transaction_history foxee_product_type="classifieds"
{transactions}

You have {classifieds_posts_left} 

{
/transactions}
{
/exp:foxee:transaction_history} 

As far as the {if foxee_is_classified} conditional, it is added to the default five product types. in your templates you can use it to sort product types.

Signature 

Mike

HCC Development

Profile
 
Posted: 30 April 2010 02:05 PM   Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  23
Joined  2010-03-29

Still not working.

I have this in a template:

{exp:foxee:transaction_history foxee_product_type="classifieds"}
{if transactions}
{transactions}
You have {classifieds_posts_left} 
{
/transactions}
{
/if}

{
/exp:foxee:transaction_history} 

  And it just shows this:

You have {classifieds_posts_left} You have {classifieds_posts_left} You have {classifieds_posts_left} You have {classifieds_posts_left}

Any idea what I am doing wrong?

Profile
 
Posted: 30 April 2010 04:06 PM   Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1654
Joined  2007-11-23

Hi Rick,

what build of the classifieds and foxee addons are you using. Make sure you have updated to the latest build. You should download foxee again if you haven’t updated in the last couple days.

Your code should be:

{exp:foxee:transaction_history foxee_product_type="classifieds"}
{if classifieds_posts_left}
{transactions}
You have {classifieds_posts_left} 
{
/transactions}
{
/if}

{
/exp:foxee:transaction_history} 

Also make sure you are not testing with a Super Admin account.

Signature 

Mike

HCC Development

Profile
 
Posted: 01 May 2010 07:44 AM   Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  23
Joined  2010-03-29

Hi,

Still nothing… I’m at my wits end with this add-on.

Here’s my story:

I upgraded to FoxEE 1.10.60.036 and Classifieds 1.10.05.

The test transaction with a non-Superadmin account was successful.  Classifieds SAEF appears. I make the post and I get an error saying that I exceeded the Posting Limit.  This is after maybe 10 test transactions.

I added the Classifieds transaction history code provided to the test template and nothing shows.

I have done many successful subscription test purchases but the Classifieds is being a major pain.  and there is no real way to determine if I have credits to use or not.

Can you please help?

Profile
 
Posted: 04 May 2010 06:37 AM   Ignore ]   [ # 5 ]  
Newbie
Rank
Total Posts:  23
Joined  2010-03-29

Sorry to be a pest, but some guidance would be extremely appreciated.

Profile
 
Posted: 04 May 2010 10:24 AM   Ignore ]   [ # 6 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  406
Joined  2008-04-21

That variable is assigned to the transaction_details since an order could have multiple classified products within it.  Your template should be the following:

{exp:foxee:transaction_history foxee_product_type="classifieds"}
{transactions}
{transaction_details}
{if classifieds_posts_left}
You have {classifieds_posts_left}
{
/if}
{
/transaction_details}
{
/transactions}
{
/exp:foxee:transaction_history} 
Profile
 
Posted: 04 May 2010 12:07 PM   Ignore ]   [ # 7 ]  
Newbie
Rank
Total Posts:  23
Joined  2010-03-29

Thanks.

Here’s what I have observed so far in my test purchases.

I am able to purchase a classified ad and gain access to the SAEF.  I can post an ad with no problem.

If I want to post another ad, the SAEF is still there, but upon submission I get an Error paging exclaiming post limit has exceeded the limit.

If I go and purchase another ad, then try and post again, I get the same error page instead of getting another post.

The fact that a user can’t post again is a major drawback.  Also, I would like to have the SAEF not show if a user can’t post again (instead of submitting the form and getting an ugly error message saying post limit exceeded.)

Finally,

I would like there to be some sort of indicator.  Perhaps in the main nav bar that says you have “X amount of posts left”.

Cutting and pasting this code shows nothing:

{exp:foxee:transaction_history foxee_product_type="classifieds"}
{if transactions}
{transactions}
You have {classifieds_posts_left} 
{
/transactions}
{
/if}

{
/exp:foxee:transaction_history} 

I know I’m being kind of a pest but I was hoping this script would work properly as I am trying to get a Classifieds site up by the end of the month.

Thanks for your help.

Profile
 
Posted: 06 May 2010 03:37 PM   Ignore ]   [ # 8 ]  
Newbie
Rank
Total Posts:  23
Joined  2010-03-29

Any one???

Profile
 
Posted: 07 May 2010 07:31 AM   Ignore ]   [ # 9 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1654
Joined  2007-11-23

Hey Rick,

Like Brian said you need to wrap the post_left tag in the transaction_detail variable pair.

As far as the user being able to post all of their available credits and the SAEF form not showing - If a user does not have any credits then the SAEF will not show, we are not able to duplicate the error that you are getting for multiple credits and from reading through your thread it seems that you have something in your template that is not correct.

Couple things, One create a test template with just the foxee code to make sure that you do not have any conflicts. Two, make sure that your template tags for your SAEF are correct. If you want to post your test template here we can take a look.

Signature 

Mike

HCC Development

Profile
 
Posted: 07 May 2010 08:54 AM   Ignore ]   [ # 10 ]  
Newbie
Rank
Total Posts:  23
Joined  2010-03-29

OK.  Here is my test template… edited a bit.

{assign_variable:my_weblog="products"<!-- change to your product weblog -->

{assign_variable:my_template_group="Foxee"<!--(This is only used for login redirect) -->

<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<
html>

<
head>
<
meta http-equiv="Content-Type" content="text/html; charset={charset}">

<!-- 
Foxee Head Tag -->
{exp:foxee:headers fb_width="800" fb_height ="400"}

</head>
<
body>

<
div class="container_12">

    
    
<!-- ***************************** 
MEMBER INFO ***************************** -->

<
div class="doc_link">
<
h1 >Member Info</h1>


</
div>

<
div class="top_segment left">
{if logged_in}  
    
<h2>You are logged in as: {username}</h2>
        <
h2>You are a member of the {group_title} group</h2>
      <
a href="{path='logout'}">Log Out</a>
      <
br /><br />
{/if}
{if logged_out}
    
<h2>You are logged out</h2>
{exp:member:login_form return="{my_template_group}/foxee_test_template"}
<p><label>Username</label><br />
<
input type="text" name="username" value="" maxlength="32" class="input" size="25" /></p>
<
p><label>Password</label><br />
<
input type="password" name="password" value="" maxlength="32" class="input" size="25" /></p>
<
p><input type="submit" name="submit" value="Submit" /></p>
{/exp:member:login_form}
{
/if}

<!-- ******************* contact info ******************************* -->

<
h2>Update FoxyCart contact info</h2>
{if logged_in}
{exp
:foxee:update_contact_info label="Update your FoxyCart stored information"}
<br /><br />
{if:else}

<p>You are not logged in</p>

{/if}



<!-- ************************* subscriptions ************************ -->

<
h2>Your Subscriptions</h2>
<
div class="segment">
{if logged_in}
{exp
:foxee:subscriptions}
{if is_subscription_active}
{subscription_name}
<br />
<
a href="{cancel_subscription}">Cancel Subscription</a><br />
Start:{subscription_start_date}<br />
End:{subscription_expiry_date}<br />

{/if}

{if no_results}
<p>You do not have any subscriptions</p>
{/if}
{
/exp:foxee:subscriptions}

{if
:else}
<p>You are not logged in</p>
{/if}

</div>

</
div>



<!-- ****************************** 
TRANSACTION HISTORY  ************************ -->

<
div class="doc_link">
<
h1 >Transaction History</h1>

{exp:foxee:transaction_history foxee_product_type="classifieds"}
{if transactions}
{transactions}
You have {classifieds_posts_left} 
{
/transactions}
{
/if}

{
/exp:foxee:transaction_history} 
    
</div>




<!-- ************************* 
PRODUCT CARTS ************************ -->

<
div class="doc_link">
<
h1>Products</h1>
</
div>


<!-- ************************* 
Non-Physical ************************* -->

<
div class="segment">
<
h2>Non Physical</h2>
{exp:weblog:entries weblog="{my_weblog}" foxee_active="yes" foxee_product_type="nonphysical"}

<div class="left product-float">
{title}<br />

{if foxee_is_on_sale}
<strong class="sale">On Sale{foxee_saleprice}</strong>
{if:else}
{foxee_price}
{
/if}

<br />
{exp:foxee:addtocart id="{entry_id}" method="form" class="test"}<br />

{if no_results}
<p>There are no physical items</p>
{/if}
</div>

{/exp:weblog:entries}
<div class="clear"></div>
</
div>


<!-- ************************ 
Physical ******************************* -->

<
div class="segment">
<
h2>Physical</h2>
{exp:weblog:entries weblog="{my_weblog}" foxee_active="yes" foxee_product_type="physical"}

<div class="left product-float">
{title}<br />

{if foxee_is_on_sale}
<strong class="sale">On Sale{foxee_saleprice}</strong>
{if:else}
{foxee_price}
{
/if}

<br />
{exp:foxee:addtocart id="{entry_id}" method="form" class="test"}<br />

{if no_results}
<p>There are no physical items</p>
{/if}
</div>

{/exp:weblog:entries}
<div class="clear"></div>
</
div>

<!-- *************************** 
Downloadables *********************** -->

<
div class="segment">
<
h2>Downloadables</h2>
{exp:weblog:entries weblog="{my_weblog}" foxee_active="yes" foxee_product_type="download" }

<div class="left product-float">
{title}<br />

{if foxee_is_on_sale}
<strong>{foxee_saleprice}</strong>
{if:else}
{foxee_price}
{
/if}


<br />
{exp:foxee:addtocart id="{entry_id}" method="link" block_foxybox="yes" cart="checkout" class="test"}<br />

{if no_results}
<p>There are no downloadable items</p>
{/if}
</div>
{/exp:weblog:entries}
<div class="clear"></div>
</
div>

<!-- **************************** 
Subscriptions ********************* -->

<
div class="segment">
<
h2>Subscriptions</h2>
{exp:weblog:entries weblog="{my_weblog}" status="open|featured" foxee_active="yes" foxee_product_type="subscription" }

<div class="left product-float">
{title}<br />


{if foxee_is_on_sale}
<strong>{foxee_saleprice}</strong>
{if:else}
{foxee_price}
{
/if}


<br />
{exp:foxee:addtocart id="{entry_id}" method="form" block_foxybox="no" }<br />

{if no_results}
<p>There are no subscription products</p>
{/if}
</div>
{/exp:weblog:entries}
<div class="clear"></div>
</
div>



</
div>
</
body>
</
html

As you can see in the attachment under Transaction history “You have {classifieds_posts_left}”

Image Attachments  Screen shot 2010-05-07 at 9.49.13 AM.png
Profile
 
Posted: 07 May 2010 09:06 AM   Ignore ]   [ # 11 ]  
Newbie
Rank
Total Posts:  23
Joined  2010-03-29

Here is basically the body of the submit template.  I use ALOT of Javascript because of Tiny MCE.

<div id="classifieds">

        <
div id="wrap">
        
                  
        
       
  <
div id="adwrapper">
  <
div id="logo"></div>
  <
div id="bannerad">{embed="embeds/banner"}</div>
  <
div class="clear"></div>
  </
div>

        
        <!-- 
Content Container -->
        
        <
div id="content-container">
    <!-- 
Begin Feature Content -->
        <
div id="content">
 <
h1Classifieds</h1>



<
h2>Submit a Classified Ad</h2>


{exp:foxee_classifieds:post_form weblog="classifieds" return="classifieds/thank_you" entry_id="{segment_3}"}



<div id="saef">


<
input type="hidden" name="entry_date" value="{entry_date}" maxlength="23" size="25" /></p
<
input type="hidden" name="allow_comments" value="y" {allow_comments} />
<
input type="hidden" name='dst_enabled' value='y' {dst_enabled} />

<
table>
<
tr>
<
td>

Classified Ad Title<br />
<
input type="text" class="saef_text" name="title" id="title" value="{title}" size="50" maxlength="100">

<
p>URL Title<br /><span class="tinytext">*Do NOT Edit This</span>
<
input type="text" class="greyd" name="url_title" id='url_title' value="{url_title}" maxlength="75" size="50" />


</
div>

Classified Ad
<
span class="tinytext">Html OK</span></div>
<
textarea  dir='ltr'  style='width:99%;' name='field_id_53' id='field_id_53' cols='90' rows='20' class='lg_mceEditor' ></textarea>
<
div class='hidden'><input type='hidden' name='field_ft_53' value='none' /></div>

</
div>

<
p>

Publish E-mail?
<
span class="tinytext">Allow lurkers and guests to email you.  Email is encrypted in a form.</span>
<
input type="hidden" name="field_ft_52" value="none" />
<
label><input name='field_id_52' type='radio' class='radio' value='Yes' checked="checked"  />
 
Yes</label>&nbsp;&nbsp; <label><input class='radio' type='radio' name='field_id_52' value='No'  />
 
No</label>



{if textarea}
<textarea id="{field_name}" name="{field_name}" dir="{text_direction}" cols="50" rows="{rows}">{field_data}</textarea><br />
{/if}

{if textinput}
<input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50"><br />
{/if}

{if pulldown}
<select id="{field_name}" name="{field_name}">
{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}<br />
</
select>
{/if}

{if date}
<input type="text" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50"><br />
{/if}

{if relationship}
<select id="{field_name}" name="{field_name}">
{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}<br />
</
select>
{/if}

<p>

<
input type="image" src="http://www.soulstrut.com/images/submit.png" alt="Submit" name="submit" value="Submit"/>


</
td>
<
td valign="top">


</
td>
</
tr>
</
table>
</
div>


{if no_results}
<p>Please purchase a Classifieds Ad.  Pay for it <a href="{path=products/advertise}">Here</a></p>
{/if}
{
/exp:foxee_classifieds:post_form} 
Profile
 
   
 
 

Join our Mailing List