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

createPriceDiv fails in /cart/default_pricelist.php: issue or my fault?

Started by SteP[IT], January 24, 2015, 21:08:25 PM

Previous topic - Next topic

SteP[IT]

I'm in the needing of showing the "basePriceVariant" in my cart: then I have commented out the "if" in lines 51 and 53 of default_pricelist.php to show the hidden content I want, as hereafter:

if (VmConfig::get ('checkout_show_origprice', 1) && $prow->prices['discountedPriceWithoutTax'] != $prow->prices['priceWithoutTax']) {
echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $prow->prices, TRUE, FALSE) . '</span><br />';
}


But also commenting out those line the <span> content is empty...
I have been able to get the correct value only modifing the line 52 as hereafter:

echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('', '', $prow->prices['basePriceVariant'], TRUE, FALSE) . '</span><br />';


In this way I get the correct crossed base price: I had to put an empty value in the first "createPriceDiv" argument, and put the corresponding full array value reference in the third argument.

The same happens for the lines 56 and 58 of the same file: only empting the first "createPriceDiv" argument, and putting the vhole array reference value in the third I get the desired value.

Is this a bug or a wanted result?

Any hint will be appreciated.

Regards
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

GJC Web Design

check the actual function in administrator\components\com_virtuemart\helpers\currencydisplay.php line 314
to see how it works

public function createPriceDiv($name,$description,$product_price,$priceOnly=false,$switchSequel=false,$quantity = 1.0,$forceNoLabel=false)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

SteP[IT]

J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it