VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: Lexiboy on October 18, 2014, 01:04:55 AM

Title: unit price not showing in checkout page / missing config option?
Post by: Lexiboy on October 18, 2014, 01:04:55 AM
I am using VM 2.6.10 and Jooma 2.5.27.

On the checkout page, for each product unit price is not listed in the price column, only the discount and total column have values.
In confirmation mails however, the product price is mentioned.

When I check the default_pricelist.php, in the part where the unit price should be displayed I see the following code:
if (VmConfig::get ('checkout_show_origprice', 1) ... etc.

However, in the configuration I cannot find such an option at all.
Can this cause my unit price to not show? Or could there be another problem?

Any help is very welcome.

Ps, actualy, I think this unit price was never displayed on the checkout page, I am using the default template of VM, not an override.
Title: Re: unit price not showing in checkout page / missing config option?
Post by: GJC Web Design on October 18, 2014, 01:13:56 AM
if you remove the "if" what happens?
Title: Re: unit price not showing in checkout page / missing config option?
Post by: Lexiboy on October 18, 2014, 09:46:27 AM
Nothing at all.

This is the code, when put the echos of all the ifs outside of the if, if and if else also nothing happens.



<?php
 if (VmConfig::get ('checkout_show_origprice'1) && $this->cart->pricesUnformatted[$pkey]['discountedPriceWithoutTax'] != $this->cart->pricesUnformatted[$pkey]['priceWithoutTax']) {
echo '<span class="line-through">' $this->currencyDisplay->createPriceDiv ('basePriceVariant'''$this->cart->pricesUnformatted[$pkey], TRUEFALSE) . '</span><br />';
 }
if ($this->cart->pricesUnformatted[$pkey]['discountedPriceWithoutTax']) {
echo $this->currencyDisplay->createPriceDiv ('discountedPriceWithoutTax'''$this->cart->pricesUnformatted[$pkey], FALSEFALSE);
} else {
echo $this->currencyDisplay->createPriceDiv ('basePriceVariant'''$this->cart->pricesUnformatted[$pkey], FALSEFALSE);
}

        
        
//  echo $prow->salesPrice ;

Title: Re: unit price not showing in checkout page / missing config option?
Post by: GJC Web Design on October 18, 2014, 11:10:26 AM
you need to echo out $this->cart to see what prices are available in the cart - then work from there

print 'Debug Line '.__LINE__.' $this->cart <pre>'; print_r ($this->cart); print "</pre><br />\n";
Title: Re: unit price not showing in checkout page / missing config option?
Post by: Lexiboy on October 20, 2014, 22:37:00 PM
thanks for the help, I will sort it out :)