-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Product] added original price #3783
[Product] added original price #3783
Conversation
|
||
public function isReduced() | ||
{ | ||
if ($this->originalPrice > $this->price) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return $this->originalPrice > $this->price;
?
Missing doblock.
<div class="product-box"> | ||
<a href="{{ path(product) }}"><h4>{{ product.name|truncate(18) }}</h4></a> | ||
<a href="{{ path(product) }}"> | ||
<img class="img-rounded img-responsive" src="{{ product.image ? product.image.path|imagine_filter('sylius_medium') : 'http://placehold.it/262x255' }}" alt="{{ product.name }}" /> | ||
<span class="label label-primary">{{ sylius_calculate_price(product.masterVariant)|sylius_price }}</span> | ||
<!--<span class="label label-primary">{{ sylius_calculate_price(product.masterVariant)|sylius_price }}</span>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused code.
@@ -32,3 +32,10 @@ | |||
</div> | |||
|
|||
{% endmacro %} | |||
|
|||
{% macro sylius_display_price_with_original(variant) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just call this sylius_display_price
since the original is conditional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@pjedrzejewski @Zales0123 @lchrusciel @peteward I corrected everything you said. Anything more? |
[Product] added original price
Thank you Krzysztof! 👍 Nice work. :) |
Continuation of PR #3373