Announcement

Collapse
No announcement yet.

Array For Each Custom Product Field on CTGY page

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

    Array For Each Custom Product Field on CTGY page

    I have been trying this for hours.

    I want to array (non repeat) Custom Product Fields on CTGY page. They would be sub products of that category

    I would like to display in either drop down menu or bullet list.

    None of the example codes I have found have worked

    Yes the custom field is assigned to CTGY page

    I have power search and toolkit

    #2
    Not sure what you are trying to achieve, but custom product fields are only natively available in a product page, when they are evaluate within the Category_Product_Listng template AND they are selected from the list of custom fields that appears below that template in the admin. You CAN use:

    <mvt:item name="customfields" param="Read_Product_Code( 'product_code', 'custom_field_code', l.settings:customfields )" />
    <mvt:item name="customfields" param="Read_Product_ID( 1, 'custom_field_code', l.settings:customfields )" />

    Outside of the Product_listing template but you'd have to explicitly call each one.
    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
      I am just trying to create a list on each "different" custom fields
      Example

      custom field name "shirtcolor"

      Red
      Blue
      Green
      White
      Black

      Just need to create the list. (array) on CTGY page

      Comment


        #4
        Field, are you trying to add a searching or filtering function to your page, so that customers can view, for instance, only the Green shirts?
        Kent Multer
        Magic Metal Productions
        http://TheMagicM.com
        * Web developer/designer
        * E-commerce and Miva
        * Author, The Official Miva Web Scripting Book -- available on-line:
        http://www.amazon.com/exec/obidos/IS...icmetalproducA

        Comment


          #5
          Yes I am trying to configure facet search withing the CTGY page.

          If i can get all custom fields options to array, I can handle the rest.

          Comment


            #6
            That's not a trivial operation. You would need to write an SQL query that can retrieve all the different values assigned to products in the category, followed by an mvt:foreach loop to display them. And that's just to create the menu. To actually filter the displayed products, so that only the selected color is displayed, you're going to need more code.

            I've written some custom search modules that have this functionality built-in. They can be used on the Category pages, as well as for search results. If you're interested in this, you can drop me a line by email to discuss the details.

            Thanks --
            Kent Multer
            Magic Metal Productions
            http://TheMagicM.com
            * Web developer/designer
            * E-commerce and Miva
            * Author, The Official Miva Web Scripting Book -- available on-line:
            http://www.amazon.com/exec/obidos/IS...icmetalproducA

            Comment

            Working...
            X