Modular Merchant
QuickCode™ Glossary
{IF-WISH-LIST-END}
QuickCode Tag Glossary Home
See also:
Knowledge Base
Articles in this category:
{FIELD-WISH-LIST-ACCESS-CODE}

{FIELD-WISH-LIST-DELETE}

{FIELD-WISH-LIST-IS-PUBLIC}

{FIELD-WISH-LIST-ITEM-COMMENT}

{FIELD-WISH-LIST-ITEM-DELETE}

{FIELD-WISH-LIST-ITEM-EXPIRATION-DATE}

{FIELD-WISH-LIST-ITEM-PRIORITY}

{FIELD-WISH-LIST-ITEM-REMOVE-WHEN-PURCHASED}

{FIELD-WISH-LIST-NAME}

{FIELD-WISH-LIST-SELECT}

{IF-USING-WISH-LISTS-BEGIN}

{IF-USING-WISH-LISTS-END}

{IF-WISH-LIST-BEGIN}

{IF-WISH-LIST-END}

{IF-WISH-LIST-IS-PUBLIC-BEGIN}

{IF-WISH-LIST-IS-PUBLIC-END}

{IF-WISH-LIST-OWNER-BEGIN}

{IF-WISH-LIST-OWNER-END}

{URL-ADD-TO-WISH-LIST}

{URL-ADD-WISH-LIST-TO-BASKET}

{WISH-LIST-ACCESS-CODE}

{WISH-LIST-BLOCK-BEGIN}

{WISH-LIST-BLOCK-END}

{WISH-LIST-IS-PUBLIC}

{WISH-LIST-ITEM-BLOCK-BEGIN}

{WISH-LIST-ITEM-BLOCK-END}

{WISH-LIST-ITEM-COMMENT}

{WISH-LIST-ITEM-CREATE-DATE}

{WISH-LIST-ITEM-EXPIRATION-DATE}

{WISH-LIST-ITEM-PRIORITY}

{WISH-LIST-ITEM-QUANTITY}

{WISH-LIST-ITEM-REMOVE-WHEN-PURCHASED}

{WISH-LIST-ITEM-SID}

{WISH-LIST-NAME}

Wish List > {IF-WISH-LIST-END}
<< {IF-WISH-LIST-BEGIN} {IF-WISH-LIST-IS-PUBLIC-BEGIN} >>
{IF-WISH-LIST-END} Updated: 05/30/2013

The {IF-WISH-LIST-BEGIN} QuickCode Tag may be used in combination with the {IF-WISH-LIST-END} QuickCode Tag within any storefront template to show or hide content based on whether or not a wish list is available for the current shopping session.

A wish list may be available for the current shopping session if either of the following conditions are true:
 
  • the website visitor has entered the public access code corresponding to a public wish list
  • the website visitor is logged into a customer account which has at least one wish list
     
Content between {IF-WISH-LIST-BEGIN} and {IF-WISH-LIST-END} will be displayed either of the above conditions are true, or hidden if both of the above conditions are false.
 
If the {ELSE} QuickCode Tag is inserted between {IF-WISH-LIST-BEGIN} and {IF-WISH-LIST-END}, then content between {IF-WISH-LIST-BEGIN} and {ELSE} will be shown if either of the relevant conditions are true, and content between {ELSE} and {IF-WISH-LIST-END} will be shown if both of the relevant conditions are false.
Requirements / Prerequisites

The {IF-WISH-LIST-BEGIN} QuickCode Tag must be used in combination with the {IF-WISH-LIST-END} QuickCode Tag.

The {ELSE} QuickCode Tag may optionally be used between {IF-WISH-LIST-BEGIN} and {IF-WISH-LIST-END}.
 
It is recommended to always place any content related to wish lists between the {IF-USING-WISH-LISTS-BEGIN} and {IF-USING-WISH-LISTS-END} QuickCode Tags, so that the content will be shown when the store's Wish List Module is enabled, but hidden if the store's Wish List Module is disabled.
Example of Use
  1. Add the following code to a storefront template:
    Example
    Welcome to my store!<br />

    <!-- Show the content between IF-USING-WISH-LISTS-BEGIN and IF-USING-WISH-LISTS-END only if the store's Wish List Module is enabled. -->
    {IF-USING-WISH-LISTS-BEGIN}

    <!-- Show the content between IF-CUSTOMER-LOGGED-IN-BEGIN and ELSE only if a customer is currently logged in. -->
    {IF-CUSTOMER-LOGGED-IN-BEGIN}

                <!-- Show the content between IF-WISH-LIST-BEGIN and ELSE only if the customer already has a wish list. -->
    {IF-WISH-LIST-BEGIN}

    <a href="{URL-STORE-HOME}wish_list.php">Click here to view or edit your wish lists.</a><br />
                 <!-- Show the content between ELSE and IF-WISH-LIST-END only if the customer does not yet have a wish list. -->
    {ELSE}

    You do not yet have a wish list. Complete the form below to create a new wish list now...<br />
    <form action="{THIS-PAGE}" method="post" name="new_wish_list_form">
    Wish list name: {FIELD-WISH-LIST-NAME}<br />
    Is this wish list public?: {FIELD-WISH-LIST-IS-PUBLIC}<br />
    <input class="SUBMIT-BUTTON" name="submit_new_wish_list" type="submit" value="Create this Wish List" />
    </form>
    <br />

    <!-- End of content to show/hide based on whether the customer has a wish list. -->
    {IF-WISH-LIST-END}
        <!-- Show the content between ELSE and IF-CUSTOMER-LOGGED-IN-END only if a customer is not currently logged in. -->
            {ELSE}

    <a href="{URL-STORE-HOME}customer_login.php">Login</a> or <a href="{URL-STORE-HOME}customer_register.php">create an account</a> to create and edit wish lists.<br />

    <!-- End of content to show/hide based on whether a customer is logged in. -->
    {IF-CUSTOMER-LOGGED-IN-END}

    <!-- End of content to show/hide based on whether the store's Wish List Module is enabled. -->
    {IF-USING-WISH-LISTS-END}

    Thanks for shopping, please come again soon...

  2. If the store's Wish List Module is not enabled, the corresponding storefront page would display the following:
    Example
    Welcome to my store!
    Thanks for shopping, please come again soon...

     
  3. If the store's Wish List Module is enabled, and a customer is currently logged in, and the customer has a wish list -OR- has entered the public access code of a specific public wish list, the following would display:
    Example
    Welcome to my store!
    Click here to view or edit wish lists.
    Thanks for shopping, please come again soon...

     
  4. If the store's Wish List Module is enabled, and a customer is currently logged in, but the customer does not have a wish list -AND- has not entered the public access code of a specific public wish list, the following would display:
    Example
    Welcome to my store!
    You do not yet have a wish list. Complete the form below to create a new wish list now...
    Wish list name: 
    Is this wish list public?: 

    Thanks for shopping, please come again soon...

     
  5. If the store's Wish List Module is enabled, but a customer is not logged in, the following would display:
    Example
    Welcome to my store!
    Login or create an account to create and edit wish lists.
    Thanks for shopping, please come again soon...

 

Source Code Source Code Updated:
When a web page using a template that contains this QuickCode Tag is viewed in the storefront, the {IF-WISH-LIST-END} QuickCode Tag is changed into the source code below prior to the web page being displayed.
LOG IN TO ADD COMMENTS
  Copyright © 2001 - 2024 Modular Merchant™. All rights reserved.
Modular Merchant | Privacy Policy | Legal Statement | Terms of Service | Contact Us | Site Map