jen
5/17/2017 - 6:50 PM

gd_ratings_bottom_pagination.js

<div class="gd-reviews-pagination gd-reviews-pagination-bottom">
    <div class="gd-reviews-pagination-total">
        &mvt:product:gd_ratings:total; Total Reviews
    </div>
    <ul class="gd-reviews-pagination-nav">
        <mvt:if expr="NOT ISNULL l.settings:product:gd_ratings:pagination:previous">
            <li>
                <a href="&mvt:global:sessionurl;Screen=PROD&amp;Product_Code=&mvte:product:code;&amp;GD_Ratings:Sort=&mvte:global:GD_Ratings:Sort;&amp;GD_Ratings:Offset=&mvt:product:gd_ratings:pagination:previous;">
                    &laquo;
                </a>
            </li>
        </mvt:if>
        <mvt:foreach iterator="offset" array="product:gd_ratings:pagination:offsets">
            <mvt:if expr="l.settings:offset:page EQ l.settings:product:gd_ratings:pagination:current_page">
                <li class="active">&mvt:offset:page;</li>
            <mvt:else>
                <li class="">
                    <a href="&mvt:global:sessionurl;Screen=PROD&amp;Product_Code=&mvte:product:code;&amp;GD_Ratings:Sort=&mvte:global:GD_Ratings:Sort;&amp;GD_Ratings:Offset=&mvt:offset:offset;">
                        &mvt:offset:page;
                    </a>
                </li>
            </mvt:if>
        </mvt:foreach>
        <mvt:if expr="NOT ISNULL l.settings:product:gd_ratings:pagination:next">
            <li>
                <a href="&mvt:global:sessionurl;Screen=PROD&amp;Product_Code=&mvte:product:code;&amp;GD_Ratings:Sort=&mvte:global:GD_Ratings:Sort;&amp;GD_Ratings:Offset=&mvt:product:gd_ratings:pagination:next;">
                    &raquo;
                </a>
            </li>
        </mvt:if>
    </ul>
    <div class="gd-reviews-pagination-sort">
        <form action="&mvt:global:sessionurl;">
            <input type="hidden" name="Screen" value="PROD" />
            <input type="hidden" name="Product_Code" value="&mvte:product:code;" />
            <input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;" />
            <select name="GD_Ratings:Sort">
                <mvt:if expr="g.GD_Ratings:Sort EQ 'newest'">
                    <option value="newest" selected="selected">Newest</option>
                <mvt:else>
                    <option value="newest">Newest</option>
                </mvt:if>
                <mvt:if expr="g.GD_Ratings:Sort EQ 'oldest'">
                    <option value="oldest" selected="selected">Oldest</option>
                <mvt:else>
                    <option value="oldest">Oldest</option>
                </mvt:if>
                <mvt:if expr="g.GD_Ratings:Sort EQ 'highest'">
                    <option value="highest" selected="selected">Highest Rated</option>
                <mvt:else>
                    <option value="highest">Highest Rated</option>
                </mvt:if>
                <mvt:if expr="g.GD_Ratings:Sort EQ 'lowest'">
                    <option value="lowest" selected="selected">Lowest Rated</option>
                <mvt:else>
                    <option value="lowest">Lowest Rated</option>
                </mvt:if>
            </select>
            <button type="submit">GO</button>
        </form>
    </div>
</div>