Managing Content

Overview

  • Content can be included in many different areas within BigFish.
  • Admin arrow Content
  • Content is also maintained as part of the Email Templates
  • Content can take make many forms:
    • HTML tags. All HTML tags can be used within content. References to styling within the CSS is encouraged. For example, a Static Page may look like:
      
      <h1>About Us</h1>
      <p>This is a paragraph that describes our company</p>
      
      
    • Freemarker Code (FTL) can also be included. For example, a common usage would within SI_SHOPPING_CART will determine if there is 1 item in the cart and therefore display “1 Item”, otherwise “n Items” will be displayed.
      
      <#if ${CART_ITEMS_QTY!} == 1>
         Item
      <#else>
         Items
      </#if>

Creating reusable content

  • Admin arrow Content arrow Content Library
  • BigFish has a Content Library function that allows for generic reusable content to be defined and then reused in other content areas
  • This reusable content is defined the same as any other piece of content, it can include both HTML tags and Freemarker code.
  • For example:
    • Define a reusable content spot in the Content Library called “MY_REUSABLE_CONTENT”:
    • <p>This is My-Content that sis reusable</p>
    • Include this piece of content by using the following syntax:
    • <@renderContentAsText contentId="MY_REUSABLE_CONTENT" />
    • The code snippet will render your defined content.

Updating the content example will apply to all the instances using that reference.

Including data attributes at runtime

  • Data Attributes can be:
    • System Parameters: this is to define static values that can be used within Content. For example, the system parameter EMAIL_CLNT_NAME is defined solely to be used within Content (it does not impact processing).
    • Dynamic Variables: these are resolved at runtime. For example, including the customer registration information in an email.
  • A feature of Freemarker is that data can be included in the content. For example:
    • Assume that the System Parameter EMAIL_CLNT_NAME has a value of “ACME”
    • Assume that an email template has the following content:
    • <P>Welcome to ${EMAIL_CLNT_NAME!}</p>
    • The email would be rendered as:
    • Welcome to ACME
  • In addition to System Parameters, BigFish has exposed many dynamic variables that can be included in content. For example:
    • Assume that a new customer registered. Customer entered a first name of “John” and a last name of “Smith”
    • In order to send an email we would need to know the dynamic variable, such as registered user name
    • In an email template this can be defined as:
    • <p>Dear ${LOGIN_FIRST_NAME!} ${LOGIN_LAST_NAME!},&l/p>
    • The email would be rendered as:
    • Dear John Smith,
  • Allowing empty text:
    • The “!” in the above examples allows for an “empty” value to be rendered without throwing an error

If for some reason an error should be thrown if an “empty” value is found then do not use the “!”

Content with links to BigFish functions

  • There are many times when content requires a simple link.
  • For example, in most eCommerce implementations that standard “header” will contain links for the Store Locator, My Account and other useful links.
  • The Store Locator is defined as follows:
  • <a href="<@ofbizUrl>storeLocator</@ofbizUrl>">Find a Store</a>
  • The text “Find a Store” is user managed. In other words, this could be “Store Locator” or any appropriate text for your specific implementation.
  • The tag <@ofbizUrl> is a special tag that will define the beginning of the URL in the correct format, simply reference the BigFish page (storeLocator) to complete.

Examples

Static Page with Downloadable Form

  • Upload the form into the Media Library
    • Admin Content Media Library
    • Click on the “Add” button
    • Browse for the asset on your file system and “Upload”

When you return to the List Screen, search for the added form by typing in the first few letters and clicking on the Search button. When you see the form in the list, hover over the “?” helper button, it will display the full BigFish path that should be used in a later step.

E.g. /osafe_theme/images/user_content/document/form.pdf

  • Create a Static Page
    • Admin Content Static Pages
    • Name your page, example SP_REGISTRATION
    • Create your content as appropriate
    • Part of your content will reference the form loaded above, example:
<p>
  <a href="/osafe_theme/images/user_content/document/form.pdf">
  Download Registration Form</a>
</p>
  • Reference the newly created Static Page in a piece of content that is displayed within your eCommerce site
    • Assume this is referenced from a Site Footer link
    • Admin Content Site Info Footer Links
    • Add a link to your Footer content
<a> href="<@ofbizUrl>eCommerceContent?contentId=SP_REGISTRATION</@ofbizUrl>">Registration</a>

Dynamic Data Attributes

System Parameters

  • Some of the BigFish system parameters are defined specifically for inclusion into content (the values have no impact on processing or functionality)
Variable Name Description
EMAIL_CLNT_NAME A standard parameter that should contain the full client name. Used throughout email templates. For example: “Thank you for shopping with ${EMAIL_CLNT_NAME}”
HTTP_HOST  
HTTPS_HOST  

