Announcement

Collapse
No announcement yet.

Oddity In Product Attribute Template - For Subscriptions

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

  • Oddity In Product Attribute Template - For Subscriptions

    Working on adding template code for subscriptions. The user guide doesn't seem to document the changes for subscription based template code, so i'm using two new installs (Iron & wool ReadyTheme) as a guide. Both have the following Template code at the end of the Product Attribute Template:

    Code:
    <input type="hidden" name="Product_Attribute_Count" value="<mvt:eval expr="miva_array_elements(l.settings:attributes)" />" id="js-product-attribute-count" />
    <mvt:if expr="l.settings:subscription:term_count">
       <mvt:if expr="NOT l.settings:subscription:mandatory">
          <input type="radio" name="otps[]" id="l-otp" class="hide-subs" value="1" checked="checked" />
          <input type="radio" name="otps[]" id="l-subscribe" class="hide-subs" value="1" />
          <label for="l-otp" class="purchase-form_otps-otp uppercase align-center">One Time Purchase</label>
          <label for="l-subscribe" class="purchase-form_otps-s uppercase align-center">Subscribe</label>
          <div class="form-row" id="js-subscription">
       <mvt:else>
          <div class="form-row">
             <label for="l-Product_Subscription_Term_ID" title="&mvte:attribute:prompt;" class="medium">Subscribe</label>
       </mvt:if>
          <select name="Product_Subscription_Term_ID" id="l-Product_Subscription_Term_ID" class="input-medium">
             <mvt:if expr="NOT l.settings:subscription:mandatory">
                <option value="0">Select Subscription</option>
             </mvt:if>
    
             <mvt:foreach iterator="term" array="subscription:terms">
                <option value="&mvte:term:id;">&mvte:term:descrip;</option>
             </mvt:foreach>
          </select>
       </div>
    </mvt:if>
    Which Renders as :

    Code:
    <div id="js-product-attributes" class="column whole product-attributes">
    <input type="hidden" name="Product_Attribute_Count" value="0" id="js-product-attribute-count">
    <input type="radio" name="otps[]" id="l-otp" class="hide-subs" value="1" checked="checked">
    <input type="radio" name="otps[]" id="l-subscribe" class="hide-subs" value="1">
    <label for="l-otp" class="purchase-form_otps-otp uppercase align-center">One Time Purchase</label>
    <label for="l-subscribe" class="purchase-form_otps-s uppercase align-center">Subscribe</label>
    <div class="form-row" id="js-subscription">
    <select name="Product_Subscription_Term_ID" id="l-Product_Subscription_Term_ID" class="input-medium input">
    <option value="0">Select Subscription</option>
    <option value="5">Reorder every month</option>
    </select>
    </div>
    </div>
    Note Duplicate Radio Button.

    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

  • Nick in support reminded me of this resource:

    http://www.miva.com/mm9.6_template_changes.html

    Which does appear to not have that error. (Note however, this apparent error is on the current Iron & Wool ReadyTheme download )
    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


    • Hi Bruce,

      Many of the ReadyTheme layouts for the subscriptions contain additional CSS to make the radio buttons act as tabs for your options, as seen in the Iron & Wool ReadyTheme [ http://ironwool.mivamerchantdev.com/...t-product.html ].
      Matt Zimmermann
      Director of UI/UX Standards and Theme Development
      / Miva, Inc.

      Comment

      Working...
      X

      This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

      This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

      Accept