Announcement

Collapse
No announcement yet.

Create a list of all products that begin with the letter A?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Create a list of all products that begin with the letter A?

    Hello,

    I am trying to figure out how I would loop through all my products and only show the ones that begin with a specific letter? Or even make a loop that only .lists letter A through E. I'm not sure how to do this and didn't have much luck searching for it.

    I did find g.first_character, but I haven't quite grasped how to pull this off.

    Thanks,

    #2
    Probably using the miva_array_search function: (from docs.miva.com)
    ag / Description

    miva_array_search( array var, offset, element var, filter_expr ) <mvt:assign name="g.return_value" value="miva_array_search( array var, offset, element var, filter_expr )" />
    Performs an sequential search in "array", starting at "offset". Comparison is made by evaluating "filter_expr" for each element. This allows you to specify the comparison type.

    you'd want the filter to be g.first_character EQ 'A' or whatever.
    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


      #3
      Thank you Bruce. I will give this a try.

      Comment

      Working...
      X