VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: thefbi on July 27, 2015, 06:33:56 AM

Title: Base price and discount price layout
Post by: thefbi on July 27, 2015, 06:33:56 AM
Hello,
i am in Joomla 3.4.3 and VM 3.0.8.

i have a problem with the price layout. For the discount price, i want show the base price and the final price, to see the discount difference.
If i publish the base price and the final price in the VM admin, it work, but for all the others items without discount, i have the same price twice, which is very strange...

What i want, is to have the possibility to show two prices ONLY when i have a discount. So the no discount items have ONE price and the discount items have 2 prices.

Thanks for help.

Frédéric
Title: Re: Base price and discount price layout
Post by: Studio 42 on July 27, 2015, 15:08:44 PM
hi,
do you have checked "Baseprice with Tax, but without discounts" and  "Final salesprice"?
Title: Re: Base price and discount price layout
Post by: thefbi on July 27, 2015, 19:33:41 PM
Yes, but only the final price show. If i dont check base price, no price without discount show...
Title: Re: Base price and discount price layout
Post by: Studio 42 on July 27, 2015, 21:01:53 PM
Hi,
can you provide a link to a page with discount?
Title: Re: Base price and discount price layout
Post by: thefbi on July 27, 2015, 21:28:54 PM
http://www.energie-sante.ch/la-boutique/accueil-boutique/harmonisation-de-votre-habitat-purification-de-l-eau-systèmes-de-protection/purification-de-leau.html
Title: Re: Base price and discount price layout
Post by: Studio 42 on July 28, 2015, 12:36:18 PM
Hi thefbi,
Contact your template provider, i think the problem come from template and can only solved on changing the template overrides.
They have to compare price eg.(from vm files) :
if (round($product->prices['basePriceWithTax'],$currency->_priceConfig['salesPrice'][1]) != $product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices) . "</span>";
}

Title: Re: Base price and discount price layout
Post by: thefbi on July 28, 2015, 18:28:23 PM
OK thank you, i will post this to the dev team.

Regards.
Title: Re: Base price and discount price layout
Post by: thefbi on August 23, 2015, 08:08:24 AM
Hello,
i thing there is a problem with the VM config... Because, even in the protostar template, i have the same problem. If i check the "Base price without tax" in the VM config, nothing show... This "Baseprice without tax" dont show. That is i dont understand.
Title: Re: Base price and discount price layout
Post by: servlet on April 14, 2016, 21:11:56 PM
I have the same problem
Baseprice with Tax, but without discounts -  is not displayed
Did you solve the problem?
Title: Re: Base price and discount price layout
Post by: thefbi on April 14, 2016, 21:38:24 PM
Hello,
i never have solved this problem. Seem nobody know what is wrong with this. I dont understand a component like this can have a basic problem like this, wich is the base of all e-commerce component...
Good luck
Title: Re: Base price and discount price layout
Post by: servlet on April 14, 2016, 21:52:52 PM
I am doing some test...
I cannot echo basePriceWithTax without any IF
This doesnt work:

echo '<span class="price-crossed" >' . $currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices) . "</span>";

It doesnt display anything

@Studio 42 did you test your code? Is it works?
Title: Re: Base price and discount price layout
Post by: Studio 42 on April 14, 2016, 23:15:06 PM
Parehaps you change the bad file ?
Do not forget your template overides
Title: Re: Base price and discount price layout
Post by: servlet on April 15, 2016, 08:30:37 AM
I didnt change anything.
I dont override price.php
2) I just try to remove IF function to check is it works bypass VM settings
3) I checked css code - no anything like "display none" or something like this
Title: Re: Base price and discount price layout
Post by: Studio 42 on April 15, 2016, 12:43:05 PM
DO a
var_dump($product->prices);
or
echo '<pre>'; print_r($product->prices) ; echo '</pre>' ;
should display you the price set in your product.