diff --git a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl
index ce570cb64..b573ed582 100755
--- a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl
+++ b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl
@@ -133,6 +133,24 @@
{l s='Print order'}
+ {if Configuration::get('PS_ORDER_RETURN')}
+
+
+ {if $order->hasBeenShipped()}
+ {l s='Return products'}
+ {elseif $order->hasBeenPaid()}
+ {l s='Standard refund'}
+ {else}
+ {l s='Cancel products'}
+ {/if}
+
+ {/if}
+ {if $order->hasInvoice()}
+
+
+ {l s='Partial refund'}
+
+ {/if}
diff --git a/admin-dev/themes/default/template/controllers/search/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/search/helpers/view/view.tpl
index 953857f88..afbf00c25 100644
--- a/admin-dev/themes/default/template/controllers/search/helpers/view/view.tpl
+++ b/admin-dev/themes/default/template/controllers/search/helpers/view/view.tpl
@@ -29,12 +29,6 @@ $(function() {
});
-{if $show_toolbar}
- {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
- {block name="leadin"}{/block}
-{/if}
-
-
{if isset($features)}
{if !$features}
diff --git a/classes/stock/StockAvailable.php b/classes/stock/StockAvailable.php
index 2e47abb49..dbe95389f 100644
--- a/classes/stock/StockAvailable.php
+++ b/classes/stock/StockAvailable.php
@@ -305,7 +305,7 @@ class StockAvailableCore extends ObjectModel
if (!Validate::isUnsignedId($id_product))
return false;
- $existing_id = StockAvailable::getStockAvailableIdByProductId((int)$id_product, (int)$id_product_attribute, (int)$id_shop);
+ $existing_id = StockAvailable::getStockAvailableIdByProductId((int)$id_product, (int)$id_product_attribute, $id_shop);
if ($existing_id > 0)
{
Db::getInstance()->update(