Announcement

Collapse
No announcement yet.

Content Section Not Showing up on Product Page

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

    Content Section Not Showing up on Product Page

    Sorry about this really rookie question, but I googled all over and I can't see what I'm doing wrong.

    I am working in a development environment, so I unfortunately can't provide you a URL. But here is a similar page: https://www.harpkit.com/reverie-harp-2-wbag.html

    1) I made a new content section here: Home > ReadyTheme > Content Sections > "warranty" (See screen shot for how it's configured.) Yes, the "activate" toggle is on.

    2) Miva helpfully provides me with an bit of code to paste where I want this content section to appear. <mvt:item name="readytheme" param="contentsection( 'warranty' )" />

    3) I want this warranty to appear on the Reverie harp page in the product description area. So I navigate to that item in the catalog. Home > Catalog > Products > Edit Product: Reverie Harp 2 w/Bag > Product

    4) I find the spot in the description where I want to put this warranty, and paste in the Miva item code.

    5) click update

    6) go to the customer-facing page and I see the "mvt:item" code in the "view source" but it is not rendering properly.

    Seems like it SHOULD be really straightforward, but I just cannot seem to figure out why it's not turning into the code that I put in the content section instead.

    #2
    The product description can't execute Miva template code so the item you're pasting in will not render. The better way to do it would be to add the item tag to the PROD page if it can appear on all products, or if it is product specific use a custom product field instead. https://docs.miva.com/template-langu...product-fields

    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Ah perfect! ok, I see. I had looked at the PROD page, but I was mystified as to where to put it--when I realized that I needed to keep scrolling down much farther to see the more granular page structure. (I had only scrolled to the <head><body> part.)

      Haven't tried to monkey with the custom field too much, but I think I will need to learn more about those too. I will report back. :)

      Comment


        #4
        Ok, so:

        1) I see the custom field. I made a new one here: Home > Utility Settings > Custom Fields > warranty
        2) I configured it like so (screen shot)
        3) I also see in the product where that checkbox is showing up. Home > Catalog > Products > Edit Product: Reverie Harp 2 w/Bag > Product Specifications > Warranty checkbox present!

        But... there's something missing.

        1) Where do I tell Miva WHAT to display when the checkbox is checked?
        2) Where do I tell Miva WHERE to display that content if the checkbox is checked?
        Attached Files

        Comment


          #5
          This video I found was promising, but not quite what I'm trying to do. (And besides, even when I followed the instructions, even a simple line did NOT appear on my PDP.) https://www.youtube.com/watch?v=-NFVUzcj7dY

          My warranty will look like my attachment--it's a pre-built block of HTML that I want to turn on when that particular item is covered under a warranty, or be invisible when it isn't covered.

          Comment


            #6
            On the PROD page template you'll need to add some template code to check and see if the checkbox is checked. This would look like this:

            Code:
            <mvt:item name="customfields" param="Read_Product_Code( l.settings:product:code, 'warranty', g.warranty )" />
            <mvt:if expr="g.warranty EQ 1">
             Display HTML Here
            </mvt:if>
            Brennan Heyde
            VP Product
            Miva, Inc.
            [email protected]
            https://www.miva.com

            Comment


              #7
              Brennan, Thank you VERY much for your help. That did the trick exactly!!!

              Comment


                #8
                I just wanted to add one more thing that I discovered in case someone else comes along wanting to know how to do this. If you want to use radio buttons as your custom field (For example you have a different warranty for a kit vs. a finished version of the product) you'd select "radio" and name your values "kit-warranty" and "finished-warranty" and set it up like this:

                Code:
                <mvt:item name="customfields" param="Read_Product_Code( l.settings:product:code, 'warranty', g.warranty )" />
                <mvt:if expr="g.warranty EQ 'kit-warranty'">  
                Display HTML Here
                </mvt:if>
                
                <mvt:item name="customfields" param="Read_Product_Code( l.settings:product:code, 'warranty', g.warranty )" />  
                <mvt:if expr="g.warranty EQ 'finished-warranty'">  
                Display HTML Here  
                </mvt:if>
                Very cool!

                Comment

                Working...
                X