Page 1 of 1

Live Price Floating On Screen

Posted: Wed Mar 13, 2019 8:33 pm
by Bobbio999
Hi,

Does anybody know how to make the PRICE float on screen at all times.

I have a huge amount of options, all with different prices, that continually update the price on the product screen. (using Live Price Update module).
The problem is the user has to keep scrolling up and down the page to check how each option choice changes the price. For this reason it would be really helpful if the price would always remain in view on screen on the product page.

As an example:
https://envelopesprinted.com/Standard-E ... front-back

Open Cart Version 2.0.3.1

Re: Live Price Floating On Screen

Posted: Sun Mar 17, 2019 10:04 pm
by cyclops12
You could use something like This and just wrap the described div around the price

Re: Live Price Floating On Screen

Posted: Wed Apr 10, 2019 9:20 pm
by Bobbio999
I fixed it myself using sticky (doesn't work on IE). If anyone else is interested in this feel free to ask, also i've summised it below:

../product.tmpl

Code: Select all

<style>
div.sticky {
  position: -webkit-sticky;
  position: sticky;
  background-color: white;
 top: 0;
}
</style>
<div class="sticky">
<?php if ($price) { ?>
          <ul class="list-unstyled">
            <?php if (!$special) { ?>
YOU PAY: <?php echo $price; ?>
            </li>
            <?php } else { ?>
            <li><?php echo $price; ?></li>
            <li>
              <h2><?php echo $special; ?></h2>
            </li>
            <?php } ?>
            <?php if ($tax) { ?>
            <li><?php echo $text_tax; ?> <?php echo $tax; ?></li>
            <?php } ?>
 <?php if ($discounts) { ?>
            <li>
              <hr>
 <?php } ?>
          </ul>
          <?php } ?>   </li>
</div>