News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

VmConfig setting 'checkout_show_origprice' ?

Started by bcohen0, July 29, 2017, 01:24:12 AM

Previous topic - Next topic

bcohen0

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

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
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/