Skip to content

Commit

Permalink
PR-129 Revert listitem oxprice plugin usage
Browse files Browse the repository at this point in the history
#Related #129
  • Loading branch information
Sieg authored and robertblank committed Nov 6, 2018
1 parent 60d471a commit bbb5c3a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 37 deletions.
19 changes: 10 additions & 9 deletions tpl/widget/product/listitem_grid.tpl
Expand Up @@ -70,10 +70,13 @@
<div class="content">
[{block name="widget_product_listitem_grid_price"}]
[{oxhasrights ident="SHOWARTICLEPRICE"}]
[{assign var="oUnitPrice" value=$product->getUnitPrice()}]
[{assign var="tprice" value=$product->getTPrice()}]
[{assign var="price" value=$product->getPrice()}]

[{if $product->getTPrice()}]
[{if $tprice && $tprice->getBruttoPrice() > $price->getBruttoPrice()}]
<span class="oldPrice text-muted">
<del>[{oxprice price=$product->getTPrice() currency=$oView->getActCurrency()}]</del>
<del>[{$product->getFTPrice()}] [{$currency->sign}]</del>
</span>
[{/if}]

Expand All @@ -83,26 +86,24 @@
[{if $product->isRangePrice()}]
[{oxmultilang ident="PRICE_FROM"}]
[{if !$product->isParentNotBuyable()}]
[{assign var="oPrice" value=$product->getMinPrice()}]
[{$product->getFMinPrice()}]
[{else}]
[{assign var="oPrice" value=$product->getVarMinPrice()}]
[{$product->getFVarMinPrice()}]
[{/if}]
[{else}]
[{if !$product->isParentNotBuyable()}]
[{assign var="oPrice" value=$product->getPrice()}]
[{$product->getFPrice()}]
[{else}]
[{assign var="oPrice" value=$product->getVarMinPrice()}]
[{$product->getFVarMinPrice()}]
[{/if}]
[{/if}]
[{oxprice price=$oPrice currency=$oView->getActCurrency()}]
[{$currency->sign}]
[{if $oView->isVatIncluded()}]
[{if !($product->hasMdVariants() || ($oViewConf->showSelectListsInList() && $product->getSelections(1)) || $product->getVariants())}]*[{/if}]
[{/if}]
</span>
[{/if}]
[{/block}]

[{assign var="oUnitPrice" value=$product->getUnitPrice()}]
[{if $oUnitPrice}]
<span id="productPricePerUnit_[{$testid}]" class="pricePerUnit">
[{$product->oxarticles__oxunitquantity->value}] [{$product->getUnitName()}] | [{oxprice price=$oUnitPrice currency=$currency}]/[{$product->getUnitName()}]
Expand Down
41 changes: 21 additions & 20 deletions tpl/widget/product/listitem_infogrid.tpl
Expand Up @@ -98,39 +98,40 @@
<div class="content">
[{block name="widget_product_listitem_infogrid_price"}]
[{oxhasrights ident="SHOWARTICLEPRICE"}]
[{assign var="oUnitPrice" value=$product->getUnitPrice()}]
[{assign var="tprice" value=$product->getTPrice()}]
[{assign var="price" value=$product->getPrice()}]

[{if $product->getTPrice()}]
[{if $tprice && $tprice->getBruttoPrice() > $price->getBruttoPrice()}]
<span class="oldPrice text-muted">
<del>[{oxprice price=$product->getTPrice() currency=$oView->getActCurrency()}]</del>
<del>[{$product->getFTPrice()}] [{$currency->sign}]</del>
</span>
[{/if}]

