From bdd84771b75491c5d7e4a199a8d0984f70d50c18 Mon Sep 17 00:00:00 2001 From: Fabio Chelly Date: Wed, 25 Sep 2013 14:43:30 +0200 Subject: [PATCH] [-] MO productcomments and loyalty: loyalty doesn't disconnect current user anymore --- modules/loyalty/LoyaltyModule.php | 3 ++- modules/productcomments/productcomments.tpl | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/loyalty/LoyaltyModule.php b/modules/loyalty/LoyaltyModule.php index 5d8ef5c9a..273ba096b 100644 --- a/modules/loyalty/LoyaltyModule.php +++ b/modules/loyalty/LoyaltyModule.php @@ -85,7 +85,8 @@ class LoyaltyModule extends ObjectModel $total = 0; if (Validate::isLoadedObject($cart)) { - $context = Context::getContext(); + $currentContext = Context::getContext(); + $context = clone $currentContext; $context->cart = $cart; $context->customer = new Customer($context->cart->id_customer); $context->language = new Language($context->cart->id_lang); diff --git a/modules/productcomments/productcomments.tpl b/modules/productcomments/productcomments.tpl index 972096456..f8fe9f111 100644 --- a/modules/productcomments/productcomments.tpl +++ b/modules/productcomments/productcomments.tpl @@ -27,6 +27,11 @@ var productcomments_controller_url = '{$productcomments_controller_url}'; var confirm_report_message = "{l s='Are you sure you want report this comment?' mod='productcomments'}"; var secure_key = "{$secure_key}"; var productcomments_url_rewrite = '{$productcomments_url_rewriting_activated}'; +var productcomment_added = '{l s='Your comment has been added!' mod='productcomments'}'; +var productcomment_added_moderation = '{l s='Your comment has been added and will be available once approved by a moderator' mod='productcomments'}'; +var productcomment_title = '{l s='New comment' mod='productcomments'}'; +var productcomment_ok = '{l s='OK' mod='productcomments'}'; +var moderation_active = {$moderation_active};