News:

Looking for documentation? Take a look on our wiki

Main Menu

Base price and discount price layout

Started by thefbi, July 27, 2015, 06:33:56 AM

Previous topic - Next topic

thefbi

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

Studio 42

hi,
do you have checked "Baseprice with Tax, but without discounts" and  "Final salesprice"?

thefbi

Yes, but only the final price show. If i dont check base price, no price without discount show...

Studio 42

Hi,
can you provide a link to a page with discount?


Studio 42

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>";
}


thefbi

OK thank you, i will post this to the dev team.

Regards.

thefbi

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.

servlet

I have the same problem
Baseprice with Tax, but without discounts -  is not displayed
Did you solve the problem?
Он-лайн магазин за фототапети http://mishelfoster.com

thefbi

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

servlet

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?
Он-лайн магазин за фототапети http://mishelfoster.com

Studio 42

Parehaps you change the bad file ?
Do not forget your template overides

servlet

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
Он-лайн магазин за фототапети http://mishelfoster.com

Studio 42

DO a
var_dump($product->prices);
or
echo '<pre>'; print_r($product->prices) ; echo '</pre>' ;
should display you the price set in your product.