|
|
{FIELD-WISH-LIST-SELECT} |
Updated: 05/30/2013 |
The {FIELD-WISH-LIST-SELECT} QuickCode Tag may be used to within the product template (product.tpl) to create a dropdown menu of the current customer's wish lists. The dropdown menu is intended for use in an HTML form that will allow the customer to add the current product to an existing wish list. |
Requirements / Prerequisites |
The {FIELD-WISH-LIST-SELECT} QuickCode Tag is compatible with the product template (product.tpl). Unlike most of the wish list QuickCode Tags, {FIELD-WISH-LIST-SELECT} is not designed for use in the wish list template (wish_list.tpl).
The {FIELD-WISH-LIST-SELECT} QuickCode Tag must placed within a properly formatted HTML form, and the form must include a submit button, in order for the dropdown menu it creates to function correctly. The form must also contain {FIELD-PRODUCT-QUANTITY}, for the customer to specify how many units of the product to add to the wish list.
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 |
- Add the following code to the product template:
Example<h3>{PRODUCT-NAME}</h3><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}
<div style="border:2px solid gray;padding:15px;width:500px;">
<!-- 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}
<strong>Add {PRODUCT-NAME} to a wish list...</strong><br />
<div style="border:1px dashed black;padding:5px;width:auto;">
<!--Add this product to a wish list using a form: -->
<form name="add_to_wish_list_form" method="post" action="{THIS-PAGE}">
Wish List: {FIELD-WISH-LIST-SELECT}<br />
Quantity: {FIELD-PRODUCT-QUANTITY}<br />
<input type="submit" name="submit_add_to_wish_list" value="Add To Wish List" />
</form>
</div>
<!-- Show the content between ELSE and IF-WISH-LIST-END only if the customer does not yet have any wish lists. -->
{ELSE}
You do not yet have any wish lists. Wish lists may be created and edited on the <a href="{URL-STORE-HOME}wish_list.php">wish list page</a>.
<!-- 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.
<!-- End of content to show/hide based on whether a customer is logged in. -->
{IF-CUSTOMER-LOGGED-IN-END}
</div>
<!-- End of content to show/hide based on whether the store's Wish List Module is enabled. -->
{IF-USING-WISH-LISTS-END}
- On the "Stainless Steel Coffee Flask" product page, if the store's Wish List Module is enabled -AND- wish lists are enabled for the "Stainless Steel Coffee Flask" product -AND- a customer is currently logged in -AND- the customer has already created wish lists named "What I want for my birthday" and "What I want to buy later", the following will display:
ExampleStainless Steel Coffee Flask
- On the "Stainless Steel Coffee Flask" product page, if the store's Wish List Module is enabled -AND- wish lists are enabled for the "Stainless Steel Coffee Flask" product -AND- a customer is currently logged in -BUT- the customer does not yet have any wish lists, the following will display:
ExampleStainless Steel Coffee Flask
You do not yet have any wish lists. Wish lists may be created and edited on the wish list page.
- On the "Stainless Steel Coffee Flask" product page, if the store's Wish List Module is enabled -AND- wish lists are enabled for the "Stainless Steel Coffee Flask" product -AND- the current visitor is not logged in to a customer account, the following will display:
ExampleStainless Steel Coffee Flask
Login or create an account to create and edit wish lists.
- On the "Stainless Steel Coffee Flask" product page, if the store's Wish List Module is not enabled -OR- wish lists are note enabled for the "Stainless Steel Coffee Flask" product, the following will display:
Example Stainless Steel Coffee Flask
|
|
Source Code |
Source Code Updated: |
LOG IN TO ADD COMMENTS
|