Categories

productLastViewed()

Categories: UI

.productLastViewed( [ options ] )

Subclass: de_epages.

Plugin: de_epages.catalog.ui.productLastViewed

Description: Add a list of last viewed products.

  • .productLastViewed( [ options ] )

    version added: 6.11.0

    options   A map of additional options pass to the method.

The .productLastViewed() method append a list of last viewed products to each element in the set of matched elements.

This method depends on a storage controller in defined as Menu in the SF PageType named Script-ProductLastViewed.

  • Perform an ajax request.

    HTML:
    <div id="lastProducts">
    </div>
    
    Code:
    de_epages('#lastProducts')
        .productLastViewed({
            maxItems: 3
        });
    
    Results:
    <div id="lastProducts">
      <ul class="de_epages-catalogUiProductLastViewed">
        <li>
          <a href="?ObjectPath=/Example1..."><img src="/Webroot...example1...image.jpg" />Example 1</a>
        </li>
        <li>
          <a href="?ObjectPath=/Example2..."><img src="/Webroot...example2...image.jpg" />Example 2</a>
        </li>
        <li>
          <a href="?ObjectPath=/Example3..."><img src="/Webroot...example3...image.jpg" />Example 3</a>
        </li>
      </ul>
    </div>
    
    
  • maxItems

    version added: 6.11.2

    A number between 1 and 10 to indicate the count of maximum displayed products.

    Default: 5