Author Topic: VmConfig setting 'checkout_show_origprice' ?  (Read 149 times)

bcohen0

  • Beginner
  • *
  • Posts: 14
VmConfig setting 'checkout_show_origprice' ?
« on: July 29, 2017, 01:24:12 am »
Virtuemart 3.2.2:

I am finding that for my purposes, I would like to be able to set the configuration item 'checkout_show_origprice' to false. Is this setting surfaced anywhere?

It appears in file components/com_virtuemart/views/cart/tmpl/default_pricelist.php  on line 100:

   <td class="vm-cart-item-total">
      <?php
      if (VmConfig::get ('checkout_show_origprice', 1) && !empty($prow->prices['basePriceWithTax']) && $prow->prices['basePriceWithTax'] != $prow->prices['salesPrice']) {
         echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceWithTax', '', $prow->prices, TRUE, FALSE, $prow->quantity) . '</span><br />';
      }
      elseif (VmConfig::get ('checkout_show_origprice', 1) && empty($prow->prices['basePriceWithTax']) && !empty($prow->prices['basePriceVariant']) && $prow->prices['basePriceVariant'] != $prow->prices['salesPrice']) {
         echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $prow->prices, TRUE, FALSE, $prow->quantity) . '</span><br />';
      }
      echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $prow->prices, FALSE, FALSE, $prow->quantity) ?></td>

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9175
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VmConfig setting 'checkout_show_origprice' ?
« Reply #1 on: July 29, 2017, 21:19:25 pm »
We should create one, but maybe as parameter of the view. In general, when you find a vmconfig::get without GUI, then it is so called hidden config.  https://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bcohen0

  • Beginner
  • *
  • Posts: 14
Re: VmConfig setting 'checkout_show_origprice' ?
« Reply #2 on: August 14, 2017, 23:59:22 pm »
Thank you for that!