Dynamic Variables: Login / Customer

  • The login information variables are most typically used in Email Templates.
  • For example, the new customer email, template E_NEW_CUSTOMER, would typically note to the customer that their email address is to be used as their login user. The email would further note the actual email address for confirmation.
  • First and Last names would most typically be used in Emails as a standard “Dear John Smith”
Variable Name Description
LOGIN_EMAIL  
LOGIN_FIRST_NAME  
LOGIN_LAST_NAME  

Dynamic Variables: Product

  • The product information variables are the most widely used within general content
  • For example, as a PDP Facebook share:
Variable Name Description
PRODUCT_ID  
PRODUCT_NAME  
PRODUCT_DESCRIPTION  
PRODUCT_LIST_PRICE  

Dynamic Variables: Product Category

  • Category Information
Variable Name Description
CATEGORY_ID  
CATEGORY_NAME  

Dynamic Variables: Shopping Cart

  • Typical Usage
    • Pixel Tracking
  • For example, assume that an Shopping Cart has the following:
Product Price Offer-Price Qty Total
Product A $12 $10 2 $20.00
Product B $15 $15 1 $15.00
         
      Cart Sub Total: $35.00
      Promo “DISC10”: -$3.50
      Shipping: $6.95
      Tax: $2.50
      CART TOTAL: $40.95
  • Shopping Cart dynamic variables
Variable Name Description
CART_SIZE The total numbers of line-items. Used for looping logic when required to set the upper boundary. In the above example this would be 2.
CART_ITEMS_QTY The total number of items purchased. In the above example this would be 3.
CART_ITEMS_MONEY The monetary value for all items purchased. In the above example this would be $35.00.
CART_TOTAL_PROMO The total adjustment made for Promotions. In the above example this would be -$3.50
CART_TOTAL_SHIP The total shipping charge. In the above example this would be $6.95.
CART_TOTAL_TAX The total taxes applied. In the above example this would be $2.50
CART_TOTAL_MONEY The total to be charged to the customer. In the above example this would be $40.95

Dynamic Variables: Order Summary and Order Confirmation

  • Within the Order Summary and Order Confirmation page, the ORDER_xxx dynamic variables should be used.
  • These are similar to the Shopping Cart variables:
Variable Name Description
ORDER_SIZE The total numbers of line-items. Used for looping logic when required to set the upper boundary. In the above example this would be 2.
ORDER_ITEMS_QTY The total number of items purchased. In the above example this would be 3.
ORDER_ITEMS_MONEY The monetary value for all items purchased. In the above example this would be $35.00.
ORDER_TOTAL_PROMO The total adjustment made for Promotions. In the above example this would be -$3.50
ORDER_TOTAL_SHIP The total shipping charge. In the above example this would be $6.95.
ORDER_TOTAL_TAX The total taxes applied. In the above example this would be $2.50
ORDER_TOTAL_MONEY The total to be charged to the customer. In the above example this would be $40.95
  • The following additional variables are also available, used primarily in building email templates:
    • ORDER_HELPER
    • ORDER_HEADER
    • ORDER_ID
    • ORDER_SUB_TOTAL
    • ORDER_SHIP_TOTAL
    • ORDER_TAX_TOTAL
    • ORDER_TOTAL
    • ORDER_ITEMS
    • ORDER_ADJUSTMENTS
    • ORDER_SHIP_ADDRESS
    • ORDER_BILL_ADDRESS
    • ORDER_PAYMENTS
    • ORDER_PAY_PREFERENCES
    • ORDER_PAYMENT_TYPE
    • ORDER_SHIPPING_INFO
    • ORDER_ITEM_SHIP_GROUP
    • ORDER_CURRENCY

Dynamic Variable: Email

  • As noted above, all dynamic variables are available for email templates.
  • Specific variables that are targeted for emails are as follows:
Variable Name Description
PRODUCT_STORE_ID  
USER_LOGIN User Login Entity
USER_LOGIN_ID User Login Id
EMAIL_MESSAGE The text that was entered into a comment box, currently used on the email test.
PARTY_ID The party id in context; for example on Order Confirmation email the party id associated to the order will be in context.
FIRST_NAME Person Entity
LAST_NAME Person Entity
MIDDLE_NAME Person Entity
NICKNAME Person Entity
LOGIN_EMAIL Email Address (User Login Id ) of logged in user
  • For the Scheduled Job Alert Email:
Variable Name Description
SCHED_JOB_NAME The name of a scheduled job
SCHED_JOB_STATUS Indicator of success or failure
SCHED_JOB_INFO General message info, typically an error message

Dynamic Variables: Technical

  • Technical Information:
Variable Name Description
REQUEST_URL  
			
<a target="facebook" 

    href="http://www.facebook.com/sharer/sharer.php?
    u=${HTTPS_HOST!}${REQUEST_URL!}">
    
    <img src="/osafe_theme/images/user_content/images/fb.gif">

</a>
Back to Top

Built by Solveda