Display "On Sale" products only on a page.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ThePen
    Mini Mivite

    • Dec 2012
    • 33

    #1

    Display "On Sale" products only on a page.

    Hey Guys,

    I'm trying to figure out how to display my "on sale" products onto a page. I would like to display the products that have information inside of, my created, custom field "full price". When the custom field "full price" has a value in it, it displays the current "on sale" price on both the category page and the product page.

    Overall, I would like to create a page with a listing of products that display (just like a category display) only when the "full price" custom field has a value in it.

    My first instinct was to use some basic code below, but I couldn't figure out what the store wide products array values would be, but the code below is an example of my guess:

    Code:
    <mvt:foreach iterator="all_product" array="all_products">
    <mvt: if expr="NOT ISNULL l.settings:product:customfield_values:customfields:full_price">
    
    <div class="prodthumb">&mvt:product:thumbnail;</div>
    <div class="fullprice'>&mvt:product:customfield_values:customfields:full_price;</div>
    <div class="onsale">On Sale: &mvt:product:formatted_price;</div>
    
    </mvt:foreach>
    </mvt:if>
    If there is a better way to accomplish this or if anyone can give me any guidance on the code above; I would be extremely thankful. . . Oh and I do have the toolkit module. Thanks guys!
    Last edited by ThePen; 11-30-13, 10:43 AM.
  • Bruce - PhosphorMedia
    Developer Partner











    • Mar 2006
    • 11256

    #2
    Re: Display &quot;On Sale&quot; products only on a page.

    probably simpler to just use an On Sale category...and much faster display wise too...and you don't need to manage an additional display template.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment

    Working...
    X