[{block name="widget_product_listitem_infogrid_price_value"}]
[{if $product->getFPrice()}]
<span class="lead text-nowrap">
[{if $product->isRangePrice()}]
[{oxmultilang ident="PRICE_FROM"}]
[{if !$product->isParentNotBuyable()}]
[{assign var="oPrice" value=$product->getMinPrice()}]
[{else}]
[{assign var="oPrice" value=$product->getVarMinPrice()}]
[{/if}]
[{if $product->isRangePrice()}]
[{oxmultilang ident="PRICE_FROM"}]
[{if !$product->isParentNotBuyable()}]
[{$product->getFMinPrice()}]
[{else}]
[{if !$product->isParentNotBuyable()}]
[{assign var="oPrice" value=$product->getPrice()}]
[{else}]
[{assign var="oPrice" value=$product->getVarMinPrice()}]
[{/if}]
[{$product->getFVarMinPrice()}]
[{/if}]
[{oxprice price=$oPrice currency=$oView->getActCurrency()}]
[{if $oView->isVatIncluded()}]
[{if !($product->hasMdVariants() || ($oViewConf->showSelectListsInList() && $product->getSelections(1)) || $product->getVariants())}]*[{/if}]
[{else}]
[{if !$product->isParentNotBuyable()}]
[{$product->getFPrice()}]
[{else}]
[{$product->getFVarMinPrice()}]
[{/if}]
</span>
[{/if}]
[{$currency->sign}]
[{if $oView->isVatIncluded()}]
[{if !($product->hasMdVariants() || ($oViewConf->showSelectListsInList() && $product->getSelections(1)) || $product->getVariants())}]*[{/if}]
[{/if}]
</span>
[{/if}]
[{/block}]

[{assign var="oUnitPrice" value=$product->getUnitPrice()}]
[{if $oUnitPrice}]
<span id="productPricePerUnit_[{$testid}]" class="pricePerUnit">
[{$product->oxarticles__oxunitquantity->value}] [{$product->getUnitName()}] | [{oxprice price=$oUnitPrice currency=$currency}]/[{$product->getUnitName()}]
Expand Down
20 changes: 12 additions & 8 deletions tpl/widget/product/listitem_line.tpl
Expand Up @@ -103,36 +103,40 @@
<div class="functions text-right">
[{block name="widget_product_listitem_line_price"}]
[{oxhasrights ident="SHOWARTICLEPRICE"}]
[{if $product->getTPrice()}]
[{assign var="oUnitPrice" value=$product->getUnitPrice()}]
[{assign var="tprice" value=$product->getTPrice()}]
[{assign var="price" value=$product->getPrice()}]

[{if $tprice && $tprice->getBruttoPrice() > $price->getBruttoPrice()}]
<span class="oldPrice text-muted">
<del>[{oxprice price=$product->getTPrice() currency=$oView->getActCurrency()}]</del>
<del>[{$product->getFTPrice()}] [{$currency->sign}]</del>
</span>
<br/>
[{/if}]

[{block name="widget_product_listitem_line_price_value"}]
<span id="productPrice_[{$testid}]" class="lead price text-nowrap">
[{if $product->isRangePrice()}]
[{oxmultilang ident="PRICE_FROM"}]
[{if !$product->isParentNotBuyable()}]
[{assign var="oPrice" value=$product->getMinPrice()}]
[{$product->getFMinPrice()}]
[{else}]
[{assign var="oPrice" value=$product->getVarMinPrice()}]
[{$product->getFVarMinPrice()}]
[{/if}]
[{else}]
[{if !$product->isParentNotBuyable()}]
[{assign var="oPrice" value=$product->getPrice()}]
[{$product->getFPrice()}]
[{else}]
[{assign var="oPrice" value=$product->getVarMinPrice()}]
[{$product->getFVarMinPrice()}]
[{/if}]
[{/if}]
[{oxprice price=$oPrice currency=$oView->getActCurrency()}]
[{$currency->sign}]
[{if $oView->isVatIncluded()}]
[{if !($product->hasMdVariants() || ($oViewConf->showSelectListsInList() && $product->getSelections(1)) || $product->getVariants())}]*[{/if}]
[{/if}]
</span><br/>
[{/block}]

[{assign var="oUnitPrice" value=$product->getUnitPrice()}]
[{if $oUnitPrice}]
<span id="productPricePerUnit_[{$testid}]" class="pricePerUnit text-nowrap">[{$product->oxarticles__oxunitquantity->value}] [{$product->getUnitName()}] | [{oxprice price=$oUnitPrice currency=$currency}]/[{$product->getUnitName()}]</span>
[{elseif $product->oxarticles__oxweight->value }]
Expand Down

0 comments on commit bbb5c3a

Please sign in to comment.