Weblog Entries Tag

Use our Forums to find examples and answers to your questions. If you have advanced requirements for your project, contact us and our staff can help you find a solution.

hccdevelopment

Weblog Entries Tag

Name: weblog:entries

FoxEE extends the weblog:entries tag with several parameters, conditionals and variables to display your products in your templates.

{exp:weblog:entries weblog="products" foxee_featured="yes" foxee_category="DEFAULT"

Parameters

number_format="2" 

Default: 2

Description: Set the number formatting for Prices

Required: No

Options: None

foxee_active="yes" 

Default: yes

Description: Only include active foxee products

Required: yes - in order to use the featured conditionals for your product entries, you must use this parameter

Options: yes|no

foxee_featured="yes" 

Default: no

Description: Get only the featured products

Required: no

Options: yes|no

foxee_is_onsale="yes" 

Default: no

Description: Get only the products on sale.

Required: no

Options: yes|no

foxee_product_code="1" 

Default:

Description: The specific product codes you want to process

Required: no

Options: 1|2|6

foxee_product_type="physical" 

Default: all

Description: Process only specific product types

Required: no

Options: all | subscription | physical | nonphysical | download | donation

foxee_category="default" 

Default:

Description: Process only specific FoxyCart categories

Required: no

Options:

foxee_has_inventory="yes" 

Default:

Description:Process only products with an inventory if set to "yes" or without an inventory if set to "no".

Required: no

Options: yes or no

Conditionals

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

foxee_is_item_active 

Description: TRUE if the product is active; FALSE if not

foxee_is_on_sale 

Description: TRUE if the product is on sale; FALSE if not

foxee_has_inventory 

Description: TRUE if there is more than 0 inventory available; FALSE if not

foxee_is_downloadable 

Description: TRUE if the product is a download; FALSE if not

foxee_is_subscription 

Description: TRUE if the product is a subscription; FALSE if not

foxee_is_featured 

Description: TRUE if this is a featured product; FALSE if not

foxee_category 

Description: This is set to the FoxyCart category to which the product is set

foxee_is_donation 

Description: TRUE if the product is a donation; FALSE if not

foxee_is_physical 

Description: TRUE if the product is a physical (shipping); FALSE if not

foxee_is_subscription_active 

Description: TRUE if the logged in member is in the subscription product about to be displayed in the entry loop; FALSE if not

related_items 

Description: TRUE if there are related items to display; FALSE if not

foxee_sub_is_recurring 

Description: TRUE if the product is a subscription with a recurring payment; FALSE if not

foxee_sub_is_onetime 

Description: TRUE if the product is a subscription with a one time payment; FALSE if not

foxee_pricing_options 

Description: TRUE if the product has pricing options to display; FALSE if not

Variables

FoxEE adds the follow variables to the weblog:entries tag

foxee_price 

Description: The price of the product

foxee_saleprice 

Description: The sale price of the product

foxee_weight 

Description: The weight of the product

foxee_inventory 

Description: The inventory count of the product

foxee_category 

Description: The FoxyCart category of the product

foxee_donation_min 

Description: The formatted donation minimum without the currency symbol.

foxee_donation_max 

Description: The formatted donation maximum without the currency symbol.

foxee_sub_trial_days 

Description: The number of days set for free trial days on the subscription settings.

foxee_sub_expire 

Description: The expiration date set for the subscription.

foxee_sub_expire_title 

Description: The expiration title set for the subscription. This is what the selector labels display in the publish form under the Foxee subscription settings.

foxee_sub_frequency 

Description: The date when the first recurring payment will be charged set for the subscription.

foxee_sub_frequency_title 

Description: The date title when the first recurring payment will be charged set for the subscription. This is what the selector labels display in the publish form under the Foxee subscription settings.

Variable Pair foxee_pricing_options select variable pair

foxee_pricing_options 

Description: Use this variable pair to display the Pricing Options set to the product.
Variables/Conditionals

field_label 

Description: The label of the pricing option

field_name 

Description: The short name of the pricing option. Use this for field names.

foxee_option_value 

Description: The value of the option

foxee_option_name 

Description: The name of the option

foxee_option_inventory 

Description: The inventory of the option.

Example:

{exp:weblog:entries weblog="products" foxee_active="yes" number_format="0"}
{title} 
{if foxee_is_on_sale}
<strong>{foxee_saleprice}</strong>
{if:else}
{foxee_price}
{
/if}
<br />

{if foxee_is_subscription}
{if is_subscription_active}
    You already belong to this Subscription
Would you like to <a href="{foxee_cancel_subscription}" title="Click to cancel this subscription">cancel</ayour subscription?<br />
{if:else}
    Subscription Details
:<br />
    
Expires{foxee_sub_expire format="%Y-%m-%d"}<br />
    
{if foxee_sub_frequency}
    First Recurring Charge Date
{foxee_sub_frequency format="%Y-%m-%d"}<br />
    
Frequency of Charges{foxee_sub_frequency_title}<br />
    
{/if}
{
/if}
{
/if}

{if foxee_pricing_options}
{foxee_pricing_options}
{field_label}
<ul>
{foxee_options}
<li>{foxee_option_label} {if foxee_option_inventory == "0"Out of Stock{/if}</option>
{/foxee_options}
</ul>
{/foxee_pricing_options}
{
/if}

{exp
:foxee:addtocart id="{entry_id}" block_foxybox="yes"}<br />
{/exp:weblog:entries} 

Dynamic Variables and Conditionals

New dynamic variables and conditionals have been added for pricing option value inventories for products. A dynamic variable and a corresponding conditional is now created for pricing option value inventories set for the product within the entries loop. They use the following naming convention:

{foxee_"pricing option name"_"pricing option value field name"_inventory}
{foxee_
"pricing option name"_"pricing option value field name"_sold} 

In the above example you'll see how these dynamic variables are named. "pricing option name" is the name of the pricing option set to the product and "pricing option value field name" is the specific value in the pricing option that you want to see the inventory of.

Example pricing option inventory usage
Pricing option name "size":

  • Large
  • Medium
  • Small
Large {foxee_size_large_inventory}<br />
{if foxee_size_large_inventory == 0}
    Large out of stock
.
{/if}
<br />

Medium {foxee_size_medium_inventory}
{if foxee_size_medium_inventory 
== 0}
    Medium out of stock
.
{/if}
<br />

Small {foxee_size_small_inventory}
{if foxee_size_small_inventory 
== 0}
    Small out of stock
.
{/if}
<br /> 

Also, the "pricing option value field name" is stripped of any non-alphanumeric characters and spaces are replaced by '_'. So if there was a value for size like "testing the value' field-name" the variable and conditional would be the following:

{foxee_size_testing_the_value_field-name_inventory} 


Join our Mailing List