Wrong reduction price
Issue #11
resolved
I get the wrong Price in the following code. I have a product for 2,30 and i put it on sale by 10% what should make it 2,07, what show good in the admin panel. But the following code {{price}} shows 2,15 :S I put that code on the homepage.
{{ store:extras limit="4" type="sale" }}
{{ name }} {{ price }}
{{ /store:extras }}
when i go to /store/extras/sales it shows the right price with the reduction for 2,07. No i click on the product but it shows the old price 2,30. i used the following code:
<span><?php if (isset($product->sale_type)): ?>
<span class="<?php echo $product->sale_type; ?>">
<?php echo $product->sale_type == 'reduce' ? '-' . $product->reduction . '%' : lang('store:option_' . $product->sale_type); ?>
</span>
<?php if ($product->price > $product->new_price): ?>
<span style="text-decoration: line-through"><?php echo $product->price_tax; ?></span> <?php echo $product->new_price_tax; ?>
<?php else: ?>
<span class="price"><?php echo $product->price_tax; ?></span>
<?php endif; ?>
<?php else: ?>
<span class="price"><?php echo $product->price_tax; ?></span>
<?php endif; ?>
{{ settings:currency }}</span>
Comments (2)
-
repo owner -
reporter - changed status to resolved
Thanks for letting me know. It works now
- Log in to comment
The "price" value is not overwritten when you add reduction. If you did "print_r" of any product item you would notice that there are in fact 4 price values:
The same applies for lex tags: