Announcement

Collapse
No announcement yet.

Product Attribute Count is empty

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

    Product Attribute Count is empty

    I'm trying to figure out why this token from the Product Attribute Template layout is rendering "empty".
    Code:
    <input type="hidden" name="Product_Attribute_Count" value="&mvte:global:Product_Attribute_Count;">
    it displays on the product page as

    Code:
    <input type="hidden" name="Product_Attribute_Count" value=" ">
    which of course causes adding the product to the basket impossible - sends you to the PATR screen and keeps looping from there.

    I even tried copying the code for the field from another store thinking it may have been missing something. Everything seems to be okay until that hidden field.

    Leslie
    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

    #2
    Re: Product Attribute Count is empty

    The g.Product_Attribute_Count variable was removed in PR7. The software now does a count of the g.Product_Attributes variable itself instead of relying on that field being submitted.

    If you still need to access the product attribute count, you could use the new store morph features with the following line within the Product Attribute template (engine version 5.19 and newer):

    Code:
    <mvt:eval expr="miva_array_elements( l.settings:attributes )" />
    or
    Code:
    <mvt:assign name="g.Product_Attribute_Count" value="miva_array_elements( l.settings:attributes )" />
    Regards,

    Preston Brynie
    Preston Brynie
    Software Developer
    Miva Merchant
    http://www.mivamerchant.com/

    Comment


      #3
      Re: Product Attribute Count is empty

      Hi Leslie: We use the toolkit attr function to determine if there are product attributes.
      <mvt:item name="toolkit" param="attr|attr_count|l.all_settings:product:id" />
      Larry
      Larry
      Luce Kanun Web Design
      www.facebook.com/wajake41
      www.plus.google.com/116415026668025242914/posts?hl=en


      Comment

      Working...
      X