2017 © Pedro Peláez
 

thelia-module wishlist-module

image

thelia/wishlist-module

  • Monday, February 26, 2018
  • by thelia
  • Repository
  • 4 Watchers
  • 3 Stars
  • 107 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 9 Versions
  • 10 % Grown

The README.md

Module Wish List Thelia 2

This module allows you to create a wish list containing your favorite products., (*1)

How to install

This module must be into your modules/ directory (thelia/local/modules/)., (*2)

You can download the .zip file of this module or create a git submodule into your project like this :, (*3)

cd /path-to-thelia
git submodule add https://github.com/thelia-modules/WishList.git local/modules/WishList

Next, go to your Thelia admin panel for module activation., (*4)

How to use

This module is very easy to use. It provides you a new loop "wishlist" type, which will list all the products added to your wish list., (*5)

To add a product in a wish list, you must give access to a link which should be "/wishlist/add/PRODUCT_ID". To remove a product from the wish list, you must give access to a link which should be "/wishlist/remove/PRODUCT_ID". To clear all product from the wish list, you must give access to a link which should be "/wishlist/clear"., (*6)

The argument PRODUCT_ID corresponds to the product id to add or remove from your wish list., (*7)

Tow Smarty functions are availables :, (*8)

  • to verify if a product is already in wish list : {in_wishlist product_id="PRODUCT_ID"}
  • to verify if a product is realy in database wish list : {is_saved_in_wishlist product_id="PRODUCT_ID"}
{* $ID = product ID *}

{if {in_wishlist product_id="$ID"}}
    <a href="{url path="/wishlist/remove/$ID"}">{intl l="Remove from wish list"}</a>

    {loop type="auth" name="customer_info_block" role="CUSTOMER"}
        {if !{is_saved_in_wishlist product_id="$ID"}}
            <p>This product is not really in your wish list. To really add, click the button below.</p>
            <a class="btn btn-default" href="{url path="/wishlist/add/$ID"}">{intl l="Add to wish list"}</a>
        {/if}
    {/loop}
{else}
    <a href="{url path="/wishlist/add/$ID"}">{intl l="Add to wish list"}</a>
{/if}

Here is an example of using the "wishlist" loop :, (*9)

{loop name="wishlist" type="wishlist"}
    {loop name="products-in-wishlist" type="product" id="{$WISHLIST_PRODUCT_LIST}"}
        <h1>{$TITLE}</h1>
        <p>{$DESCRIPTION|truncate:100 nofilter}</p>
        <a href="{url path="/wishlist/remove/$ID"}">{intl l="Remove from wish list"}</a>
    {/loop}
{/loop}

The Versions

26/02 2018

v1.2.4

1.2.4.0

  Sources   Download

GPL-3.0+

The Requires

 

26/02 2018

dev-master

9999999-dev

  Sources   Download

GPL-3.0+

The Requires

 

23/02 2018

v1.2.3

1.2.3.0

  Sources   Download

GPL-3.0+

The Requires

 

12/12 2016

1.2.2

1.2.2.0

  Sources   Download

GPL-3.0+

The Requires

 

09/12 2016

1.2.1

1.2.1.0

  Sources   Download

GPL-3.0+

The Requires

 

09/12 2016

1.2.0

1.2.0.0

  Sources   Download

GPL-3.0+

The Requires

 

16/09 2015

1.0.0

1.0.0.0

  Sources   Download

GPL-3.0+

The Requires

 

16/09 2015

1.0.1

1.0.1.0

  Sources   Download

GPL-3.0+

The Requires

 

16/09 2015

1.1.0

1.1.0.0

  Sources   Download

GPL-3.0+

The Requires