Announcement

Collapse
No announcement yet.

Attribute Template code on PATR page

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

    Attribute Template code on PATR page

    I have highly customized attribute code on a number of items in my store, and after some time realized today that the PATR page (missing required attributes) is lacking in content as a result.

    After looking at the original code on the Product Display page, PROD, and the PATR page, they are only slightly different.
    I compared them line by line, and the only difference I see is that the price information is missing on the PATR page, as well as the table header. In my code I have added the attribute data that makes the attribute table useful, like words in an extra column for example. I have other more complex ones, but they all have a default option, so they would never hit the PATR page, although I would add them as well in case we choose to remove the default (some customers don't pay attention to the default).

    It looks like I could just copy my customized PROD attribute code to the PATR so that customers are presented with ALL the applicable attribute data, just as it appears on the PROD page. Is this a safe assumption?

    Here is the PROD page, simply click add to basket and you'll see the difference.

    #2
    Re: Attribute Template code on PATR page

    Originally posted by jleiii View Post
    I have highly customized attribute code on a number of items in my store, and after some time realized today that the PATR page (missing required attributes) is lacking in content as a result.

    After looking at the original code on the Product Display page, PROD, and the PATR page, they are only slightly different.
    I compared them line by line, and the only difference I see is that the price information is missing on the PATR page, as well as the table header. In my code I have added the attribute data that makes the attribute table useful, like words in an extra column for example. I have other more complex ones, but they all have a default option, so they would never hit the PATR page, although I would add them as well in case we choose to remove the default (some customers don't pay attention to the default).

    It looks like I could just copy my customized PROD attribute code to the PATR so that customers are presented with ALL the applicable attribute data, just as it appears on the PROD page. Is this a safe assumption?

    Here is the PROD page, simply click add to basket and you'll see the difference.
    It may work. Give it a try - you can always roll it back.
    Best,
    Pamela

    Consultant / Developer / Trainer
    Contributing Editor to Practical Ecommerce
    Author of the Official Guides for Miva Merchant
    pamelahazelton.com

    Comment


      #3
      Re: Attribute Template code on PATR page

      Pamela, Thanks. That's the obvious answer, but I don't like testing on my live store without some level of comfort.
      After all the scrutiny I did before the post I reached a 95% comfort level that I won't break anything, but was hoping someone that had actually updated the attribute code on the PATR page would reply.
      I don't understand why the default attribute code would be different between the 2 pages out of the box to start with. Makes no sense.
      John

      Comment


        #4
        Re: Attribute Template code on PATR page

        I was able to copy my customized attribute template code from the PROD page to the PATR page, and continue to find default code on these pages to be different, such as the cattree area, but that's a minor issue.
        Now I can't find where this "messages" defined. I assume it's context dependent, as there are 3 other messages defined on the PATR page, but not this one.

        Code:
        <mvt:item name="fonts" param="body_font">
        <mvt:item name="messages" />
        Here is the generated code. Poor use of <b> too....

        Code:
        <font face="Arial, Helvetica" size="-1" color="#800000">
        <font color="red">
        <b>
        Attributes in <b>bold</b> are required.<br>
        </b>
        I could simply delete/comment the code and substitute my own hard coded message, but that could cause the other 3 messages to be missing. I don't currently use anything but radio buttons, so I can't validate the impact on other types.

        Comment


          #5
          Re: Attribute Template code on PATR page

          I've got a similar problem, but mine is related to the Iron & Wool ReadyTheme. On the PROD page if an attribute is not selected and the shopper clicks the Add to Cart button, this message appears in a warning box




          Attributes in <span class="bold">bold</span> are required. One - I want to fix what ever is causing it to display the span tag and two - I want to know what is used to generate the message. I'm not seeing a token of any sort for it. I do know that the actual error message can be found in the User Interface > Error Messages
          Last edited by lesliekirk; 12-23-15, 05:19 AM.
          Leslie Kirk
          Miva Certified Developer
          Miva Merchant Specialist since 1997
          Previously of Webs Your Way
          (aka Leslie Nord leslienord)

          Email me: [email protected]
          www.lesliekirk.com

          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

          Comment


            #6
            Re: Attribute Template code on PATR page

            That functionality is controlled by the Ajax add to cart in /js/scripts.js Look for this function: function addToCart ()

            Here is an overview of what it does:

            - Tries to add product to cart
            - If the response page is PATR (missing product attributes), PLMT (product limited stock) or POUT (product out of stock) this means the add to cart was not successful and display the appropiate message

            These messages are controlled in the JavaScript in that addToCart function.

            As for the formatting, it should be rendering the HTML. If you can send me a link to the site I can see what is going on.
            Brennan Heyde
            VP Product
            Miva, Inc.
            [email protected]
            https://www.miva.com

            Comment

            Working...
            X