Snippets

Keetrax Kee Subscriptions Theme Tweak (Bootstrap 4)

Updated by Mike Martel

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
         var price = parseFloat(dataEl.getAttribute('data-productprice'));
 
         if($('#productextra0').val() != 0) {
-          var discount = parseInt(adSelect.options[adSelect.selectedIndex].getAttribute('data-price').replace('-', ''));
+          var discount = parseFloat(adSelect.options[adSelect.selectedIndex].getAttribute('data-price').replace('-', ''));
           var dPrice = price - discount;
           // Set the prices in the box
           var adPriceEl = document.querySelector(".ad-price");
Updated by Adrian

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
       <div class="row">
         <div class="col-md-4 col-sm-5 col-8">
           <h3><i class="fa fa-undo fa-flip-vertical pr-1"></i><strong> Auto Delivery</strong></h3>
-          <span class="d-sm-none ad-save badge badge-success mobile-save">Save $<span class="ad-discount"></span> every time</span>
+          <span class="d-sm-none ad-save badge badge-success mobile-save">Save <span class="ad-save-pre">up to </span>$<span class="ad-discount"></span> every time</span>
         </div>
         <div class="col-md-5 col-4 d-sm-block d-none desktop-save">
-          <span class="ad-save badge badge-success">Save $<span class="ad-discount"></span> every time</span>
+          <span class="ad-save badge badge-success">Save <span class="ad-save-pre">up to </span>$<span class="ad-discount"></span> every time</span>
         </div>
         <div class="col-4 col-sm-3 text-right as-low-wrapper" style="display:none;">
           <span class="as-low">As low as:<br /></span>
           var adPriceEl = document.querySelector(".ad-price");
           adPriceEl.innerHTML = '$'+dPrice.toFixed(2);
           $('.as-low-wrapper').show(500);
+          $('.ad-save-pre').hide();
         } else {
           $('.as-low-wrapper').hide();
+          $('.ad-save-pre').show();
           adDiscount.forEach((el) => {
               el.innerHTML = maxDiscount;
           });
Updated by Fairnia

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
         </a>
 
         <div id="ad-explain" class="panel-collapse collapse p-3" 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 Adrian

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
           $('.as-low-wrapper').show(500);
         } else {
           $('.as-low-wrapper').hide();
+          adDiscount.forEach((el) => {
+              el.innerHTML = maxDiscount;
+          });
         }
       });
     });
Updated by Adrian

File keesubscriptions.template.html Modified

  • Ignore whitespace
  • Hide word diff
     // Set the prices in the box
     var adPriceEl = document.querySelector(".ad-price");
     if ( adPriceEl ) {
-      adPriceEl.innerHTML = '$'+adPrice.toFixed(2);
+      adPriceEl.innerHTML = '$'+adPrice;
     }
 
     // Set the discounts in the select dropdown
  1. 1
  2. 2
  3. 3
  4. 4
HTTPS SSH

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