Snippets

Keetrax Kee Subscriptions Theme Tweak (Bootstrap 3)

Updated by Mike Martel

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
         </a>
 
         <div id="ad-explain" class="panel-collapse collapse" role="tabpanel" aria-labelledby="ad-explain-heading">
-           [%content_zone id:'Keesubscriptions-How'%][%end content_zone%]
+           [%content_zone id:'Keesubscriptions-How'%]
+           [%param if_empty%]
+                <p>Select the frequency and your items will be delivered to you as often as you prefer.</p>
+                <p>Auto Delivery isn't a contract, you are free to cancel anytime.</p>
+           [%/param%]
+           [%end content_zone%]
         </div>
 
       </div>
Updated by Mike Martel

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
   window.keesubscriptions_reload = _init_template;
 
   _init_template();
+  
+  // Reload whenever buying options is reloaded
+  (new MutationObserver(_init_template)).observe(document.getElementById('_jstl__buying_options_r'), { attributes: false, childList: true, subtree: true });
 
   document.addEventListener('click', function (event) {
 
Updated by Fairnia

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
         </a>
 
         <div id="ad-explain" class="panel-collapse collapse" role="tabpanel" aria-labelledby="ad-explain-heading">
-          <p>Select the frequency and your items will be delivered to you as often as you prefer.</p>
-          <p>Auto Delivery isn't a contract, you are free to cancel anytime.</p>
+           [%content_zone id:'Keesubscriptions-How'%][%end content_zone%]
         </div>
 
       </div>
Updated by Mike Martel

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
     </div>
   </div>
   <span id="keesubscriptions-data"
-    data-rrp="[%trim%][@retail@][%/trim%]"
+    data-rrp="[%trim%][%if [@retail@]%][@retail@][%else%][@store_price@][%/if%][%/trim%]"
     data-storeprice="[%trim%][@store_price@][%/trim%]"
     data-productprice="[%trim%][%if [@inpromo@]%][@promo_price@][%else%][@store_price@][%/if%][%/trim%]"
     />
 
     // Set the prices in the box
     var adPriceEl = document.querySelector(".ad-price");
-    adPriceEl.innerHTML = '$'+adPrice;
+    if ( adPriceEl ) {
+      adPriceEl.innerHTML = '$'+adPrice;
+    }
 
     // Set the discounts in the select dropdown
     var foundMax = false;
Updated by Fairnia

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
 <!-- Kee Subscriptions pricing -->
 [%extra_options id:'[@SKU@]'%]
   [%PARAM *select_option%]
-  [%if [@name@] eq 'Auto-delivery'%]
-  <div class="row">
-  <div class="auto-delivery col-xs-12">
+  [%if 'Auto-delivery Auto-Delivery Auto Delivery Auto delivery' like [@name@]%]
+  <div class="auto-delivery col-xs-12" style="padding: 10px 0;">
     <div class="auto-delivery-wrapper panel panel-default panel-body">
       <div class="row">
         <div class="col-sm-4 col-xs-9">
-          <h4><i class="fa fa-undo fa-flip-vertical" style="padding-right:5px;"></i> Auto Delivery</h4>
+          <h3><i class="fa fa-undo fa-flip-vertical" style="padding-right:5px;"></i><strong> Auto Delivery</strong></h3>
           <span class="hidden-lg hidden-md hidden-sm ad-save label label-success">Save $<span class="ad-discount"></span> every time</span>
         </div>
         <div class="col-xs-5 hidden-xs">
         </div>
         <div class="col-xs-3 text-right">
           <span class="as-low">As low as:<br /></span>
-          <span class="ad-price productpricetext"></span>
+          <span class="ad-price h1"></span>
         </div>
       </div>
       <p class="ad-select-sect">
 (function(){
 
   var settings = {
-    autoSelect: true
+    autoSelect: false
   };
 
   // Don't initialize twice
  1. 1
  2. 2
  3. 3
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.